diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2013-04-10 02:36:42 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-04-15 18:18:45 +0200 |
commit | 43452335224bc0cbd605c6aee82b5c9c33e94cc6 (patch) | |
tree | b63a20048c0ae7527103035f6656b7f5ff8d533f /drivers/i2c/busses/i2c-designware-platdrv.c | |
parent | i2c-designware: use usleep_range() in the busy-loop (diff) | |
download | linux-43452335224bc0cbd605c6aee82b5c9c33e94cc6.tar.xz linux-43452335224bc0cbd605c6aee82b5c9c33e94cc6.zip |
i2c-designware: switch to use runtime PM autosuspend
Using autosuspend helps to reduce the resume latency in situations where
another I2C message is going to be started soon. For example with HID over
I2C touch panels we get several messages in a short period of time while
the touch panel is in use.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-platdrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 2a596dd1ec66..dec939aca588 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -173,9 +173,10 @@ static int dw_i2c_probe(struct platform_device *pdev) /* Increase reference counter */ get_device(&pdev->dev); + pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); + pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); - pm_runtime_put(&pdev->dev); return 0; } |