mbox series

[0/4] rockchip: support configuring pins as input

Message ID 20220328005005.72492-1-kc@postmarketos.org (mailing list archive)
Headers show
Series rockchip: support configuring pins as input | expand

Message

Caleb Connolly March 28, 2022, 12:50 a.m. UTC
Add support for configuring pins as input to the rockchip pinctrl
driver. This is required for example for devices which use non-standard
configurations for gpio interrupts, specifically for the light/proximity
sensor on the RK3399 powered PinePhone Pro (which will be coming
upstream in a future patch series).

Due to the complicated layout of the RK pinctrl/gpio drivers, some extra
work is required to handle deferring the GPIO configuration. On RK3399
the pinctrl driver always probes before the GPIO controller driver, so
the PIN_CONFIG_OUTPUT and PIN_CONFIG_INPUT_ENABLE params both have to be
deferred, this series also reworks the deferred pin handling to be
generic and support any param rather than only the PIN_CONFIG_OUTPUT
param.

---
Caleb Connolly (4):
  pinctrl/rockchip: support deferring other gpio params
  pinctrl/rockchip: support setting input-enable param
  gpio/rockchip: handle deferring input-enable pinconfs
  arm64: dts: rockchip: rk3399: add an input enable pinconf

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 16 ++++++
 drivers/gpio/gpio-rockchip.c             | 29 ++++++++---
 drivers/pinctrl/pinctrl-rockchip.c       | 64 +++++++++++++++---------
 drivers/pinctrl/pinctrl-rockchip.h       |  7 ++-
 4 files changed, 81 insertions(+), 35 deletions(-)

Comments

Linus Walleij April 19, 2022, 10:37 p.m. UTC | #1
Hi Caleb,

On Mon, Mar 28, 2022 at 2:50 AM Caleb Connolly <kc@postmarketos.org> wrote:

 Caleb Connolly (4):
>   pinctrl/rockchip: support deferring other gpio params
>   pinctrl/rockchip: support setting input-enable param
>   gpio/rockchip: handle deferring input-enable pinconfs

Those three applied to the pinctrl tree.

>   arm64: dts: rockchip: rk3399: add an input enable pinconf

Please submit this through the SoC tree.

Yours,
Linus Walleij
Heiko Stuebner April 30, 2022, 2:05 p.m. UTC | #2
On Mon, 28 Mar 2022 01:50:01 +0100, Caleb Connolly wrote:
> Add support for configuring pins as input to the rockchip pinctrl
> driver. This is required for example for devices which use non-standard
> configurations for gpio interrupts, specifically for the light/proximity
> sensor on the RK3399 powered PinePhone Pro (which will be coming
> upstream in a future patch series).
> 
> Due to the complicated layout of the RK pinctrl/gpio drivers, some extra
> work is required to handle deferring the GPIO configuration. On RK3399
> the pinctrl driver always probes before the GPIO controller driver, so
> the PIN_CONFIG_OUTPUT and PIN_CONFIG_INPUT_ENABLE params both have to be
> deferred, this series also reworks the deferred pin handling to be
> generic and support any param rather than only the PIN_CONFIG_OUTPUT
> param.

Applied, thanks!

[4/4] arm64: dts: rockchip: rk3399: add an input enable pinconf
      commit: ec48c3e82ca36a66ae37ba8b1fdb9a7561dcab14

Best regards,