[PATCH v3 00/10] pinctrl: scmi: fixes and GPIO function support

From: Clément Le Goffic

Date: Mon Nov 23 2026 - 10:21:40 EST


Fixes first: a setting the platform reports off read as set, a drive
strength in milliamperes that is not exact was truncated on get and
could overflow on set, the protocol layer read past a
PINCTRL_LIST_ASSOCIATIONS reply larger than its receive buffer, and the
pins of pin-only functions were registered as groups. Then the drive
strength conversion uses MICRO / MILLI.

Then GPIO function support: mark the GPIO functions, and select the GPIO
function of a pin on a GPIO request.

Patches 1 to 5 are fixes for v7.4, patches 6 to 10 can wait for v7.5.

Tested on R-Car X5H with a v6.18 backport that needed adapting, all but
the schmitt and enable settings, which the platform does not implement.
An LLM was used to review the patches and to set up the tests.

---
Changes in v3:
- drop patches 1 to 3, applied for v7.4
- patch 2: new, refuse an inexact or overflowing drive strength in mA (Geert)
- patch 4: Fixes tag, patch 5 (v1 patch 7) needs it
- patch 6: new, MICRO / MILLI (Geert)
- rebase on v7.4-rc4 (Linus)
- Link to v2: https://patch.msgid.link/20261113-clegoffic-pinctrl-scmi-gpio-v2-0-faccb4685d88@xxxxxxxxxxxx

Changes in v2:
- patch 4: keep the enables value on get (Sashiko)
- patch 5: error out on a truncated reply (Cristian)
- patch 11: unsigned counts, loop variables in the for (Andy, Cristian)
- patch 11: dev_dbg when no GPIO function is found (Cristian)
- join the lines that fit in 100 columns (Andy)
- collect Reviewed-by tags
- rebase on next-20261112
- Link to v1: https://patch.msgid.link/20261030-clegoffic-pinctrl-scmi-gpio-v1-0-52d92843ad97@xxxxxxxxxxxx

---
Clément Le Goffic (10):
pinctrl: scmi: report an off setting as not set
pinctrl: scmi: refuse an inexact drive strength in milliamperes
firmware: arm_scmi: stop reading past PINCTRL_LIST_ASSOCIATIONS replies
firmware: arm_scmi: report the pin-only and GPIO flags of functions
pinctrl: scmi: give no groups to pin-only functions
pinctrl: scmi: convert the drive strength with MICRO / MILLI
pinctrl: scmi: mark the GPIO functions
pinctrl: scmi: report whether a function is GPIO
firmware: arm_scmi: add an operation to set the function of a single pin
pinctrl: scmi: select the GPIO function on GPIO requests

drivers/firmware/arm_scmi/pinctrl.c | 51 ++++++++++++--
drivers/pinctrl/pinctrl-scmi.c | 133 ++++++++++++++++++++++++++++++++----
include/linux/scmi_protocol.h | 8 ++-
3 files changed, 174 insertions(+), 18 deletions(-)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
change-id: 20261030-clegoffic-pinctrl-scmi-gpio-48cfe014bb11

Best regards,
--
Clément Le Goffic <clegoffic@xxxxxxxxxxxx>