[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ee664ec-f912-467e-aedb-81208987ea2a@wanadoo.fr>
Date: Fri, 7 Feb 2025 19:36:56 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Ming Yu <a0282524688@...il.com>, tmyu0@...oton.com, lee@...nel.org,
linus.walleij@...aro.org, brgl@...ev.pl, andi.shyti@...nel.org,
mkl@...gutronix.de, mailhol.vincent@...adoo.fr, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, wim@...ux-watchdog.org, linux@...ck-us.net,
jdelvare@...e.com, alexandre.belloni@...tlin.com
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-hwmon@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCH v7 1/7] mfd: Add core driver for Nuvoton NCT6694
Le 07/02/2025 à 08:44, Ming Yu a écrit :
> The Nuvoton NCT6694 is a peripheral expander with 16 GPIO chips,
> 6 I2C controllers, 2 CANfd controllers, 2 Watchdog timers, ADC,
> PWM, and RTC.
>
> This driver implements USB device functionality and shares the
> chip's peripherals as a child device.
>
> Each child device can use the USB functions nct6694_read_msg()
> and nct6694_write_msg() to issue a command. They can also request
> interrupt that will be called when the USB device receives its
> interrupt pipe.
...
> +static struct irq_chip nct6694_irq_chip = {
This could be const.
(I'm working on a serie that should constify struct irq_chip, so this
one would already be done)
> + .name = "nct6694-irq",
> + .flags = IRQCHIP_SKIP_SET_WAKE,
> + .irq_bus_lock = nct6694_irq_lock,
> + .irq_bus_sync_unlock = nct6694_irq_sync_unlock,
> + .irq_enable = nct6694_irq_enable,
> + .irq_disable = nct6694_irq_disable,
> +};
> +
> +static int nct6694_irq_domain_map(struct irq_domain *d, unsigned int irq,
> + irq_hw_number_t hw)
> +{
> + struct nct6694 *nct6694 = d->host_data;
> +
> + irq_set_chip_data(irq, nct6694);
> + irq_set_chip_and_handler(irq, &nct6694_irq_chip, handle_simple_irq);
> +
> + return 0;
> +}
...
CJ
Powered by blists - more mailing lists