Re: [PATCH RFC net-next v2 08/18] net: pse-pd: Add support for reporting events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux