Skip to content

Commit

Permalink
Documentation: i2c: slave: give proper example for pm usage
Browse files Browse the repository at this point in the history
pm_runtime_forbid was the wrong knob, this is the better one.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Wolfram Sang committed Jul 23, 2016
1 parent 38fa8af commit b4cdaf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Documentation/i2c/slave-interface
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ If you want to add slave support to the bus driver:
* implement calls to register/unregister the slave and add those to the
struct i2c_algorithm. When registering, you probably need to set the i2c
slave address and enable slave specific interrupts. If you use runtime pm, you
should use pm_runtime_forbid() because your device usually needs to be powered
on always to be able to detect its slave address. When unregistering, do the
inverse of the above.
should use pm_runtime_get_sync() because your device usually needs to be
powered on always to be able to detect its slave address. When unregistering,
do the inverse of the above.

* Catch the slave interrupts and send appropriate i2c_slave_events to the backend.

Expand Down

0 comments on commit b4cdaf3

Please sign in to comment.