Messages in this thread | | | Subject | Re: [patch/rfc 2.6.25-git] gpio: sysfs interface | From | Ben Nizette <> | Date | Wed, 30 Apr 2008 09:29:32 +1000 |
| |
On Tue, 2008-04-29 at 14:55 -0700, David Brownell wrote: > On Tuesday 29 April 2008, Ben Nizette wrote: > > 4) Status quo. Easy, efficient, potentially hard to discover which gpio > > you actually want. > > > > My vote's for 1 or 4. The first one is heavier but easier. The last > > one will need something like the discussed file mapping ranges to gpios. > > My vote is for #4 with a chip listing file. > > I don't like the hacked names ... none of the other /sys/class/*/name > files on any of my systems use hacked names. The entire motivation for > name hacking seems wrong to me, and by observation it's been rejected > for all other class names.
Right, agreed.
I guess one last option (which is made hard by chip label non-uniqueness but I'll throw out anyway) would be
/sys/class/gpio /chipa /gpio-n /value /direction /control /chipb : :
I guess this doesn't gain much over labelling files chipname:N (and has the same pitfalls) but does at least seem less hackish.
--Ben. > > - Dave >
| |