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
>>> 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)?
No, with gpio drivers I meant drivers that attach at gpio pins, like
gpioow(4) and friends. The driver -providing- the access to the GPIO
hardware is configured like any other driver.
>
> 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?
Yes, something like that. I am currently working on some naming details...
>
>> 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 :)
Well, that is a good reason then ;) I will start working on the generic
parts and maybe after BSDCan your n900 specific drivers could be
"generalized"? That would be a plan that leaves us enough time and
makes sure that you can present your stuff as planned.
>
>>> 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.
Well, perfect, then.
>
> Cheers,
>
Home |
Main Index |
Thread Index |
Old Index