[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbk_ZqYnDzXgmbnAxhs+mEe9f2X-y++9HDS-O=UO_tUmg@mail.gmail.com>
Date: Mon, 22 Aug 2022 13:28:28 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: lewis.hanly@...rochip.com
Cc: linux-gpio@...r.kernel.org, linux-riscv@...ts.infradead.org,
brgl@...ev.pl, linux-kernel@...r.kernel.org, palmer@...belt.com,
maz@...nel.org, conor.dooley@...rochip.com,
daire.mcnamara@...rochip.com
Subject: Re: [PATCH v6 1/1] gpio: mpfs: add polarfire soc gpio support
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
Powered by blists - more mailing lists