* [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI
@ 2026-03-11 19:37 Dan Carpenter
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Dan Carpenter @ 2026-03-11 19:37 UTC (permalink / raw)
To: Linus Walleij, AKASHI Takahiro
Cc: arm-scmi, Bartosz Golaszewski, Conor Dooley, Cristian Marussi,
Dan Carpenter, devicetree, Krzysztof Kozlowski, linux-arm-kernel,
linux-gpio, linux-kernel, Rob Herring, Sudeep Holla,
Andy Shevchenko, Linus Walleij, Bartosz Golaszewski, 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/
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
2026-03-11 19:37 [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Dan Carpenter
@ 2026-03-11 19:38 ` Dan Carpenter
2026-03-11 21:46 ` Linus Walleij
2026-03-12 15:27 ` Sudeep Holla
2026-03-11 19:38 ` [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support Dan Carpenter
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Dan Carpenter @ 2026-03-11 19:38 UTC (permalink / raw)
To: Sudeep Holla, AKASHI Takahiro
Cc: Cristian Marussi, Linus Walleij, arm-scmi, linux-arm-kernel,
linux-gpio, linux-kernel, Andy Shevchenko, Bartosz Golaszewski
The PIN_CONFIG_LEVEL parameter represents the value of the pin, whether
reading or writing to the pin. In SCMI, the parameter is represented by
two different values SCMI_PIN_OUTPUT_VALUE for writing to a pin and
SCMI_PIN_INPUT_VALUE for reading. The current code translates
PIN_CONFIG_LEVEL as SCMI_PIN_OUTPUT_VALUE (writing).
Add a function to translate it to either INPUT or OUTPUT depending on
whether it is called from a _get or _set() operation.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/pinctrl/pinctrl-scmi.c | 33 ++++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index f4f296e07be5..5d347e6b2e4c 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -251,9 +251,6 @@ static int pinctrl_scmi_map_pinconf_type(enum pin_config_param param,
case PIN_CONFIG_MODE_LOW_POWER:
*type = SCMI_PIN_LOW_POWER_MODE;
break;
- case PIN_CONFIG_LEVEL:
- *type = SCMI_PIN_OUTPUT_VALUE;
- break;
case PIN_CONFIG_OUTPUT_ENABLE:
*type = SCMI_PIN_OUTPUT_MODE;
break;
@@ -276,6 +273,28 @@ static int pinctrl_scmi_map_pinconf_type(enum pin_config_param param,
return 0;
}
+static int pinctrl_scmi_map_pinconf_type_get(enum pin_config_param param,
+ enum scmi_pinctrl_conf_type *type)
+{
+ if (param == PIN_CONFIG_LEVEL) {
+ *type = SCMI_PIN_INPUT_VALUE;
+ return 0;
+ }
+
+ return pinctrl_scmi_map_pinconf_type(param, type);
+}
+
+static int pinctrl_scmi_map_pinconf_type_set(enum pin_config_param param,
+ enum scmi_pinctrl_conf_type *type)
+{
+ if (param == PIN_CONFIG_LEVEL) {
+ *type = SCMI_PIN_OUTPUT_VALUE;
+ return 0;
+ }
+
+ return pinctrl_scmi_map_pinconf_type(param, type);
+}
+
static int pinctrl_scmi_pinconf_get(struct pinctrl_dev *pctldev,
unsigned int pin, unsigned long *config)
{
@@ -290,7 +309,7 @@ static int pinctrl_scmi_pinconf_get(struct pinctrl_dev *pctldev,
config_type = pinconf_to_config_param(*config);
- ret = pinctrl_scmi_map_pinconf_type(config_type, &type);
+ ret = pinctrl_scmi_map_pinconf_type_get(config_type, &type);
if (ret)
return ret;
@@ -363,7 +382,7 @@ static int pinctrl_scmi_pinconf_set(struct pinctrl_dev *pctldev,
for (i = 0; i < num_configs; i++) {
param = pinconf_to_config_param(configs[i]);
- ret = pinctrl_scmi_map_pinconf_type(param, &p_config_type[i]);
+ ret = pinctrl_scmi_map_pinconf_type_set(param, &p_config_type[i]);
if (ret) {
dev_err(pmx->dev, "Error map pinconf_type %d\n", ret);
goto free_config;
@@ -405,7 +424,7 @@ static int pinctrl_scmi_pinconf_group_set(struct pinctrl_dev *pctldev,
for (i = 0; i < num_configs; i++) {
param = pinconf_to_config_param(configs[i]);
- ret = pinctrl_scmi_map_pinconf_type(param, &p_config_type[i]);
+ ret = pinctrl_scmi_map_pinconf_type_set(param, &p_config_type[i]);
if (ret) {
dev_err(pmx->dev, "Error map pinconf_type %d\n", ret);
goto free_config;
@@ -440,7 +459,7 @@ static int pinctrl_scmi_pinconf_group_get(struct pinctrl_dev *pctldev,
return -EINVAL;
config_type = pinconf_to_config_param(*config);
- ret = pinctrl_scmi_map_pinconf_type(config_type, &type);
+ ret = pinctrl_scmi_map_pinconf_type_get(config_type, &type);
if (ret) {
dev_err(pmx->dev, "Error map pinconf_type %d\n", ret);
return ret;
--
2.51.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
2026-03-11 19:37 [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Dan Carpenter
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
@ 2026-03-11 19:38 ` Dan Carpenter
2026-03-11 21:48 ` Linus Walleij
2026-03-11 19:38 ` [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE Dan Carpenter
2026-03-11 19:39 ` [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP Dan Carpenter
3 siblings, 1 reply; 11+ messages in thread
From: Dan Carpenter @ 2026-03-11 19:38 UTC (permalink / raw)
To: Sudeep Holla, Peng Fan, AKASHI Takahiro
Cc: Cristian Marussi, Linus Walleij, arm-scmi, linux-arm-kernel,
linux-gpio, linux-kernel, Andy Shevchenko, Bartosz Golaszewski
The argument for PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS is supposed to
be expressed in terms of ohms. But the pinctrl-scmi driver was
implementing it the same as PIN_CONFIG_OUTPUT and writing either a
zero or one to the pin.
The SCMI protocol doesn't have an support configuration type so just
delete this code instead of replacing it.
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
Hi Peng, could you Ack this patch? I could drop it, since obviously
it doesn't affect my stuff at all but it's the right thing to do.
drivers/pinctrl/pinctrl-scmi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index 5d347e6b2e4c..de8c113bc61d 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -254,9 +254,6 @@ static int pinctrl_scmi_map_pinconf_type(enum pin_config_param param,
case PIN_CONFIG_OUTPUT_ENABLE:
*type = SCMI_PIN_OUTPUT_MODE;
break;
- case PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS:
- *type = SCMI_PIN_OUTPUT_VALUE;
- break;
case PIN_CONFIG_POWER_SOURCE:
*type = SCMI_PIN_POWER_SOURCE;
break;
--
2.51.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE
2026-03-11 19:37 [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Dan Carpenter
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
2026-03-11 19:38 ` [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support Dan Carpenter
@ 2026-03-11 19:38 ` Dan Carpenter
2026-03-11 21:49 ` Linus Walleij
2026-03-11 19:39 ` [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP Dan Carpenter
3 siblings, 1 reply; 11+ messages in thread
From: Dan Carpenter @ 2026-03-11 19:38 UTC (permalink / raw)
To: Sudeep Holla, AKASHI Takahiro
Cc: Cristian Marussi, Linus Walleij, arm-scmi, linux-arm-kernel,
linux-gpio, linux-kernel, Andy Shevchenko, Bartosz Golaszewski
The PIN_CONFIG_PERSIST_STATE setting ensures that the pin state persists
across a sleep or controller reset. The SCMI spec does not have an
equivalent command to this so just ignore it.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/pinctrl/pinctrl-scmi.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index de8c113bc61d..f22be6b7b82a 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -361,7 +361,7 @@ static int pinctrl_scmi_pinconf_set(struct pinctrl_dev *pctldev,
unsigned long *configs,
unsigned int num_configs)
{
- int i, ret;
+ int i, cnt, ret;
struct scmi_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev);
enum scmi_pinctrl_conf_type config_type[SCMI_NUM_CONFIGS];
u32 config_value[SCMI_NUM_CONFIGS];
@@ -377,17 +377,21 @@ static int pinctrl_scmi_pinconf_set(struct pinctrl_dev *pctldev,
if (ret)
return ret;
+ cnt = 0;
for (i = 0; i < num_configs; i++) {
param = pinconf_to_config_param(configs[i]);
- ret = pinctrl_scmi_map_pinconf_type_set(param, &p_config_type[i]);
+ if (param == PIN_CONFIG_PERSIST_STATE)
+ continue;
+ ret = pinctrl_scmi_map_pinconf_type_set(param, &p_config_type[cnt]);
if (ret) {
dev_err(pmx->dev, "Error map pinconf_type %d\n", ret);
goto free_config;
}
- p_config_value[i] = pinconf_to_config_argument(configs[i]);
+ p_config_value[cnt] = pinconf_to_config_argument(configs[i]);
+ cnt++;
}
- ret = pinctrl_ops->settings_conf(pmx->ph, pin, PIN_TYPE, num_configs,
+ ret = pinctrl_ops->settings_conf(pmx->ph, pin, PIN_TYPE, cnt,
p_config_type, p_config_value);
if (ret)
dev_err(pmx->dev, "Error parsing config %d\n", ret);
--
2.51.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP
2026-03-11 19:37 [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Dan Carpenter
` (2 preceding siblings ...)
2026-03-11 19:38 ` [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE Dan Carpenter
@ 2026-03-11 19:39 ` Dan Carpenter
2026-03-11 21:50 ` Linus Walleij
2026-03-12 15:25 ` Sudeep Holla
3 siblings, 2 replies; 11+ messages in thread
From: Dan Carpenter @ 2026-03-11 19:39 UTC (permalink / raw)
To: Sudeep Holla, AKASHI Takahiro
Cc: Cristian Marussi, arm-scmi, linux-arm-kernel, linux-kernel,
Andy Shevchenko, Linus Walleij, Bartosz Golaszewski, linux-gpio
The SCMI protocol specification says that the PINCTRL_REQUEST and
PINCTRL_RELEASE commands are optional. So if the SCMI server returns
-EOPNOTSUPP, then treat that as success and continue.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/firmware/arm_scmi/pinctrl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/arm_scmi/pinctrl.c b/drivers/firmware/arm_scmi/pinctrl.c
index a020e23d7c49..42cb1aef1fe1 100644
--- a/drivers/firmware/arm_scmi/pinctrl.c
+++ b/drivers/firmware/arm_scmi/pinctrl.c
@@ -578,6 +578,8 @@ static int scmi_pinctrl_request_free(const struct scmi_protocol_handle *ph,
tx->flags = cpu_to_le32(type);
ret = ph->xops->do_xfer(ph, t);
+ if (ret == -EOPNOTSUPP)
+ ret = 0;
ph->xops->xfer_put(ph, t);
return ret;
--
2.51.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
@ 2026-03-11 21:46 ` Linus Walleij
2026-03-12 15:27 ` Sudeep Holla
1 sibling, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-03-11 21:46 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sudeep Holla, AKASHI Takahiro, Cristian Marussi, arm-scmi,
linux-arm-kernel, linux-gpio, linux-kernel, Andy Shevchenko,
Bartosz Golaszewski
On Wed, Mar 11, 2026 at 8:38 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> The PIN_CONFIG_LEVEL parameter represents the value of the pin, whether
> reading or writing to the pin. In SCMI, the parameter is represented by
> two different values SCMI_PIN_OUTPUT_VALUE for writing to a pin and
> SCMI_PIN_INPUT_VALUE for reading. The current code translates
> PIN_CONFIG_LEVEL as SCMI_PIN_OUTPUT_VALUE (writing).
>
> Add a function to translate it to either INPUT or OUTPUT depending on
> whether it is called from a _get or _set() operation.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
I think you nailed it :)
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
2026-03-11 19:38 ` [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support Dan Carpenter
@ 2026-03-11 21:48 ` Linus Walleij
0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-03-11 21:48 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sudeep Holla, Peng Fan, AKASHI Takahiro, Cristian Marussi,
arm-scmi, linux-arm-kernel, linux-gpio, linux-kernel,
Andy Shevchenko, Bartosz Golaszewski
On Wed, Mar 11, 2026 at 8:38 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> The argument for PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS is supposed to
> be expressed in terms of ohms. But the pinctrl-scmi driver was
> implementing it the same as PIN_CONFIG_OUTPUT and writing either a
> zero or one to the pin.
>
> The SCMI protocol doesn't have an support configuration type so just
> delete this code instead of replacing it.
>
> Cc: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE
2026-03-11 19:38 ` [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE Dan Carpenter
@ 2026-03-11 21:49 ` Linus Walleij
0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-03-11 21:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sudeep Holla, AKASHI Takahiro, Cristian Marussi, arm-scmi,
linux-arm-kernel, linux-gpio, linux-kernel, Andy Shevchenko,
Bartosz Golaszewski
On Wed, Mar 11, 2026 at 8:39 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> The PIN_CONFIG_PERSIST_STATE setting ensures that the pin state persists
> across a sleep or controller reset. The SCMI spec does not have an
> equivalent command to this so just ignore it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
The SCMI implementation by definition lives in some always-on
universe I think? It never sleeps or resets. Nevertheless:
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP
2026-03-11 19:39 ` [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP Dan Carpenter
@ 2026-03-11 21:50 ` Linus Walleij
2026-03-12 15:25 ` Sudeep Holla
1 sibling, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2026-03-11 21:50 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sudeep Holla, AKASHI Takahiro, Cristian Marussi, arm-scmi,
linux-arm-kernel, linux-kernel, Andy Shevchenko,
Bartosz Golaszewski, linux-gpio
On Wed, Mar 11, 2026 at 8:39 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> The SCMI protocol specification says that the PINCTRL_REQUEST and
> PINCTRL_RELEASE commands are optional. So if the SCMI server returns
> -EOPNOTSUPP, then treat that as success and continue.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP
2026-03-11 19:39 ` [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP Dan Carpenter
2026-03-11 21:50 ` Linus Walleij
@ 2026-03-12 15:25 ` Sudeep Holla
1 sibling, 0 replies; 11+ messages in thread
From: Sudeep Holla @ 2026-03-12 15:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: AKASHI Takahiro, Cristian Marussi, arm-scmi, linux-arm-kernel,
Sudeep Holla, linux-kernel, Andy Shevchenko, Linus Walleij,
Bartosz Golaszewski, linux-gpio
On Wed, Mar 11, 2026 at 10:39:03PM +0300, Dan Carpenter wrote:
> The SCMI protocol specification says that the PINCTRL_REQUEST and
> PINCTRL_RELEASE commands are optional. So if the SCMI server returns
> -EOPNOTSUPP, then treat that as success and continue.
>
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
I see Linus W has provided review tags too. Though I am assuming it will
go via some other tree as SCMI core change is tiny, just wanted to check
it explicitly so that there is no wrong assumption on my side.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
2026-03-11 21:46 ` Linus Walleij
@ 2026-03-12 15:27 ` Sudeep Holla
1 sibling, 0 replies; 11+ messages in thread
From: Sudeep Holla @ 2026-03-12 15:27 UTC (permalink / raw)
To: Dan Carpenter
Cc: AKASHI Takahiro, Sudeep Holla, Cristian Marussi, Linus Walleij,
arm-scmi, linux-arm-kernel, linux-gpio, linux-kernel,
Andy Shevchenko, Bartosz Golaszewski
On Wed, Mar 11, 2026 at 10:38:16PM +0300, Dan Carpenter wrote:
> The PIN_CONFIG_LEVEL parameter represents the value of the pin, whether
> reading or writing to the pin. In SCMI, the parameter is represented by
> two different values SCMI_PIN_OUTPUT_VALUE for writing to a pin and
> SCMI_PIN_INPUT_VALUE for reading. The current code translates
> PIN_CONFIG_LEVEL as SCMI_PIN_OUTPUT_VALUE (writing).
>
> Add a function to translate it to either INPUT or OUTPUT depending on
> whether it is called from a _get or _set() operation.
>
Acked-by: Sudeep Holla <sudeep.holla@kernel.org>
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-03-12 15:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 19:37 [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Dan Carpenter
2026-03-11 19:38 ` [PATCH v3 2/7] pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE Dan Carpenter
2026-03-11 21:46 ` Linus Walleij
2026-03-12 15:27 ` Sudeep Holla
2026-03-11 19:38 ` [PATCH v3 3/7] pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support Dan Carpenter
2026-03-11 21:48 ` Linus Walleij
2026-03-11 19:38 ` [PATCH v3 4/7] pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE Dan Carpenter
2026-03-11 21:49 ` Linus Walleij
2026-03-11 19:39 ` [PATCH v3 5/7] arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP Dan Carpenter
2026-03-11 21:50 ` Linus Walleij
2026-03-12 15:25 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox