From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Chris Boot <bootc@bootc.net>
Cc: Ben Dooks <ben@fluff.org>, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Proposal: common kernel-wide GPIO interface
Date: Mon, 31 Jul 2006 22:17:35 +0200 [thread overview]
Message-ID: <20060731201735.GZ10495@pengutronix.de> (raw)
In-Reply-To: <44CE2B90.5030905@bootc.net>
On Mon, Jul 31, 2006 at 05:10:56PM +0100, Chris Boot wrote:
> My current idea is to divide the interfaces by GPIO device and port.
> I've so far not seen a GPIO device that couldn't be divided into ports
> of <= 32 bits. How wide can a 'port' actually become?
Not all GPIOs can be abstracted into "ports" in a sane way. For example,
the PXAs have something like 80 GPIOs, which might be randomly divided
into alternate functions and "real" GPIOs.
> Somehow I think that a separate device/file for each pin or possibly
> even port might not be a wise idea. For example, twiddling individual
> pins on a GPIO when you connect an LCD, I2C, or SPI interface seems
> extremely inefficient...
I think you have to take care about two things: a) a registration
infrastructure (which GPIO pin was requested, similar to mem and irq)
and b) an access API. For slow things like LEDs you might want to have
unified access functions, but for fast GPIOs (bitbanging i2c etc) you
want to directly manipulate the registers once you've requested them.
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
next prev parent reply other threads:[~2006-07-31 20:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 20:44 Chris Boot
2006-07-29 19:41 ` Bill Davidsen
2006-07-30 13:08 ` Robert Schwebel
2006-07-30 22:02 ` Ben Dooks
2006-07-31 16:10 ` Chris Boot
2006-07-31 20:17 ` Robert Schwebel [this message]
2006-07-31 21:23 ` Chris Boot
2006-08-01 7:40 ` Juergen Beisert
2006-08-01 15:53 ` Jim Cromie
2006-08-01 21:25 ` Jim Cromie
2006-08-02 7:28 ` Robert Schwebel
2006-08-02 17:58 ` Lennart Sorensen
2006-08-02 20:48 ` Jim Cromie
2006-08-03 13:55 ` Lennart Sorensen
2006-08-03 15:42 ` Robert Schwebel
2006-08-08 23:01 ` [RFC - patch] add a gpio-sysfs interface - was: " Jim Cromie
2006-08-09 17:12 ` Jim Cromie
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=20060731201735.GZ10495@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=ben@fluff.org \
--cc=bootc@bootc.net \
--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
Powered by JetHome