* [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI
@ 2026-03-23 19:01 Dan Carpenter
2026-03-23 19:01 ` [PATCH v6 6/7] gpio: dt-bindings: Add GPIO on top of generic pin control Dan Carpenter
2026-03-24 13:10 ` [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2026-03-23 19:01 UTC (permalink / raw)
To: Linus Walleij, AKASHI Takahiro
Cc: arm-scmi, Bartosz Golaszewski, Conor Dooley, Cristian Marussi,
devicetree, Krzysztof Kozlowski, linux-arm-kernel, linux-gpio,
linux-kernel, Rob Herring, Sudeep Holla, Andy Shevchenko,
Linus Walleij, Bartosz Golaszewski, Vincent Guittot,
Khaled Ali Ahmed, Michal Simek
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/
v6: Fix a build error when CONFIG_PINCONF is disabled
Fix the dt-binding subject and my email address
Use pinconf_to_config_packed() instead of PIN_CONF_PACKED()
v5: Addresses Andy's cleanups to the driver.
Adrresses Krzysztof's comments about the dt spec file.
And almost all the subsystem prefixes were wrong.
v4: Addressed Andy's comments about kernel-doc
Addressed Rob's comments on the spec file
v3: Forward ported Takahiro's patches and added some fixes ups to make
it work on current kernels.
AKASHI Takahiro (3):
pinctrl: introduce pinctrl_gpio_get_config()
gpio: dt-bindings: Add GPIO on top of generic pin control
gpio: gpio-by-pinctrl: add pinctrl based generic GPIO driver
Dan Carpenter (4):
pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
pinctrl: scmi: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
pinctrl: scmi: ignore PIN_CONFIG_PERSIST_STATE
firmware: arm_scmi: Allow PINCTRL_REQUEST to return EOPNOTSUPP
.../bindings/gpio/pin-control-gpio.yaml | 59 ++++++++++
drivers/firmware/arm_scmi/pinctrl.c | 2 +
drivers/gpio/Kconfig | 13 +++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-by-pinctrl.c | 101 ++++++++++++++++++
drivers/pinctrl/core.c | 31 ++++++
drivers/pinctrl/pinconf.h | 6 ++
drivers/pinctrl/pinctrl-scmi.c | 46 +++++---
include/linux/pinctrl/consumer.h | 9 ++
9 files changed, 255 insertions(+), 13 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
create mode 100644 drivers/gpio/gpio-by-pinctrl.c
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v6 6/7] gpio: dt-bindings: Add GPIO on top of generic pin control
2026-03-23 19:01 [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Dan Carpenter
@ 2026-03-23 19:01 ` Dan Carpenter
2026-03-24 13:10 ` [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2026-03-23 19:01 UTC (permalink / raw)
To: Linus Walleij, AKASHI Takahiro
Cc: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-gpio, devicetree, linux-kernel,
Andy Shevchenko, Linus Walleij, Bartosz Golaszewski, arm-scmi,
Vincent Guittot, Khaled Ali Ahmed, Michal Simek
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Traditionally, firmware will provide a GPIO interface or a pin control
interface. However, the SCMI protocol provides a generic pin control
interface and the GPIO support is built on top of that using the normal
pin control interfaces. Potentially, other firmware will adopt a
similar generic approach in the future.
Document how to configure the GPIO device.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
v6: Fix the subject. Sorry!
Fix typo in my email.
Add Krzysztof's reviewed-by tag.
v5: Fix subsystem prefix
Re-word the commit message
I removed all references to the driver. I also removed the
reference to pin muxing because that's described in the pin control
spec file.
Fix 3 vs 4 typo in the example.
v4: Changed additionalProperties: true to false.
Add gpio-line-names.
Deleted one example.
Add r-b tags
v3: Forward port and update
.../bindings/gpio/pin-control-gpio.yaml | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
diff --git a/Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml b/Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
new file mode 100644
index 000000000000..a05cd339253a
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/pin-control-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pin control based generic GPIO controller
+
+description:
+ The pin control-based GPIO will facilitate a pin controller's ability
+ to drive electric lines high/low and other generic properties of a
+ pin controller to perform general-purpose one-bit binary I/O.
+
+maintainers:
+ - Dan Carpenter <dan.carpenter@linaro.org>
+
+properties:
+ compatible:
+ const: scmi-pinctrl-gpio
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-line-names: true
+
+ gpio-ranges: true
+
+ ngpios: true
+
+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ required:
+ - gpio-hog
+
+required:
+ - compatible
+ - gpio-controller
+ - "#gpio-cells"
+ - gpio-ranges
+ - ngpios
+
+additionalProperties: false
+
+examples:
+ - |
+ gpio {
+ compatible = "scmi-pinctrl-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <4>;
+ gpio-line-names = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";
+ gpio-ranges = <&scmi_pinctrl 0 30 4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&keys_pins>;
+ };
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI
2026-03-23 19:01 [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Dan Carpenter
2026-03-23 19:01 ` [PATCH v6 6/7] gpio: dt-bindings: Add GPIO on top of generic pin control Dan Carpenter
@ 2026-03-24 13:10 ` Linus Walleij
2026-03-25 10:24 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2026-03-24 13:10 UTC (permalink / raw)
To: Dan Carpenter
Cc: AKASHI Takahiro, arm-scmi, Bartosz Golaszewski, Conor Dooley,
Cristian Marussi, devicetree, Krzysztof Kozlowski,
linux-arm-kernel, linux-gpio, linux-kernel, Rob Herring,
Sudeep Holla, Andy Shevchenko, Bartosz Golaszewski,
Vincent Guittot, Khaled Ali Ahmed, Michal Simek
On Mon, Mar 23, 2026 at 8:01 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> 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/
>
> v6: Fix a build error when CONFIG_PINCONF is disabled
> Fix the dt-binding subject and my email address
> Use pinconf_to_config_packed() instead of PIN_CONF_PACKED()
v6 applied to this immutable branch:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=ib-scmi-pinctrl-gpio
Then merged into my devel branch for next.
Bartosz, you might want to pull it in!
Dan: thanks for your efforts to fix up the remaining hurdles and
bringing this to completion! Sometimes the last few % of work are
the hardest.
Also thanks to Takahiro for this idea: it worked out just like you
imagined.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI
2026-03-24 13:10 ` [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Linus Walleij
@ 2026-03-25 10:24 ` Bartosz Golaszewski
0 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2026-03-25 10:24 UTC (permalink / raw)
To: Linus Walleij
Cc: Dan Carpenter, AKASHI Takahiro, arm-scmi, Conor Dooley,
Cristian Marussi, devicetree, Krzysztof Kozlowski,
linux-arm-kernel, linux-gpio, linux-kernel, Rob Herring,
Sudeep Holla, Andy Shevchenko, Bartosz Golaszewski,
Vincent Guittot, Khaled Ali Ahmed, Michal Simek
On Tue, Mar 24, 2026 at 2:11 PM Linus Walleij <linusw@kernel.org> wrote:
>
> On Mon, Mar 23, 2026 at 8:01 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> > 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/
> >
> > v6: Fix a build error when CONFIG_PINCONF is disabled
> > Fix the dt-binding subject and my email address
> > Use pinconf_to_config_packed() instead of PIN_CONF_PACKED()
>
> v6 applied to this immutable branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=ib-scmi-pinctrl-gpio
>
> Then merged into my devel branch for next.
>
> Bartosz, you might want to pull it in!
>
> Dan: thanks for your efforts to fix up the remaining hurdles and
> bringing this to completion! Sometimes the last few % of work are
> the hardest.
>
> Also thanks to Takahiro for this idea: it worked out just like you
> imagined.
>
Pulled, thanks!
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-25 10:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 19:01 [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Dan Carpenter
2026-03-23 19:01 ` [PATCH v6 6/7] gpio: dt-bindings: Add GPIO on top of generic pin control Dan Carpenter
2026-03-24 13:10 ` [PATCH v6 0/7] gpio: introduce a GPIO driver for SCMI Linus Walleij
2026-03-25 10:24 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox