[PATCH v5 1/3] gpio: nuvoton: Add Nuvoton NPCM sgpio driver
Linus Walleij
linus.walleij at linaro.org
Wed Mar 15 05:38:45 AEDT 2023
Hi Jim,
thanks for your patch!
On Tue, Mar 14, 2023 at 10:23 AM Jim Liu <jim.t90615 at gmail.com> wrote:
> Add Nuvoton BMC NPCM7xx/NPCM8xx sgpio driver support.
>
> Signed-off-by: Jim Liu <jim.t90615 at gmail.com>
(...)
> +config GPIO_NPCM_SGPIO
> + bool "Nuvoton SGPIO support"
> + depends on (ARCH_NPCM || COMPILE_TEST) && OF_GPIO
> + select GPIO_GENERIC
You don't seem to use GPIO_GENERIC?
> + gpio->intc.name = dev_name(&pdev->dev);
> + gpio->intc.irq_ack = npcm_sgpio_irq_ack;
> + gpio->intc.irq_mask = npcm_sgpio_irq_mask;
> + gpio->intc.irq_unmask = npcm_sgpio_irq_unmask;
> + gpio->intc.irq_set_type = npcm_sgpio_set_type;
> +
> + irq = &gpio->chip.irq;
> + irq->chip = &gpio->intc;
Please rewrite this dynamic irq_chip to an immutable irq_chip,
several examples of how this is done is in the kernel, for example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpio/gpio-ftgpio010.c?id=ab637d48363d7b8ee67ae089808a8bc6051d53c4
Yours,
Linus Walleij
More information about the openbmc
mailing list