Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: eeti_ts - expect platform code to set interrupt trigger

Instead of keying interrupt trigger off GPIO polarity, let's rely on
platform code to set it up properly for us.

Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+11 -6
+10 -1
arch/arm/mach-pxa/raumfeld.c
··· 970 970 .irq_gpio = GPIO_TOUCH_IRQ, 971 971 }; 972 972 973 + static const struct resource raumfeld_controller_resources[] = __initconst { 974 + { 975 + .start = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), 976 + .end = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), 977 + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, 978 + }, 979 + }; 980 + 973 981 static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { 974 982 .type = "eeti_ts", 975 983 .addr = 0x0a, 976 - .irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), 984 + .resources = raumfeld_controller_resources, 985 + .num_resources = ARRAY_SIZE(raumfeld_controller_resources), 977 986 .platform_data = &eeti_ts_pdata, 978 987 }; 979 988
+1 -5
drivers/input/touchscreen/eeti_ts.c
··· 157 157 struct eeti_ts_platform_data *pdata = dev_get_platdata(dev); 158 158 struct eeti_ts *eeti; 159 159 struct input_dev *input; 160 - unsigned int irq_flags; 161 160 int error; 162 161 163 162 /* ··· 200 201 201 202 eeti->irq_active_high = pdata->irq_active_high; 202 203 203 - irq_flags = eeti->irq_active_high ? 204 - IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW; 205 - 206 204 i2c_set_clientdata(client, eeti); 207 205 input_set_drvdata(input, eeti); 208 206 209 207 error = devm_request_threaded_irq(dev, client->irq, 210 208 NULL, eeti_ts_isr, 211 - irq_flags | IRQF_ONESHOT, 209 + IRQF_ONESHOT, 212 210 client->name, eeti); 213 211 if (error) { 214 212 dev_err(dev, "Unable to request touchscreen IRQ: %d\n",