Skip to content

Commit

Permalink
Input: adp5588-keys - do not explicitly set device as wakeup source
Browse files Browse the repository at this point in the history
I2C core will set up device as a wakeup source and will configure interrupt
as a wakeup interrupt if client is created with I2C_CLIENT_WAKE flag. Let's
rely on this facility and to not unconditionally set up the device as
wakeup device in the driver.

Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20220528045631.289821-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Dmitry Torokhov committed May 31, 2022
1 parent 4560882 commit 0bcbbf2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/input/keyboard/adp5588-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,6 @@ static int adp5588_probe(struct i2c_client *client,
if (error)
return error;

device_init_wakeup(&client->dev, 1);

dev_info(&client->dev, "Rev.%d keypad, irq %d\n", revid, client->irq);
return 0;
}
Expand All @@ -608,19 +606,13 @@ static int __maybe_unused adp5588_suspend(struct device *dev)

disable_irq(client->irq);

if (device_may_wakeup(&client->dev))
enable_irq_wake(client->irq);

return 0;
}

static int __maybe_unused adp5588_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);

if (device_may_wakeup(&client->dev))
disable_irq_wake(client->irq);

enable_irq(client->irq);

return 0;
Expand Down

0 comments on commit 0bcbbf2

Please sign in to comment.