Skip to contentSkip to conversation

async userspace gpio api [WAS: Re: PXA board chips control]

DISCUSSION Ben Nizette 1 participant 1 message May 29, 2008

lore
Share & tools
lore
#0 lore raw

[bringing lkml in on this]

Quoted 11 lines · David Brownell

No, very different. Those are more like device nodes, which get added and removed as part of routine operations (like physical connect/disconnect).

Quoted 1 line

I would have thought -EINVAL was sufficient, no?

Surprising to see a read return a value at one moment, then fail with EINVAL the next, then return a value later ... no, there should be some distinguished value for "that mode would be meaningless right now".

Actually my thought (though I didn't come close to expressing it just now) was to have an async behaviour control file (taking irq/poll/none options) which wouldn't be writable while the gpio was an output.

The more I think about it though, the more I'm inclined to just allow the user to select any of those options on any gpio regardless of direction and trust them to know whether that makes sense for the underlying hardware (sanity checking as needed).

	--Ben.