From: Ben Nizette <squidgit@iinet.net.au>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: async userspace gpio api [WAS: Re: PXA board chips control]
Date: Thu, 29 May 2008 19:02:14 +1000 [thread overview]
Message-ID: <1212051734.4780.26.camel@moss.renham> (raw)
[bringing lkml in on this]
On Wed, 2008-05-28 at 00:37 -0700, David Brownell wrote:
> No, very different. Those are more like device nodes, which
> get added and removed as part of routine operations (like
> physical connect/disconnect).
>
>
> > I would have thought -EINVAL was sufficient, no?
>
> Surprising to see a read return a value at one moment, then
> fail with EINVAL the next, then return a value later ...
> no, there should be some distinguished value for "that mode
> would be meaningless right now".
Actually my thought (though I didn't come close to expressing it just
now) was to have an async behaviour control file (taking irq/poll/none
options) which wouldn't be writable while the gpio was an output.
The more I think about it though, the more I'm inclined to just allow
the user to select any of those options on any gpio regardless of
direction and trust them to know whether that makes sense for the
underlying hardware (sanity checking as needed).
--Ben.
reply other threads:[~2008-05-29 9:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1212051734.4780.26.camel@moss.renham \
--to=squidgit@iinet.net.au \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®