lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectGPIOLIB, GPIO_SYS and port-wide accesses
From
Hi,

As I see it the gpiolib and sysfs export insists on single bit
accesses even on gpio pins that are located on the same physical
device/port.

A couple of years ago there was mention of port-wide accesses being a
good thing:

http://lkml.indiana.edu/hypermail/linux/kernel/0608.0/0731.html
(towards the bottom)

Did anything ever come of that?

Per-bit access is pretty inflexible if you are driving a 7-segment
display or 8-LED bar display, holding lots of file descriptors open
etc, and lots of syscall overhead.

sysfs syntax like

$ echo "240-247" > export
$ echo 255 > gpio240-247/direction (8-bit binary mask - output)
$ echo 255 > gpio240-247/value (all ones)

would be reasonably friendly, obviously the underlying gpiolib would
have to have some notion of coupled ports.

Any thoughts?

John
--
John Williams,
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663


\
 
 \ /
  Last update: 2009-08-14 02:03    [W:0.020 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site