Skip to content

Commit d3176b2

Browse files
committed
Input: tca6416-keypad - rely on I2C core to set up suspend/resume
tca6416_keypad_suspend() and tca6416_keypad_resume() only configure device IRQ for wakeup. I2C core already does this by registering interrupt as a wakeup IRQ in case when device is marked as wakeup-enabled, so we can simply remove this code from the driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 687fe7d commit d3176b2

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

drivers/input/keyboard/tca6416-keypad.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ static int tca6416_keypad_probe(struct i2c_client *client)
287287
}
288288

289289
i2c_set_clientdata(client, chip);
290-
device_init_wakeup(&client->dev, 1);
291290

292291
return 0;
293292

@@ -315,33 +314,9 @@ static void tca6416_keypad_remove(struct i2c_client *client)
315314
kfree(chip);
316315
}
317316

318-
static int tca6416_keypad_suspend(struct device *dev)
319-
{
320-
struct i2c_client *client = to_i2c_client(dev);
321-
322-
if (device_may_wakeup(dev))
323-
enable_irq_wake(client->irq);
324-
325-
return 0;
326-
}
327-
328-
static int tca6416_keypad_resume(struct device *dev)
329-
{
330-
struct i2c_client *client = to_i2c_client(dev);
331-
332-
if (device_may_wakeup(dev))
333-
disable_irq_wake(client->irq);
334-
335-
return 0;
336-
}
337-
338-
static DEFINE_SIMPLE_DEV_PM_OPS(tca6416_keypad_dev_pm_ops,
339-
tca6416_keypad_suspend, tca6416_keypad_resume);
340-
341317
static struct i2c_driver tca6416_keypad_driver = {
342318
.driver = {
343319
.name = "tca6416-keypad",
344-
.pm = pm_sleep_ptr(&tca6416_keypad_dev_pm_ops),
345320
},
346321
.probe = tca6416_keypad_probe,
347322
.remove = tca6416_keypad_remove,

0 commit comments

Comments
 (0)