diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2012-04-18 17:19:17 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:02:48 +0200 |
commit | 7d47d91edb353217f68580cf2d664900a5a8a1f6 (patch) | |
tree | d4c9b3de0173429b9418da42680de4feae97f4bd /arch | |
parent | 569fe8c88b0534b561e15bc0e7c8c6e7b346fbef (diff) |
cyttsp: ux500: Partial port to new cyttsp ts driver into mop500 board for 3.4
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-cyttsp.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.h | 1 |
2 files changed, 15 insertions, 23 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-cyttsp.c b/arch/arm/mach-ux500/board-mop500-cyttsp.c index a6aa6647bd6..1551355f50d 100644 --- a/arch/arm/mach-ux500/board-mop500-cyttsp.c +++ b/arch/arm/mach-ux500/board-mop500-cyttsp.c @@ -7,7 +7,7 @@ #include <linux/kernel.h> #include <linux/spi/spi.h> #include <linux/gpio.h> -#include <linux/cyttsp.h> +#include <linux/input/cyttsp.h> #include <linux/delay.h> #include <linux/gpio/nomadik.h> #include <linux/i2c.h> @@ -45,7 +45,7 @@ static struct i2c_board_info __initdata mop500_i2c2_devices_u8500_r3[] = { }; /* cyttsp_gpio_board_init : configures the touch panel. */ -static int cyttsp_plat_init(int on) +static int cyttsp_plat_init(void) { int ret; @@ -58,6 +58,12 @@ static int cyttsp_plat_init(int on) return 0; } +/* cyttsp_gpio_board_exit : deconfigures the touch panel. */ +static void cyttsp_plat_exit(void) +{ + gpio_direction_output(CYPRESS_SLAVE_SELECT_GPIO, 0); +} + static struct pl022_ssp_controller mop500_spi2_data = { .bus_id = SPI023_2_CONTROLLER, .num_chipselect = NUM_SSP_CLIENTS, @@ -100,30 +106,17 @@ out: struct cyttsp_platform_data cyttsp_platdata = { .maxx = 480, .maxy = 854, - .flags = 0, - .gen = CY_GEN3, - .use_st = 0, - .use_mt = 1, - .use_trk_id = 0, .use_hndshk = 0, - .use_sleep = 1, - .use_gestures = 0, - .use_load_file = 0, - .use_force_fw_update = 0, - .use_virtual_keys = 0, - /* activate up to 4 groups and set active distance */ - .gest_set = CY_GEST_GRP_NONE | CY_ACT_DIST, - /* change scn_type to enable finger and/or stylus detection */ - .scn_typ = 0xA5, /* autodetect finger+stylus; balanced mutual scan */ + /* set active distance */ + .act_dist = CY_ACT_DIST_DFLT, .act_intrvl = CY_ACT_INTRVL_DFLT, /* Active refresh interval; ms */ .tch_tmout = CY_TCH_TMOUT_DFLT, /* Active touch timeout; ms */ .lp_intrvl = CY_LP_INTRVL_DFLT, /* Low power refresh interval; ms */ .init = cyttsp_plat_init, - .mt_sync = input_mt_sync, - .wakeup = cyttsp_wakeup, + .exit = cyttsp_plat_exit, .name = CY_SPI_NAME, .irq_gpio = CYPRESS_TOUCH_INT_PIN, - .rst_gpio = CYPRESS_TOUCH_RST_GPIO, +/* .rst_gpio = CYPRESS_TOUCH_RST_GPIO, Notavailable in mainline */ }; static void cyttsp_spi_cs_control(u32 command) @@ -217,7 +210,7 @@ static struct i2c_board_info __initdata mop500_i2c0_devices_u8500[] = { }, }; -void mop500_cyttsp_init(void) +static void mop500_cyttsp_init(void) { int ret = 0; @@ -233,10 +226,10 @@ void mop500_cyttsp_init(void) ARRAY_SIZE(cypress_spi_devices)); } -void __init mop500_u8500uib_r3_init(void) +void __init mop500_u8500uib_r3_init() { mop500_cyttsp_init(); - db8500_add_spi2(&mop500_spi2_data); + db8500_add_spi2(NULL, &mop500_spi2_data); nmk_config_pin((GPIO64_GPIO | PIN_INPUT_PULLUP), false); #ifdef CONFIG_U8500_FLASH diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index f9daabb7c27..6fcedb67460 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -94,7 +94,6 @@ void __init mop500_pins_init(void); void __init mop500_vibra_init(void); void __init hrefv60_pins_init(void); void __init snowball_pins_init(void); -void mop500_cyttsp_init(void); void __init mop500_u8500uib_r3_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info const *info, |