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

From: David Brownell
Date: Tue Apr 29 2008 - 18:10:49 EST


On Monday 28 April 2008, Ben Nizette wrote:
> > > >
> > > > Sysfs attributes are supposed to be pollable.  I've not done it,
> > > > but fs/sysfs/file.c::sysfs_notify() looks relevant ...
> > >
> > > Right, that'll work.
> >
> > OK.  In that case, I think I should plan to rename the "direction"
> > attribute as "configuration" or something a bit broader ... so that
> > writing "irq" (or maybe "rising", "falling", "bothedges", "poll")
> > would eventually configure it as an input with an IRQ handler.
>
> Good plan, unless you'd prefer to see "direction" and "interrupt" config
> separate.  I have no real preference but IMO
> echo "falling" > interrupt
> makes more immediate sense than
> echo "falling" > configuration

OK, I'll leave it be then. Given that not all GPIOs support
interrupts, I used the "poll" example intentionally ... being
able to poll every N seconds (milliseconds?) may be important.


> >
> > Whenever someone contributes such an async notification scheme,
> > that is.  ;)
>
> ;)


--
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/