Commit f714d709 authored by Rong Dian's avatar Rong Dian Committed by Jason Liu

ENGR00181094-1: MX6 SABRESD: Add pin config for MAX8903

Configure PINMUX for max8903 driver on SABRESD_rev.B board.
Signed-off-by: default avatarRong Dian <b38775@freescale.com>
parent 8fb3a25a
......@@ -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
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment