From: Stephen Boyd <sboyd@codeaurora.org>
To: Timur Tabi <timur@codeaurora.org>
Cc: linux-gpio@vger.kernel.org, Andy Gross <andy.gross@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: Sparse GPIO maps with pinctrl-msm.c?
Date: Fri, 16 Jun 2017 08:07:21 -0700 [thread overview]
Message-ID: <20170616150721.GJ20170@codeaurora.org> (raw)
In-Reply-To: <CAOZdJXWPEmcw-=P9+q-Zsf4xy9J-ze+W6kUVFi8hLxVH9SGcCA@mail.gmail.com>
(Updating Andy's mail and adding Bjorn)
On 06/13, Timur Tabi wrote:
> 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?
>
I'm not aware of anything in pinctrl-msm to support this. Is this
really a problem though? The only user that could cause an XPU
violation would be root. So just "don't do that" and things will
work fine.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-06-16 15:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170616150721.GJ20170@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=timur@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.