Skip to content

Commit d422be5

Browse files
committed
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>
1 parent 0378008 commit d422be5

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎arch/arm/mach-pxa/raumfeld.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,19 @@ static struct eeti_ts_platform_data eeti_ts_pdata = {
970970
.irq_gpio = GPIO_TOUCH_IRQ,
971971
};
972972

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+
973981
static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
974982
.type = "eeti_ts",
975983
.addr = 0x0a,
976-
.irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
984+
.resources = raumfeld_controller_resources,
985+
.num_resources = ARRAY_SIZE(raumfeld_controller_resources),
977986
.platform_data = &eeti_ts_pdata,
978987
};
979988

‎drivers/input/touchscreen/eeti_ts.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ static int eeti_ts_probe(struct i2c_client *client,
157157
struct eeti_ts_platform_data *pdata = dev_get_platdata(dev);
158158
struct eeti_ts *eeti;
159159
struct input_dev *input;
160-
unsigned int irq_flags;
161160
int error;
162161

163162
/*
@@ -201,15 +200,12 @@ static int eeti_ts_probe(struct i2c_client *client,
201200

202201
eeti->irq_active_high = pdata->irq_active_high;
203202

204-
irq_flags = eeti->irq_active_high ?
205-
IRQF_TRIGGER_HIGH : IRQF_TRIGGER_LOW;
206-
207203
i2c_set_clientdata(client, eeti);
208204
input_set_drvdata(input, eeti);
209205

210206
error = devm_request_threaded_irq(dev, client->irq,
211207
NULL, eeti_ts_isr,
212-
irq_flags | IRQF_ONESHOT,
208+
IRQF_ONESHOT,
213209
client->name, eeti);
214210
if (error) {
215211
dev_err(dev, "Unable to request touchscreen IRQ: %d\n",

0 commit comments

Comments
 (0)