[U-Boot] [PATCH V4 4/4] dm: gpio: introduce 74x164 driver

Simon Glass sjg at chromium.org
Sat May 7 21:03:24 CEST 2016


On 2 May 2016 at 20:02, Peng Fan <van.freenix at gmail.com> wrote:
> Introduce driver to support "fairchild,74hc595" devices.
> 1. Take linux drivers/drivers/gpio/gpio-74x164.c as reference.
> 2. Following the naming used in Linux driver with gen_7x164 as the prefix.
> 3. Enable CONFIG_DM_74X164 to use this driver.
> 4. Follow Documentation/devicetree/bindings/gpio/gpio-74x164.txt to add device
>    nodes
> 5. Tested on i.MX6 UltraLite with 74LV595 using gpio command and oscillograph.
>
> Signed-off-by: Peng Fan <van.freenix at gmail.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Masahiro Yamada <yamada.masahiro at socionext.com>
> Cc: Chin Liang See <clsee at altera.com>
> Cc: Bhuvanchandra DV <bhuvanchandra.dv at toradex.com>
> Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> Cc: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
>
> V4:
>  Add Simon's review tag.
>
> V3:
>  Use dm_spi_claim_bus and dm_spi_xfer and dm_spi_release_bus
>  Drop spi_slave from struct gen_74x164_priv.
>
> V2:
>  Address Simon's comments:
>  Drop unused dev entry of gen_74x164_priv
>  Rename gen_74x164_info to gen_74x164_priv
>  Change u8 to uint
>  Change EINVAL to ENOSYS
>  Drop dm_gpio_set_value when probe, since GPIOD_IS_OUT_ACTIVE already
>  active the gpio.
>  Drop complicated spi_get_bus_and_cs, use dev_get_parent_priv.
>  To Kconfig help msg, I add 74lv165 and 75hc595, actually, the linux
>  one does not contain manufacture info.
>
>  drivers/gpio/74x164_gpio.c | 193 +++++++++++++++++++++++++++++++++++++++++++++
>  drivers/gpio/Kconfig       |   8 ++
>  drivers/gpio/Makefile      |   1 +
>  3 files changed, 202 insertions(+)
>  create mode 100644 drivers/gpio/74x164_gpio.c

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list