Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4cdaf32 authored by Wolfram Sang's avatar Wolfram Sang
Browse files

Documentation: i2c: slave: give proper example for pm usage



pm_runtime_forbid was the wrong knob, this is the better one.

Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 38fa8aff
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -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
* implement calls to register/unregister the slave and add those to the
  struct i2c_algorithm. When registering, you probably need to set the i2c
  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
  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
  should use pm_runtime_get_sync() because your device usually needs to be
  on always to be able to detect its slave address. When unregistering, do the
  powered on always to be able to detect its slave address. When unregistering,
  inverse of the above.
  do the inverse of the above.


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