Skip to content

Support qcom pinctrl protected pins

Stephen Boyd linux-arm-kernel linux-arm-msm linux-devicetree linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 12 repliesIn review
  2. v13 patches 15 repliesSuperseded

Changes in v2 from the cover letter

* Pushed into gpiolib-of core under irq valid line logic
* Fixed up qcom driver patch to free stuff properly and remove custom code
* Dropped export patch as it got picked up
* Renamed binding to 'reserved-gpio-ranges'

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: pinctrl: Add a reserved-gpio-ranges propertyDocumentation/devicetree/bindings/gpio/gpio.txt+4 -35 replies
2/3gpiolib-of: Support 'reserved-gpio-ranges' propertydrivers/gpio/gpiolib-of.c drivers/gpio/gpiolib.c+37 -03 replies
3/3pinctrl: qcom: Don't allow protected pins to be requesteddrivers/pinctrl/qcom/pinctrl-msm.c+65 -40 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchBjorn Andersson
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Support qcom pinctrl protected pins

This patchset proposes a solution to describing the valid pins for a pin controller in a semi-generic way so that qcom platforms can expose the pins that are really available.

Typically, this has been done by having drivers and firmware descriptions only use pins they know they have access to, and that still works now because we no longer read the pin direction at boot. But there are still some userspace drivers and debugfs facilities that don't know what pins are available and attempt to read everything they can. On qcom platforms, this may lead to a system hang, which isn't very nice behavior, even if root is the only user that can trigger it.

The proposal is to describe the valid pins and then not allow things to cause problems by using the invalid pins. Obviously, the firmware may mess this up, so this is mostly a nice to have feature or a safety net so that things don't blow up easily.

Changes from v1:
* Pushed into gpiolib-of core under irq valid line logic
* Fixed up qcom driver patch to free stuff properly and remove custom code
* Dropped export patch as it got picked up
* Renamed binding to 'reserved-gpio-ranges'

Stephen Boyd (3):
dt-bindings: pinctrl: Add a reserved-gpio-ranges property
gpiolib-of: Support 'reserved-gpio-ranges' property
pinctrl: qcom: Don't allow protected pins to be requested

 Documentation/devicetree/bindings/gpio/gpio.txt |  7 +--
 drivers/gpio/gpiolib-of.c                       | 28 ++++++++++
 drivers/gpio/gpiolib.c                          |  9 ++++
 drivers/pinctrl/qcom/pinctrl-msm.c              | 69 +++++++++++++++++++++++--
 4 files changed, 106 insertions(+), 7 deletions(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project