[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31d2bd0514652685cb87a7c9d17529b9064de2bf.camel@microchip.com>
Date: Tue, 30 Aug 2022 04:50:40 +0000
From: <Lewis.Hanly@...rochip.com>
To: <linus.walleij@...aro.org>
CC: <linux-riscv@...ts.infradead.org>, <Conor.Dooley@...rochip.com>,
<brgl@...ev.pl>, <linux-gpio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <palmer@...belt.com>,
<maz@...nel.org>, <Daire.McNamara@...rochip.com>
Subject: Re: [PATCH v6 1/1] gpio: mpfs: add polarfire soc gpio support
On Mon, 2022-08-22 at 13:28 +0200, Linus Walleij wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> On Mon, Aug 15, 2022 at 2:08 PM <lewis.hanly@...rochip.com> wrote:
>
> > From: Lewis Hanly <lewis.hanly@...rochip.com>
> >
> > Add a driver to support the Polarfire SoC gpio controller
> >
> > Signed-off-by: Lewis Hanly <lewis.hanly@...rochip.com>
>
> This looks like textbook example of a driver that can use
> CONFIG_GPIO_GENERIC
>
> > +config GPIO_POLARFIRE_SOC
> > + bool "Microchip FPGA GPIO support"
> > + depends on OF_GPIO
> > + select GPIOLIB_IRQCHIP
>
> select GPIO_GENERIC
>
> See e.g. drivers/gpio/gpio-ftgpio010.c for an example
> of how to use bgpio_init() to set up the helper library to handle
> the GPIO side of things and combine it with an irqchip.
> You get get/set_multiple() for free with this approach.
> Also see documentation for bgpio_init() in
> drivers/gpio/gpio-mmio.c.
>
> Yours,
> Linus Walleij
Thank you for the feedback.
We had looked at the bpgpio_init, our controller is not fully memory
mapped to support the bgpio_init() and get all routines for free.
While we have in/out and intr (interrupt state) 32-bit registers, we
would not get as much free as other generic memory mapped controllers.
For details on the gpio controller:
https://onlinedocs.microchip.com/pr/GUID-0E320577-28E6-4365-9BB8-9E1416A0A6E4-en-US-3/index.html?GUID-A0214F3C-C68A-45A9-B81C-4695A58C4A46#GUID-A0214F3C-C68A-45A9-B81C-4695A58C4A46__ID-00000AB0
Powered by blists - more mailing lists