提交 10949fff 编写于 作者: V Valentin Longchamp 提交者: Sascha Hauer

mx31moboard: support for pin linked for battery presence check

Signed-off-by: NValentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 421bf82e
...@@ -49,6 +49,8 @@ static unsigned int marxbot_pins[] = { ...@@ -49,6 +49,8 @@ static unsigned int marxbot_pins[] = {
MX31_PIN_TXD2__GPIO1_28, MX31_PIN_TXD2__GPIO1_28,
/* dsPIC resets */ /* dsPIC resets */
MX31_PIN_STXD5__GPIO1_21, MX31_PIN_SRXD5__GPIO1_22, 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) #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR)
...@@ -133,4 +135,9 @@ void __init mx31moboard_marxbot_init(void) ...@@ -133,4 +135,9 @@ void __init mx31moboard_marxbot_init(void)
dspics_resets_init(); dspics_resets_init();
mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); 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);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册