
On 25 April 2016 at 19:20, Peng Fan van.freenix@gmail.com wrote:
Introduce driver to support "fairchild,74hc595" devices.
- Take linux drivers/drivers/gpio/gpio-74x164.c as reference.
- Following the naming used in Linux driver with gen_7x164 as the prefix.
- Enable CONFIG_DM_74X164 to use this driver.
- Follow Documentation/devicetree/bindings/gpio/gpio-74x164.txt to add device nodes
- Tested on i.MX6 UltraLite with 74LV595 using gpio command and oscillograph.
Signed-off-by: Peng Fan van.freenix@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Masahiro Yamada yamada.masahiro@socionext.com Cc: Chin Liang See clsee@altera.com Cc: Bhuvanchandra DV bhuvanchandra.dv@toradex.com Cc: Daniel Schwierzeck daniel.schwierzeck@gmail.com Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Stefano Babic sbabic@denx.de
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.
Very nice
Reviewed-by: Simon Glass sjg@chromium.org