On 12 May 2016 at 23:46, Alistair Francis <[email protected]> wrote: > Add GPIO functionality to the register API. This allows association > and automatic connection of GPIOs to bits in registers. GPIO inputs > will attach to handlers that automatically set read-only bits in > registers. GPIO outputs will be updated to reflect their field value > when their respective registers are written (or reset). Supports > active low GPIOs. > > This is particularly effective for implementing system level > controllers, where heterogenous collections of control signals are > placed is a SoC specific peripheral then propagated all over the > system. > > Signed-off-by: Peter Crosthwaite <[email protected]> > [ EI Changes: > * register: Add a polarity field to GPIO connections > Makes it possible to directly connect active low signals > to generic interrupt pins. > ] > Signed-off-by: Edgar E. Iglesias <[email protected]> > Signed-off-by: Alistair Francis <[email protected]>
I'm definitely not convinced of the utility of this. I think almost all devices don't have registers with bits which map 1:1 to GPIO lines like this, and the few devices which do can easily enough just implement them by hand. GPIOs are (in my view) a device level concept, not a register level concept, and I think they're better implemented at the device level. thanks -- PMM
