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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]