diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-07-11 00:42:16 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-07-17 11:41:55 +0300 |
commit | ffc59c496bf8498657321c59433f55bbcf2d9c38 (patch) | |
tree | 9dc18ae36f5b5d1ad5e8b9195d2b7e5ef181307c /include/linux/i2c.h | |
parent | 08948b75939f72bd013699963cc7187f25197653 (diff) | |
download | linux-ffc59c496bf8498657321c59433f55bbcf2d9c38.tar.xz |
i2c: recovery: require either get_sda or set_sda
For bus recovery, we either need to bail out early if we can read SDA or
we need to send STOP after every pulse. Otherwise recovery might be
misinterpreted as an unwanted write. So, require one of those SDA
handling functions to avoid this problem.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 24acd69c8874..4c4360f94786 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -581,12 +581,12 @@ struct i2c_timings { * recovery. Populated internally for generic GPIO recovery. * @set_scl: This sets/clears the SCL line. Mandatory for generic SCL recovery. * Populated internally for generic GPIO recovery. - * @get_sda: This gets current value of SDA line. Optional for generic SCL - * recovery. Populated internally, if sda_gpio is a valid GPIO, for generic - * GPIO recovery. - * @set_sda: This sets/clears the SDA line. Optional for generic SCL recovery. - * Populated internally, if sda_gpio is a valid GPIO, for generic GPIO - * recovery. + * @get_sda: This gets current value of SDA line. This or set_sda() is mandatory + * for generic SCL recovery. Populated internally, if sda_gpio is a valid + * GPIO, for generic GPIO recovery. + * @set_sda: This sets/clears the SDA line. This or get_sda() is mandatory for + * generic SCL recovery. Populated internally, if sda_gpio is a valid GPIO, + * for generic GPIO recovery. * @prepare_recovery: This will be called before starting recovery. Platform may * configure padmux here for SDA/SCL line or something else they want. * @unprepare_recovery: This will be called after completing recovery. Platform |