[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250320150944.6ee054c3@kmaincent-XPS-13-7390>
Date: Thu, 20 Mar 2025 15:09:44 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>, Jonathan Corbet <corbet@....net>, Donald Hunter
<donald.hunter@...il.com>, Rob Herring <robh@...nel.org>, Andrew Lunn
<andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>, Heiner Kallweit
<hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Liam
Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Thomas
Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
linux-doc@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>, Dent
Project <dentproject@...uxfoundation.org>, kernel@...gutronix.de, Maxime
Chevallier <maxime.chevallier@...tlin.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 03/12] net: pse-pd: tps23881: Add support
for PSE events and interrupts
On Mon, 17 Mar 2025 10:43:58 +0100
Oleksij Rempel <o.rempel@...gutronix.de> wrote:
> On Tue, Mar 04, 2025 at 11:18:52AM +0100, Kory Maincent wrote:
> > +static int tps23881_irq_handler(int irq, struct pse_controller_dev *pcdev,
> > + unsigned long *notifs,
> > + unsigned long *notifs_mask)
> > +{
> > + struct tps23881_priv *priv = to_tps23881_priv(pcdev);
> > + struct i2c_client *client = priv->client;
> > + int ret, it_mask;
> > +
> > + /* Get interruption mask */
> > + ret = i2c_smbus_read_word_data(client, TPS23881_REG_IT_MASK);
> > + if (ret < 0)
> > + return ret;
> > + it_mask = ret;
> > +
> > + /* Read interrupt register until it frees the interruption pin. */
> > + while (true) {
>
> If the hardware has a stuck interrupt, this could result in an infinite
> loop. max_retries with some sane value would be good.
Ack I will. Do you have a value in mind as a sane value?
> > +
> > +static int tps23881_setup_irq(struct tps23881_priv *priv, int irq)
> > +{
> > + struct i2c_client *client = priv->client;
> > + struct pse_irq_desc irq_desc = {
> > + .name = "tps23881-irq",
>
> here or in devm_pse_irq_helper() it would be good to add intex suffix to
> the irq handler name.
You mean index? Like the PSE index?
So I will need to add back the support of the PSE index in the series.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists