Skip to content

Commit

Permalink
mx31moboard: support for pin linked for battery presence check
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Valentin Longchamp authored and Sascha Hauer committed Nov 14, 2009
1 parent 421bf82 commit 10949ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-mx3/mx31moboard-marxbot.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ static unsigned int marxbot_pins[] = {
MX31_PIN_TXD2__GPIO1_28,
/* dsPIC resets */
MX31_PIN_STXD5__GPIO1_21, MX31_PIN_SRXD5__GPIO1_22,
/*battery detection */
MX31_PIN_LCS0__GPIO3_23,
};

#define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR)
Expand Down Expand Up @@ -133,4 +135,9 @@ void __init mx31moboard_marxbot_init(void)
dspics_resets_init();

mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);

/* battery present pin */
gpio_request(IOMUX_TO_GPIO(MX31_PIN_LCS0), "bat-present");
gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0));
gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false);
}

0 comments on commit 10949ff

Please sign in to comment.