Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141820
b: refs/heads/master
c: 0935ade
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Apr 2, 2009
1 parent e5bbf2c commit 3d36672
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: faa9fa8e448ba4c0a9d61778fd3cda1313bf1533
refs/heads/master: 0935ade0bf6baf9c5f23024102737bdaf7075abc
23 changes: 23 additions & 0 deletions trunk/drivers/input/touchscreen/migor_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static int migor_ts_probe(struct i2c_client *client,
goto err2;
}

device_init_wakeup(&client->dev, 1);
return 0;

err2:
Expand All @@ -224,6 +225,26 @@ static int migor_ts_remove(struct i2c_client *client)
return 0;
}

static int migor_ts_suspend(struct i2c_client *client, pm_message_t mesg)
{
struct migor_ts_priv *priv = dev_get_drvdata(&client->dev);

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

return 0;
}

static int migor_ts_resume(struct i2c_client *client)
{
struct migor_ts_priv *priv = dev_get_drvdata(&client->dev);

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

return 0;
}

static const struct i2c_device_id migor_ts_id[] = {
{ "migor_ts", 0 },
{ }
Expand All @@ -236,6 +257,8 @@ static struct i2c_driver migor_ts_driver = {
},
.probe = migor_ts_probe,
.remove = migor_ts_remove,
.suspend = migor_ts_suspend,
.resume = migor_ts_resume,
.id_table = migor_ts_id,
};

Expand Down

0 comments on commit 3d36672

Please sign in to comment.