-
- Downloads
i2c: iop: Use GPIO descriptors
The IOP3xx has some elaborate code to directly slam the GPIO lines multiplexed with I2C down low before enablement, apparently a workaround for a hardware bug found in the early chips. After consulting the developer documentation for IOP80321 and IOP80331 I can clearly see that this may be useful for IOP80321 family (mach-iop32x) but it is highly dubious for any 80331 series or later chip: in these chips the lines are not multiplexed for UARTs. We convert the code to pass optional GPIO descriptors and register these only on the 80321-based boards where it makes sense, optionally obtain them in the driver and use the gpiod_set_raw_value() to ascertain the line gets driven low when needed. The GPIO driver does not give the GPIO chip a reasonable label so the patch also adds that so that these machine descriptor tables can be used. Signed-off-by:Linus Walleij <linus.walleij@linaro.org> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Dan Williams <dan.j.williams@intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
Showing
- arch/arm/include/asm/hardware/iop3xx.h 2 additions, 0 deletionsarch/arm/include/asm/hardware/iop3xx.h
- arch/arm/mach-iop32x/em7210.c 3 additions, 0 deletionsarch/arm/mach-iop32x/em7210.c
- arch/arm/mach-iop32x/glantank.c 3 additions, 0 deletionsarch/arm/mach-iop32x/glantank.c
- arch/arm/mach-iop32x/iq31244.c 3 additions, 0 deletionsarch/arm/mach-iop32x/iq31244.c
- arch/arm/mach-iop32x/iq80321.c 3 additions, 0 deletionsarch/arm/mach-iop32x/iq80321.c
- arch/arm/mach-iop32x/n2100.c 2 additions, 0 deletionsarch/arm/mach-iop32x/n2100.c
- arch/arm/plat-iop/i2c.c 24 additions, 0 deletionsarch/arm/plat-iop/i2c.c
- drivers/gpio/gpio-iop.c 1 addition, 0 deletionsdrivers/gpio/gpio-iop.c
- drivers/i2c/busses/i2c-iop3xx.c 21 additions, 11 deletionsdrivers/i2c/busses/i2c-iop3xx.c
- drivers/i2c/busses/i2c-iop3xx.h 2 additions, 0 deletionsdrivers/i2c/busses/i2c-iop3xx.h
Loading
Please register or sign in to comment