]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00181094-1: MX6 SABRESD: Add pin config for MAX8903
authorRong Dian <b38775@freescale.com>
Fri, 27 Apr 2012 07:48:59 +0000 (15:48 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:30 +0000 (08:34 +0200)
Configure PINMUX for max8903 driver on SABRESD_rev.B board.

Signed-off-by: Rong Dian <b38775@freescale.com>
arch/arm/configs/imx6_defconfig
arch/arm/mach-mx6/board-mx6q_sabresd.c

index b884f397b57a8d078430fe6d52501ed761c5f37a..70be82078bf8ef5c40022c477ecc30dd7c065879 100644 (file)
@@ -1285,7 +1285,8 @@ CONFIG_POWER_SUPPLY=y
 # CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_CHARGER_ISP1704 is not set
-CONFIG_CHARGER_MAX8903=y
+# CONFIG_CHARGER_MAX8903 is not set
+CONFIG_BATTERY_MAX8903=y
 # CONFIG_CHARGER_GPIO is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
index 1c3545cfaf16755bdb5393732a7727a43cec053c..b7e48c7fd18c7501318dff5c4c30baf13ca3990a 100644 (file)
@@ -46,7 +46,7 @@
 #include <linux/memblock.h>
 #include <linux/gpio.h>
 #include <linux/etherdevice.h>
-#include <linux/power/max8903_charger.h>
+#include <linux/power/max8903_battery.h>
 #include <linux/regulator/anatop-regulator.h>
 #include <linux/regulator/consumer.h>
 #include <linux/regulator/machine.h>
@@ -1627,6 +1627,38 @@ static void __init mx6_sabresd_board_init(void)
                gpio_direction_input(SABRESD_PFUZE_INT);
                mx6q_sabresd_init_pfuze100(SABRESD_PFUZE_INT);
        }
+       /* set DOK gpio input */
+       ret = gpio_request(SABRESD_CHARGE_DOK_B, "max8903-DOK");
+       if (ret) {
+               printk(KERN_ERR"request max8903-DOK error!!\n");
+               return;
+       } else {
+               gpio_direction_input(SABRESD_CHARGE_DOK_B);
+       }
+       /* set UOK gpio input */
+       ret = gpio_request(SABRESD_CHARGE_UOK_B, "max8903-UOK");
+       if (ret) {
+               printk(KERN_ERR"request max8903-UOK error!!\n");
+               return;
+       } else {
+               gpio_direction_input(SABRESD_CHARGE_UOK_B);
+       }
+       /* set FLT gpio input */
+       ret = gpio_request(SABRESD_CHARGE_FLT_1_B, "max8903-FLT");
+       if (ret) {
+               printk(KERN_ERR"request max8903-FLT error!!\n");
+               return;
+       } else {
+               gpio_direction_input(SABRESD_CHARGE_FLT_1_B);
+       }
+       /* set CHG gpio input */
+       ret = gpio_request(SABRESD_CHARGE_CHG_1_B, "max8903-CHG");
+       if (ret) {
+               printk(KERN_ERR"request max8903-CHG error!!\n");
+               return;
+       } else {
+               gpio_direction_input(SABRESD_CHARGE_CHG_1_B);
+       }
        /* SPI */
        imx6q_add_ecspi(0, &mx6q_sabresd_spi_data);
        spi_device_init();