[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 11/13] register: Add GPIO API
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v6 11/13] register: Add GPIO API |
Date: |
Fri, 10 Jun 2016 12:52:56 +0100 |
On 12 May 2016 at 23:46, Alistair Francis <address@hidden> 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 <address@hidden>
> [ 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 <address@hidden>
> Signed-off-by: Alistair Francis <address@hidden>
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
- Re: [Qemu-devel] [PATCH v6 11/13] register: Add GPIO API,
Peter Maydell <=