diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-09-10 20:54:21 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-10-30 10:42:37 +0300 |
commit | 7bb75029ef34838604357350b4f24d6535e9d01f (patch) | |
tree | 308c8bd845eacf62c4fbc29b03783cd569f83fdd /arch/blackfin/mach-bf533/boards/blackstamp.c | |
parent | f926dfc112bc6cf41d7068ee5e3f261e13a5bec8 (diff) | |
download | linux-7bb75029ef34838604357350b4f24d6535e9d01f.tar.xz |
i2c: gpio: Enforce open drain through gpiolib
The I2C GPIO bitbang driver currently emulates open drain
behaviour by implementing what the gpiolib already does:
not actively driving the line high, instead setting it to
input.
This makes no sense. Use the new facility in gpiolib to
request the lines enforced into open drain mode, and let
the open drain emulation already present in the gpiolib
kick in and handle this.
As a bonus: if the GPIO driver in the back-end actually
supports open drain in hardware using the .set_config()
callback, it will be utilized. That's correct: we never
used that hardware feature before, instead relying on
emulating open drain even if the GPIO controller could
actually handle this for us.
Users will sometimes get messages like this:
gpio-485 (?): enforced open drain please flag it properly
in DT/ACPI DSDT/board file
gpio-486 (?): enforced open drain please flag it properly
in DT/ACPI DSDT/board file
i2c-gpio gpio-i2c: using lines 485 (SDA) and 486 (SCL)
Which is completely proper: since the line is used as
open drain, it should actually be flagged properly with
e.g.
gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>,
<&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
Or similar facilities in board file descriptor tables
or ACPI DSDT.
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/blackstamp.c')
0 files changed, 0 insertions, 0 deletions