summaryrefslogtreecommitdiff
path: root/Documentation/i2c/writing-clients
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-30 17:52:31 +0100
committerWolfram Sang <wsa@the-dreams.de>2014-12-04 19:09:03 +0100
commit5f835cef770fc71263ace29198a9e6743033a705 (patch)
treea87214fb62079c6766f97950386e40dd28aee807 /Documentation/i2c/writing-clients
parent530834b13feff543a49b214eb750e97fbd7a22be (diff)
Documentation: i2c: Use PM ops instead of legacy suspend/resume
New drivers should use PM ops instead of the legacy suspend/resume callbacks. Update the I2C device driver guides to reflect this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'Documentation/i2c/writing-clients')
-rw-r--r--Documentation/i2c/writing-clients8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 6b344b516bff..a755b141fa4a 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -36,6 +36,7 @@ MODULE_DEVICE_TABLE(i2c, foo_idtable);
static struct i2c_driver foo_driver = {
.driver = {
.name = "foo",
+ .pm = &foo_pm_ops, /* optional */
},
.id_table = foo_idtable,
@@ -47,8 +48,6 @@ static struct i2c_driver foo_driver = {
.address_list = normal_i2c,
.shutdown = foo_shutdown, /* optional */
- .suspend = foo_suspend, /* optional */
- .resume = foo_resume, /* optional */
.command = foo_command, /* optional, deprecated */
}
@@ -279,8 +278,9 @@ Power Management
If your I2C device needs special handling when entering a system low
power state -- like putting a transceiver into a low power mode, or
-activating a system wakeup mechanism -- do that in the suspend() method.
-The resume() method should reverse what the suspend() method does.
+activating a system wakeup mechanism -- do that by implementing the
+appropriate callbacks for the dev_pm_ops of the driver (like suspend
+and resume).
These are standard driver model calls, and they work just like they
would for any other driver stack. The calls can sleep, and can use