diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-02-19 17:21:56 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-04-05 08:52:33 -0700 |
commit | d99caa472c0a28dc95dd9b98c30ee46f9755181f (patch) | |
tree | f4c559efc86cc8d93168714105e9ef8f408eaaa3 /arch/arm/mach-pxa | |
parent | d422be5f62ef7986d00afa4cd31eda5534ab7991 (diff) |
Input: eeti_ts - switch to gpiod API
gpiod API allows standard way of specifying GPIO polarity and takes it into
account when reading or setting GPIO state. It also allows us to switch to
common way of obtaining GPIO descriptor and away form legacy platform data.
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/raumfeld.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index e13f42a180cc..b55965ee43fb 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -26,7 +26,6 @@ #include <linux/smsc911x.h> #include <linux/input.h> #include <linux/gpio_keys.h> -#include <linux/input/eeti_ts.h> #include <linux/leds.h> #include <linux/w1-gpio.h> #include <linux/sched.h> @@ -965,9 +964,13 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = { .addr = 0x48, }; -static struct eeti_ts_platform_data eeti_ts_pdata = { - .irq_active_high = 1, - .irq_gpio = GPIO_TOUCH_IRQ, +static struct gpiod_lookup_table raumfeld_controller_gpios_table = { + .dev_id = "0-000a", + .table = { + GPIO_LOOKUP("gpio-pxa", + GPIO_TOUCH_IRQ, "attn", GPIO_ACTIVE_HIGH), + { }, + }, }; static const struct resource raumfeld_controller_resources[] = __initconst { @@ -983,7 +986,6 @@ static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { .addr = 0x0a, .resources = raumfeld_controller_resources, .num_resources = ARRAY_SIZE(raumfeld_controller_resources), - .platform_data = &eeti_ts_pdata, }; static struct platform_device *raumfeld_common_devices[] = { @@ -1074,6 +1076,8 @@ static void __init __maybe_unused raumfeld_controller_init(void) platform_device_register(&rotary_encoder_device); spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices)); + + gpiod_add_lookup_table(&raumfeld_controller_gpios_table); i2c_register_board_info(0, &raumfeld_controller_i2c_board_info, 1); ret = gpio_request(GPIO_SHUTDOWN_BATT, "battery shutdown"); |