[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ce06df3-e092-47a8-bec6-8829eeb826bc@lunn.ch>
Date: Thu, 31 Oct 2024 23:00:48 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
"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>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-kernel@...r.kernel.org, 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>
Subject: Re: [PATCH RFC net-next v2 08/18] net: pse-pd: Add support for
reporting events
> +static unsigned long pse_to_regulator_notifs(unsigned long notifs)
> +{
> + switch (notifs) {
> + case ETHTOOL_C33_PSE_EVENT_OVER_CURRENT:
> + return REGULATOR_EVENT_OVER_CURRENT;
> + case ETHTOOL_C33_PSE_EVENT_OVER_TEMP:
> + return REGULATOR_EVENT_OVER_TEMP;
> + }
> + return 0;
> +}
https://elixir.bootlin.com/linux/v6.11.5/source/include/uapi/regulator/regulator.h#L36
* NOTE: These events can be OR'ed together when passed into handler.
ETHTOOL_C33_PSE_EVENT_OVER_* are also bits which could be OR'ed
together, so is this function correct?
Andrew
Powered by blists - more mailing lists