summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLily Zhang <r58066@freescale.com>2011-05-07 16:27:38 +0800
committerLily Zhang <r58066@freescale.com>2011-05-07 16:34:33 +0800
commit7cf2f04c16bd1d0cfd8725257c4276e5a6125ccc (patch)
treed17ed5e75e7c7e82182ac482d87fb046418c2eb2 /arch
parent3f4d0bb551143d4891e035e0ab95aa1c4f88cf07 (diff)
ENGR00143114 mx53 QS: add p1003 and egalax touch screen
Add P1003 and egalax touch screen support in mx53 QS board. Signed-off-by: Lily Zhang <r58066@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx5/mx53_loco.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/mx53_loco.c b/arch/arm/mach-mx5/mx53_loco.c
index d5dabc1811d2..6e0905b56b01 100644
--- a/arch/arm/mach-mx5/mx53_loco.c
+++ b/arch/arm/mach-mx5/mx53_loco.c
@@ -129,6 +129,10 @@ static iomux_v3_cfg_t mx53_loco_pads[] = {
/* I2C2 */
MX53_PAD_KEY_COL3__I2C2_SCL,
MX53_PAD_KEY_ROW3__I2C2_SDA,
+ /* I2C3 */
+ MX53_PAD_GPIO_3__I2C3_SCL,
+ MX53_PAD_GPIO_6__I2C3_SDA,
+
/* SD1 */
MX53_PAD_SD1_CMD__ESDHC1_CMD,
MX53_PAD_SD1_CLK__ESDHC1_CLK,
@@ -463,6 +467,29 @@ static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
},
};
+static int p1003_ts_hw_status(void)
+{
+ return gpio_get_value(DISP0_DET_INT);
+}
+
+static struct p1003_ts_platform_data p1003_ts_data = {
+ .hw_status = p1003_ts_hw_status,
+};
+
+static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
+ {
+ .type = "p1003_fwv33",
+ .addr = 0x41,
+ .irq = gpio_to_irq(DISP0_DET_INT),
+ .platform_data = &p1003_ts_data,
+ },
+ {
+ .type = "egalax_ts",
+ .addr = 0x4,
+ .irq = gpio_to_irq(DISP0_DET_INT),
+ },
+};
+
static int sdhc_write_protect(struct device *dev)
{
int ret = 0;
@@ -776,6 +803,7 @@ static void __init mxc_board_init(void)
mxc_register_device(&mxc_wdt_device, NULL);
mxc_register_device(&mxci2c_devices[0], &mxci2c_data);
mxc_register_device(&mxci2c_devices[1], &mxci2c_data);
+ mxc_register_device(&mxci2c_devices[2], &mxci2c_data);
mx53_loco_init_da9052();
@@ -812,6 +840,8 @@ static void __init mxc_board_init(void)
ARRAY_SIZE(mxc_i2c0_board_info));
i2c_register_board_info(1, mxc_i2c1_board_info,
ARRAY_SIZE(mxc_i2c1_board_info));
+ i2c_register_board_info(2, mxc_i2c2_board_info,
+ ARRAY_SIZE(mxc_i2c2_board_info));
mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data);
mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data);