summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf533
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-09-10 19:26:22 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-10-30 08:42:31 +0100
commitf926dfc112bc6cf41d7068ee5e3f261e13a5bec8 (patch)
tree07ed8f8beb6804d1623c0686d33335584ba04217 /arch/blackfin/mach-bf533
parentb2e63555592f81331c8da3afaa607d8cf83e8138 (diff)
gpio: Make it possible for consumers to enforce open drain
Some busses, like I2C, strictly need to have the line handled as open drain, i.e. not actively driven high. For this reason the i2c-gpio.c bit-banged I2C driver is reimplementing open drain handling outside of gpiolib. This is not very optimal. Instead make it possible for a consumer to explcitly express that the line must be handled as open drain instead of allowing local hacks papering over this issue. The descriptor tables, whether DT, ACPI or board files, should of course have flagged these lines as open drain. E.g.: enum gpio_lookup_flags GPIO_OPEN_DRAIN for a board file, or gpios = <&foo 42 GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN>; in a device tree using <dt-bindings/gpio/gpio.h> But more often than not, these descriptors are wrong. So we need to make it possible for consumers to enforce this open drain behaviour. We now have two new enumerated GPIO descriptor config flags: GPIOD_OUT_LOW_OPEN_DRAIN and GPIOD_OUT_HIGH_OPEN_DRAIN that will set up the lined enforced as open drain as output low or high, using open drain (if the driver supports it) or using open drain emulation (setting the line as input to drive it high) from the gpiolib core. Cc: linux-gpio@vger.kernel.org Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/blackfin/mach-bf533')
0 files changed, 0 insertions, 0 deletions