mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: Chris Boot <bootc@bootc.net>, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Proposal: common kernel-wide GPIO interface
Date: Wed, 2 Aug 2006 09:28:43 +0200	[thread overview]
Message-ID: <20060802072843.GN10495@pengutronix.de> (raw)
In-Reply-To: <44CFC6CC.8020106@gmail.com>

On Tue, Aug 01, 2006 at 03:25:32PM -0600, Jim Cromie wrote:
> >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.
> >
> >Robert 
> >  
> this is cool to see.  Using a class-driver is very different from the 
> vtable-approach
> that I used (struct nsc_gpio_ops) in pc8736x_gpio and scx200_gpio.
> 
> Are any of the limitation youve cited above related to the 
> /sys/class/gpio paths below ?
> 
> +	  To set pin 63 to low (to start the motor) do a:
> +	   $ echo 0 > /sys/class/gpio/gpio63/level
> +	  Or to stop the motor again:
> +	   $ echo 1 > /sys/class/gpio/gpio63/level
> +	  To get the level of the key (pin 8) do:
> +	   $ cat /sys/class/gpio/gpio8/level
> +	  The result will be 1 or 0.
> +
> +	  To add new GPIO pins at runtime (lets say pin 88 should be an 
> input)
> +	  you can do a:
> +	   $ echo 88:in > /sys/class/gpio/map_gpio
> +	  The same with a new GPIO pin 95, it should be an output and at 
> high level:
> +	   $ echo 95:out:hi > /sys/class/gpio/map_gpio
> +
 
Please re-read my original mail. 

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


  reply	other threads:[~2006-08-02  7:28 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
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 [this message]
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=20060802072843.GN10495@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=bootc@bootc.net \
    --cc=jim.cromie@gmail.com \
    --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