From: Linus Walleij <linus.walleij@linaro.org>
To: noman pouigt <variksla@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: Pinctrl hogging
Date: Thu, 28 Jul 2016 18:12:58 +0200 [thread overview]
Message-ID: <CACRpkdZxsdgMf+iAcMv1gC6p=JFg0dpZ=UW2TksKZhhOwA6G+A@mail.gmail.com> (raw)
In-Reply-To: <CAES_P+8mP6kOokwVcmtzyHsWRByJyaK=YynPa7vfYsvHD1k6Bw@mail.gmail.com>
On Thu, Jul 21, 2016 at 6:21 PM, noman pouigt <variksla@gmail.com> wrote:
> Is there any way to configure default settings for some of the gpios
> eventhough there is no one driving them?
There are gpio hogs but I don't remember which kernel we
introduced them in. Please keep in sync with upstream.
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/Documentation/devicetree/bindings/gpio/gpio.txt?id=6b516a1093006a39368dd11a5396be5bb00c99df
> I am also trying to configure
> some of the gpios as irq lines using just the device tree without
> writing any device driver for it as it will be used by userspace.
I don't recommend randomly using GPIO from userspace. Have you read:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/gpio/drivers-on-gpio.txt
If you still have a valid usecase for userspace GPIO, consider
getting the latest v4.8 kernel when it's out in some two months
and use the new chardev ABI that I just merged. The sysfs
ABI is not good, and that is why it has been obsolted.
We can name lines with gpio-line-names =""; in device tree and
there are example tools for how to use GPIOs from userspace
in a proper way:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/gpio
> Just to workaround this problem I have created a dummy driver
> specifically for this purpose. Is there any better way?
Keeping in touch with upstream and driving changes upstream is
always the best solution.
Yours,
Linus Walleij
prev parent reply other threads:[~2016-07-28 16:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 16:21 Pinctrl hogging noman pouigt
2016-07-28 16:12 ` Linus Walleij [this message]
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='CACRpkdZxsdgMf+iAcMv1gC6p=JFg0dpZ=UW2TksKZhhOwA6G+A@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=variksla@gmail.com \
/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 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).