Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188056
b: refs/heads/master
c: fdba2bb
h: refs/heads/master
v: v3
  • Loading branch information
Ranjith Lohithakshan authored and Dmitry Torokhov committed Mar 11, 2010
1 parent e30fb0f commit da731c4
Show file tree
Hide file tree
Showing 3 changed files with 12 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: 04b4b88cca0ebe3813b4b6f014fb6a0db380b137
refs/heads/master: fdba2bb1f2eed85085a0fe154e1acb82de3239f7
10 changes: 10 additions & 0 deletions trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,9 @@ static int ads7846_suspend(struct spi_device *spi, pm_message_t message)

spin_unlock_irq(&ts->lock);

if (device_may_wakeup(&ts->spi->dev))
enable_irq_wake(ts->spi->irq);

return 0;

}
Expand All @@ -830,6 +833,9 @@ static int ads7846_resume(struct spi_device *spi)
{
struct ads7846 *ts = dev_get_drvdata(&spi->dev);

if (device_may_wakeup(&ts->spi->dev))
disable_irq_wake(ts->spi->irq);

spin_lock_irq(&ts->lock);

ts->is_suspended = 0;
Expand Down Expand Up @@ -1201,6 +1207,8 @@ static int __devinit ads7846_probe(struct spi_device *spi)
if (err)
goto err_remove_attr_group;

device_init_wakeup(&spi->dev, pdata->wakeup);

return 0;

err_remove_attr_group:
Expand Down Expand Up @@ -1230,6 +1238,8 @@ static int __devexit ads7846_remove(struct spi_device *spi)
{
struct ads7846 *ts = dev_get_drvdata(&spi->dev);

device_init_wakeup(&spi->dev, false);

ads784x_hwmon_unregister(spi, ts);
input_unregister_device(ts->input);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/spi/ads7846.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ struct ads7846_platform_data {
int (*filter) (void *filter_data, int data_idx, int *val);
void (*filter_cleanup)(void *filter_data);
void (*wait_for_sync)(void);
bool wakeup;
};

0 comments on commit da731c4

Please sign in to comment.