[PATCH v3 0/7] gpio: introduce a gpio driver for SCMI

Dan Carpenter posted 7 patches 3 weeks, 5 days ago
There is a newer version of this series
.../bindings/gpio/pin-control-gpio.yaml       |  70 ++++++++++
drivers/firmware/arm_scmi/pinctrl.c           |   2 +
drivers/gpio/Kconfig                          |   7 +
drivers/gpio/Makefile                         |   1 +
drivers/gpio/gpio-by-pinctrl.c                | 124 ++++++++++++++++++
drivers/pinctrl/core.c                        |  30 +++++
drivers/pinctrl/pinctrl-scmi.c                |  46 +++++--
include/linux/pinctrl/consumer.h              |   9 ++
8 files changed, 276 insertions(+), 13 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
create mode 100644 drivers/gpio/gpio-by-pinctrl.c
[PATCH v3 0/7] gpio: introduce a gpio driver for SCMI
Posted by Dan Carpenter 3 weeks, 5 days ago
This basically abandons my earlier attempts and goes back to Takahiro
Akashi's driver.  Here is the link to Takahiro's patchset:

https://lore.kernel.org/all/20231005025843.508689-1-takahiro.akashi@linaro.org/

In the review comments, to that patchset we had discussed putting the
gpio section inside the pinctrl section.  The ordering problems are a
bit tricky because you want the pinctrl driver to finish probing before
you start probing the gpio driver.  To me it seems nicer to put the
pinctrl things such as pinmuxing in the pinctrl block and the gpio things
in the gpio block.

I updated Takahiro's patch to work on current kernels.  I've had added a
few other patches to make things work on current kernels.  The most
noteworthy change is that instead of calculating the ngpios, I changed
it so you have to specify the ngpios in the device tree.

I updated the device tree spec file to address review comments.  I
changed the compatible to scmi-pinctrl-gpio.  I also updated the
examples to show how pinmuxing works.  I didn't know how to include all
the potential GPIO configuration options so I set
"additionalProperties: true".  Hopefully, that's okay.

AKASHI Takahiro (3):
  pinctrl: introduce pinctrl_gpio_get_config()
  dt-bindings: gpio: Add bindings for pinctrl based generic gpio driver
  gpio: add pinctrl based generic gpio driver

Dan Carpenter (4):
  pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
  pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
  pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE
  arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP

 .../bindings/gpio/pin-control-gpio.yaml       |  70 ++++++++++
 drivers/firmware/arm_scmi/pinctrl.c           |   2 +
 drivers/gpio/Kconfig                          |   7 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-by-pinctrl.c                | 124 ++++++++++++++++++
 drivers/pinctrl/core.c                        |  30 +++++
 drivers/pinctrl/pinctrl-scmi.c                |  46 +++++--
 include/linux/pinctrl/consumer.h              |   9 ++
 8 files changed, 276 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
 create mode 100644 drivers/gpio/gpio-by-pinctrl.c

-- 
2.51.0