diff options
author | Abraham Arce <x0066660@ti.com> | 2011-05-31 09:24:53 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:06:22 +0100 |
commit | ccf6ee3d0bf4035785f5f8aac1dff882b1469db3 (patch) | |
tree | 971f2b5695be0f73b49961f3d2c843c55a5fdd1c /arch | |
parent | d6bb32f1884ec1ae1ccc70983178914cb33d8ac9 (diff) |
OMAP4: Touchscreen: Board Support
Register 2 Synaptic TM1217 Touchscreen controllers for OMAP4430
development platform
Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 1adff297927..97aac2c3198 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -38,6 +38,7 @@ #include <plat/omap4-keypad.h> #include <plat/display.h> #include <plat/nokia-dsi-panel.h> +#include <plat/syntm12xx.h> #include "mux.h" #include "hsmmc.h" @@ -256,6 +257,44 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = { }, }; +/* Begin Synaptic Touchscreen TM-01217 */ + +static char *tm12xx_idev_names[] = { + "Synaptic TM12XX TouchPoint 1", + "Synaptic TM12XX TouchPoint 2", + "Synaptic TM12XX TouchPoint 3", + "Synaptic TM12XX TouchPoint 4", + "Synaptic TM12XX TouchPoint 5", + "Synaptic TM12XX TouchPoint 6", + NULL, +}; + +static u8 tm12xx_button_map[] = { + KEY_F1, + KEY_F2, +}; + +static struct tm12xx_ts_platform_data tm12xx_platform_data[] = { + { /* Primary Controller */ + .gpio_intr = 35, + .idev_name = tm12xx_idev_names, + .button_map = tm12xx_button_map, + .num_buttons = ARRAY_SIZE(tm12xx_button_map), + .repeat = 0, + .swap_xy = 1, + }, + { /* Secondary Controller */ + .gpio_intr = 36, + .idev_name = tm12xx_idev_names, + .button_map = tm12xx_button_map, + .num_buttons = ARRAY_SIZE(tm12xx_button_map), + .repeat = 0, + .swap_xy = 1, + }, +}; + +/* End Synaptic Touchscreen TM-01217 */ + static int omap_ethernet_init(void) { int status; @@ -658,8 +697,18 @@ static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = { .platform_data = &sdp4430_twldata, }, }; +static struct i2c_board_info __initdata sdp4430_i2c_2_boardinfo[] = { + { + I2C_BOARD_INFO("tm12xx_ts_primary", 0x4b), + .platform_data = &tm12xx_platform_data[0], + }, +}; static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { { + I2C_BOARD_INFO("tm12xx_ts_secondary", 0x4b), + .platform_data = &tm12xx_platform_data[1], + }, + { I2C_BOARD_INFO("tmp105", 0x48), }, { @@ -671,6 +720,7 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { I2C_BOARD_INFO("hmc5843", 0x1e), }, }; + static int __init omap4_i2c_init(void) { /* @@ -679,8 +729,9 @@ static int __init omap4_i2c_init(void) */ omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo, ARRAY_SIZE(sdp4430_i2c_boardinfo)); - omap_register_i2c_bus(2, 400, NULL, 0); - omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, + omap_register_i2c_bus(2, 400, sdp4430_i2c_2_boardinfo, + ARRAY_SIZE(sdp4430_i2c_2_boardinfo)); + omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); |