[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080502203637.GG3956@ucw.cz>
Date: Fri, 2 May 2008 22:36:38 +0200
From: Pavel Machek <pavel@....cz>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Brownell <david-b@...bell.net>,
lkml <linux-kernel@...r.kernel.org>,
Trent Piepho <tpiepho@...escale.com>,
hartleys <hartleys@...ionengravers.com>,
Ben Nizette <bn@...sdigital.com>,
Mike Frysinger <vapier.adi@...il.com>,
Bryan Wu <cooloney@...nel.org>
Subject: Re: [patch/rfc 2.6.25-git] gpio: sysfs interface
Hi!
> > Simple sysfs interface for GPIOs.
> >
> > /sys/class/gpio
> > /gpio-N ... for each exported GPIO #N
> > /value ... always readable, writes fail except for output GPIOs
> > /direction ... writable as: in, out (default low), high, low
> > /control ... to request a GPIO be exported or unexported
> >
> > GPIOs may be exported by kernel code using gpio_export(), which should
> > be most useful for driver debugging. Userspace may also ask that they
> > be exported by writing to the sysfs control file, helping to cope with
> > incomplete board support:
> >
> > echo "export 23" > /sys/class/gpio/control
> > ... will gpio_request(23, "sysfs") and gpio_export(23); use
> > /sys/class/gpio/gpio-23/direction to configure it.
> > echo "unexport 23" > /sys/class/gpio/control
> > ... will gpio_free(23)
>
> hm, does ths sysfs one-value-per-file rule apply to writes?
Having seen ibm acpi interface... yes, that rule should be aplied for
writes, too.
What about mkdir gpio-N to export it?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists