summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx6/board-mx6sl_evk.c
diff options
context:
space:
mode:
authorRong Dian <b38775@freescale.com>2012-09-10 17:55:11 +0800
committerRong Dian <b38775@freescale.com>2012-09-12 14:10:46 +0800
commit77d20a691393a98e2b3dcd1e7eeb319b59f80d77 (patch)
treee5f1825f05882a99ce4cbda2f33beaf219004205 /arch/arm/mach-mx6/board-mx6sl_evk.c
parentf4eed08ea165aa7dd13ebf93be12c71b05d77ed2 (diff)
ENGR00223679-1 mx6sl_evk: Add pin config for MAX8903
Configure PINMUX for max8903 driver on mx6sl_evk board. Signed-off-by: Rong Dian <b38775@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx6/board-mx6sl_evk.c')
-rw-r--r--arch/arm/mach-mx6/board-mx6sl_evk.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/arm/mach-mx6/board-mx6sl_evk.c b/arch/arm/mach-mx6/board-mx6sl_evk.c
index 23fcff57d930..825217d11b8b 100644
--- a/arch/arm/mach-mx6/board-mx6sl_evk.c
+++ b/arch/arm/mach-mx6/board-mx6sl_evk.c
@@ -52,6 +52,7 @@
#include <linux/mfd/max17135.h>
#include <sound/wm8962.h>
#include <sound/pcm.h>
+#include <linux/power/sabresd_battery.h>
#include <mach/common.h>
#include <mach/hardware.h>
@@ -1174,6 +1175,33 @@ static void __init elan_ts_init(void)
gpio_direction_output(MX6SL_BRD_ELAN_CE, 1);
}
+/*
+ *Usually UOK and DOK should have separate
+ *line to differentiate its behaviour (with different
+ * GPIO irq),because connect max8903 pin UOK to
+ *pin DOK from hardware design,cause software cannot
+ *process and distinguish two interrupt, so default
+ *enable dc_valid for ac charger
+ */
+static struct max8903_pdata charger1_data = {
+ .dok = MX6_BRD_CHG_DOK,
+ .uok = MX6_BRD_CHG_UOK,
+ .chg = MX6_BRD_CHG_STATUS,
+ .flt = MX6_BRD_CHG_FLT,
+ .dcm_always_high = true,
+ .dc_valid = true,
+ .usb_valid = false,
+ .feature_flag = 1,
+};
+
+static struct platform_device evk_max8903_charger_1 = {
+ .name = "max8903-charger",
+ .dev = {
+ .platform_data = &charger1_data,
+ },
+};
+
+
#define SNVS_LPCR 0x38
static void mx6_snvs_poweroff(void)
{
@@ -1274,7 +1302,8 @@ static void __init mx6_evk_init(void)
imx6q_add_perfmon(0);
imx6q_add_perfmon(1);
imx6q_add_perfmon(2);
-
+ /* Register charger chips */
+ platform_device_register(&evk_max8903_charger_1);
pm_power_off = mx6_snvs_poweroff;
}