mbox series

[v2,0/2] gpio: add gpio open-drain & open-source emulation

Message ID 20200505084318.15307-1-narmstrong@baylibre.com
Headers show
Series gpio: add gpio open-drain & open-source emulation | expand

Message

Neil Armstrong May 5, 2020, 8:43 a.m. UTC
When a line is in open-drain or open-source mode, U-Boot doesn't handle it
directly.

Let's add gpio open-drain & open-source emulation in gpio u-class to make
it transparent to driver using a gpio line from DT.

Changes since v1:
- fixed all open-drain/open source cases
- updated dm gpio test

Neil Armstrong (2):
  gpio: emulate open drain & open source in dm_gpio_set_value()
  test: dm: update test for open-drain/open-source emulation in
    gpio-uclass

 arch/sandbox/dts/test.dts  |  4 +-
 drivers/gpio/gpio-uclass.c | 15 +++++++
 test/dm/gpio.c             | 89 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+), 1 deletion(-)

Comments

Neil Armstrong May 11, 2020, 1:09 p.m. UTC | #1
On 05/05/2020 10:43, Neil Armstrong wrote:
> When a line is in open-drain or open-source mode, U-Boot doesn't handle it
> directly.
> 
> Let's add gpio open-drain & open-source emulation in gpio u-class to make
> it transparent to driver using a gpio line from DT.
> 
> Changes since v1:
> - fixed all open-drain/open source cases
> - updated dm gpio test
> 
> Neil Armstrong (2):
>   gpio: emulate open drain & open source in dm_gpio_set_value()
>   test: dm: update test for open-drain/open-source emulation in
>     gpio-uclass
> 
>  arch/sandbox/dts/test.dts  |  4 +-
>  drivers/gpio/gpio-uclass.c | 15 +++++++
>  test/dm/gpio.c             | 89 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 107 insertions(+), 1 deletion(-)
> 

Applying to u-boot-amlogic

Thanks for reviewing.

Neil