linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Boot <bootc@bootc.net>
To: Ben Dooks <ben@fluff.org>
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Proposal: common kernel-wide GPIO interface
Date: Mon, 31 Jul 2006 17:10:56 +0100	[thread overview]
Message-ID: <44CE2B90.5030905@bootc.net> (raw)
In-Reply-To: <20060730220200.GB8907@home.fluff.org>

Ben Dooks wrote:
> On Sun, Jul 30, 2006 at 03:08:11PM +0200, Robert Schwebel wrote:
>> Chris,
>>
>> On Fri, Jul 28, 2006 at 09:44:40PM +0100, Chris Boot wrote:
>>> I propose to develop a common way of registering and accessing GPIO pins on 
>>> various devices.
>> I've attached the gpio framework we have developed a while ago; it is
>> not ready for upstream, only tested on pxa and has probably several
>> other drawbacks, but may be a start for your activities. One of the
>> problems we've recently seen is that for example on PowerPCs you don't
>> have such a clear "this is gpio pin x" nomenclature, so the question
>> would be how to do the mapping here.
> 
> Right, my $0.02 worth:

[snip]

Some very interesting comments and suggestions! Thanks very much for all the
info, that's exactly the sort of stuff I needed.

> 3) The sysfs interface should be configurable, as systems
>    with lots of GPIO would end up with large numbers of
>    files and directories in sysfs.

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?

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...

> 4) you probably want to ensure pull-up resistors are off if the
>    output is being driven. 

Yes, very good idea! So far I haven't managed to fry any chips by driving a 
pulled up/down output, but it's so easy to make the mistake...

Chris

-- 
Chris Boot
bootc@bootc.net
http://www.bootc.net/



  reply	other threads:[~2006-07-31 16:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 20:44 [RFC] Proposal: common kernel-wide GPIO interface 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 [this message]
2006-07-31 20:17       ` Robert Schwebel
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=44CE2B90.5030905@bootc.net \
    --to=bootc@bootc.net \
    --cc=ben@fluff.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r.schwebel@pengutronix.de \
    /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).