OSDN Git Service

i2c: recovery: require either get_sda or set_sda
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 10 Jul 2018 21:42:16 +0000 (23:42 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 17 Jul 2018 08:41:55 +0000 (10:41 +0200)
commitffc59c496bf8498657321c59433f55bbcf2d9c38
tree9dc18ae36f5b5d1ad5e8b9195d2b7e5ef181307c
parent08948b75939f72bd013699963cc7187f25197653
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>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h