Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding an interrupt locator to the GPIO, I2C and SPI buses



On Fri, 19 Apr 2013 10:22:41 +0200, Marc Balmer wrote:
> 
>> Does it involve compiling the drivers as modules?
> 
> All gpio(4) drivers can be build as modules, of course.

Let me rephrase this: is it necessary to compile the GPIO drivers as 
modules to be able to attach them at runtime using either gpioctl(8) or 
gpio.conf(5)?

I otherwise do not see how can be compiled in and available without being 
attached to something in the kernel configuration file.

> The drivers have to be flexible enough to cover the situations we know
> about.  That starts with interrupts being triggered differently:  edge
> base, falling edge, raising edge, etc.  And then the drivers attaching
> to GPIO pins, like these buttons, must be configurable enough.  Nothing
> is wrong with adding specific locators to these, just they need a way to
> be controllable from userland.

So we would have something like:

lckbtn0 at gpio0 offset 7 mask 1 intr 103 intrtype edgeboth
or
gpioctl [-q] device attach device offset mask [flag [f]|intr [i]|intrtype 
[t]]

Am I correct?

> I can not forbid you to committ your stuff under evbarm/n900 ;) I do
> think, however, that it is a bad idea to do so right now.  We are not in
> a rush to get this in and I think we just found a path to work towards a
> generic solution which maybe in place in a few weeks of time.

Well, I'd like to get as much of this as possible working in tree in time 
for my BSDCan presentation. My plane takes off on the 14th :)

>> I can live with the crude hard-coded locator for the interrupt pin in
>> the meantime.
> 
> I suggest to make it a #define with a short comment, instead of putting
> a magic number directly in the source code.

It is already the case.

Cheers,
-- 
khorben



Home | Main Index | Thread Index | Old Index