Re: [patch/rfc 2.6.25-git] gpio: sysfs interface

From: Ben Nizette
Date: Tue Apr 29 2008 - 19:29:38 EST



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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/