devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Support qcom pinctrl protected pins
@ 2018-01-26  1:13 Stephen Boyd
  2018-01-26  1:13 ` [PATCH v2 1/3] dt-bindings: pinctrl: Add a reserved-gpio-ranges property Stephen Boyd
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Stephen Boyd @ 2018-01-26  1:13 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree, linux-arm-msm, Timur Tabi, linux-kernel,
	Bjorn Andersson, Grant Likely, linux-gpio, Andy Shevchenko,
	linux-arm-kernel

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(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-03-20 21:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26  1:13 [PATCH v2 0/3] Support qcom pinctrl protected pins Stephen Boyd
2018-01-26  1:13 ` [PATCH v2 1/3] dt-bindings: pinctrl: Add a reserved-gpio-ranges property Stephen Boyd
     [not found]   ` <20180126011400.2191-2-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-01-26  9:20     ` Andy Shevchenko
2018-02-23 16:37   ` Bjorn Andersson
2018-03-20  3:36   ` Linus Walleij
2018-03-20  3:40     ` Timur Tabi
2018-03-20 21:35     ` Stephen Boyd
     [not found] ` <20180126011400.2191-1-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-01-26  1:13   ` [PATCH v2 2/3] gpiolib-of: Support 'reserved-gpio-ranges' property Stephen Boyd
     [not found]     ` <20180126011400.2191-3-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-01-26  9:35       ` Andy Shevchenko
2018-02-07 13:34     ` Linus Walleij
2018-03-01 21:49       ` Stephen Boyd
2018-01-26  1:14 ` [PATCH v2 3/3] pinctrl: qcom: Don't allow protected pins to be requested Stephen Boyd
2018-02-20 16:45 ` [PATCH v2 0/3] Support qcom pinctrl protected pins Timur Tabi
2018-02-23 14:22   ` Linus Walleij
2018-02-23 16:54     ` Bjorn Andersson
2018-02-26 21:18       ` Timur Tabi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).