i2c: gpio: support write-only sda/scl w/o pull-up
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 18 Jan 2023 21:55:12 +0000 (22:55 +0100)
committerWolfram Sang <wsa@kernel.org>
Mon, 23 Jan 2023 22:18:54 +0000 (23:18 +0100)
commit8786b095df02c1b881643146869a7d6f80411e6a
tree541f37aca6742f571b6bb44098818675c916d984
parent9dfee1487c271b7904e38dea5bed8f6e2d058dc3
i2c: gpio: support write-only sda/scl w/o pull-up

There are slave devices that understand I2C but have read-only SDA and
SCL. Examples are FD650 7-segment LED controller and its derivatives.
Typical board designs don't even have a pull-up for both pins.
Handle the new attributes for write-only SDA and missing pull-up on
SDA/SCL.

For either pin the open-drain and has-no-pullup properties are
mutually-exclusive, what is documented in the DT property documentation.
We don't add an extra warning here because the open-drain properties
are marked deprecated anyway.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
[wsa: switched to device properties]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-gpio.c
include/linux/platform_data/i2c-gpio.h