[PATCH 09/21] gpio: add driver for ADI ADSP-SC5xx platform
Linus Walleij
linus.walleij at linaro.org
Wed Oct 2 06:53:36 PDT 2024
On Tue, Oct 1, 2024 at 11:58 PM Greg Malysa <greg.malysa at timesys.com> wrote:
> > Interrupt enable in the direction function? No thanks, poke the
> > interrupt registers in your irqchip if you make one (you currently
> > do not) in this case I'd say just disable all interrupts in probe()
> > using something like writew(base + ADSP_PORT_REG_INEN_SET, 0xffff)
> > and be done with it.
> >
>
> This will come up next time too so I wanted to mention that INEN here
> means "input enable." The PORT design has two registers for
> controlling pin direction, one to enable/disable output drivers (DIR)
> and one to enable input drivers (INEN) to be able to read the pin
> state from the gpio data register. If I recall the bare metal
> reference code toggled both but we can review if setting INEN for all
> pins and leaving it is acceptable as well to simplify things.
Aha so that's what it means!
Yeah play around with it and see what you can come up with.
Perhaps you need to override the input/output enable
callbacks with local versions rather than the gpio-mmio
ones to set all bits. (This is possible to do after
bgpio_init() but before adding the gpio_chip if necessary.)
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list