25 Nov, 2019

6 commits

  • Add pinctrl comsuser header file that defile the pintrl
    interfaces for different configs define.

    Reported-by: Ran Wang
    Signed-off-by: Fugang Duan
    Tested-by: Ran Wang

    Fugang Duan
     
  • The reset PIN may loss its state when system suspend due to GPIO
    controller power off. Set pinctrl as "sleep" state to keep PIN
    voltage during system suspend, and configurate pinctrl as "default"
    state after system resume back. Because GPIO resume back earlier
    than gpio-reset, then GPIO signal can control the PIN voltage again.

    Reviewed-by: Richard Zhu
    Signed-off-by: Fugang Duan
    Signed-off-by: Arulpandiyan Vadivel
    Signed-off-by: Shrikant Bobade
    (cherry picked from commit ea5a9cdc1941afc36fd0f5a223ea762b85512130)

    Andy Duan
     
  • Some devices need to wait for some milliseconds after reset, so add
    post reset delay in the gpio-reset chip.

    The post reset delay is optional.

    Signed-off-by: Fugang Duan
    Signed-off-by: Arulpandiyan Vadivel

    Fugang Duan
     
  • Use the cansleep variant of the GPIO API.

    Signed-off-by: Fugang Duan
    Signed-off-by: Arulpandiyan Vadivel

    Andy Duan
     
  • It's a little bit late to register gpio-reset driver at module_init
    time, because gpio-reset provides reset control via gpio for other
    devices which are mostly probed at module_init time too. And it
    becomes even worse, when the gpio comes from IO expander on I2C bus,
    e.g. pca953x. In that case, gpio-reset needs to be ready before I2C
    bus driver which is generally ready at subsys_initcall time. Let's
    register gpio-reset driver in arch_initcall() to have it ready early
    enough.

    The defer probe mechanism is not used here, because a reset controller
    driver should be reasonably registered early than other devices. More
    importantly, defer probe doe not help in some nasty cases, e.g. the
    gpio-pca953x device itself needs a reset from gpio-reset driver start
    working.

    [shawn.guo: cherry-pick commit 7153f05108ef from imx_3.10.y]
    Signed-off-by: Shawn Guo

    (cherry picked from commit 11e3543010d4ed50db78a5fc809f24c89e8c6e30)
    Signed-off-by: Arulpandiyan Vadivel

    Shawn Guo
     
  • This driver implements a reset controller device that toggle a gpio
    connected to a reset pin of a peripheral IC. The delay between assertion
    and de-assertion of the reset signal can be configured via device tree.

    Signed-off-by: Philipp Zabel
    Reviewed-by: Stephen Warren
    Reviewed-by: Pavel Machek
    Signed-off-by: Shawn Guo
    Signed-off-by: Arulpandiyan Vadivel

    Philipp Zabel