All of lore.kernel.org
 help / color / mirror / Atom feed
* Sparse GPIO maps with pinctrl-msm.c?
@ 2017-06-13 23:35 Timur Tabi
  2017-06-14 18:59 ` Timur Tabi
  2017-06-16 15:07 ` Stephen Boyd
  0 siblings, 2 replies; 20+ messages in thread
From: Timur Tabi @ 2017-06-13 23:35 UTC (permalink / raw)
  To: Stephen Boyd, linux-gpio, Andy Gross

I've run into a problem with our ACPI system where it turns out that
one a subset of GPIOs are actually available to Linux.  Attempting to
access anything that's not "approve" generates an XPU violation and
halts the system.

Our pin control driver, pinctrl-qdf2xxx.c, is a client on
pintrl-msm.c.  As such, it has to package the GPIO information in a
way that pinctrl-msm can use.  I just want to get confirmation that
there is no way to provide a list of specific GPIOs.

The actual list are these GPIOs: 116, 117, 118, 119, 120, 121, 122,
123, 124, 125, 126, 127, 128, 129, 130, 131, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 50, 36, 37, 38, 39.  These correspond to
qdss_tracedata[0 - 31].  I can create these as gpio0 - gpio31, but
that doesn't work because then no one will know (without using
debug_fs) that "gpio3" is actually GPIO 119.

I can instead create all 150 GPIOs, and then specify NULL data for the
118 unavailable GPIOs, but then if anyone tries to access any of those
(e.g. "echo 7 > /sys/class/gpio/gexport") will case a violation.

Is there a way, in pinctrl-msm, to specify a GPIO that doesn't
actually exist, and therefore should never be exported?

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

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

end of thread, other threads:[~2017-06-29  4:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13 23:35 Sparse GPIO maps with pinctrl-msm.c? Timur Tabi
2017-06-14 18:59 ` Timur Tabi
2017-06-16 15:07 ` Stephen Boyd
2017-06-16 15:15   ` Timur Tabi
2017-06-16 15:41     ` Stephen Boyd
2017-06-16 15:49       ` Timur Tabi
2017-06-16 16:06         ` Bjorn Andersson
2017-06-16 16:17           ` Timur Tabi
2017-06-16 16:21             ` Andy Gross
2017-06-16 16:26               ` Timur Tabi
2017-06-16 17:44                 ` Bjorn Andersson
2017-06-16 18:10                   ` Timur Tabi
2017-06-16 18:50                     ` Bjorn Andersson
2017-06-16 19:07                       ` Timur Tabi
2017-06-29  4:59                         ` Bjorn Andersson
2017-06-20 23:10                   ` Timur Tabi
2017-06-16 15:55     ` Bjorn Andersson
2017-06-16 16:07       ` Timur Tabi
2017-06-16 16:35         ` Bjorn Andersson
2017-06-16 18:42           ` Timur Tabi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.