Re: [PATCH net-next 2/2] net: sfp: manage receiver and transmitter regulators
From: Mark Brown
Date: Fri Mar 06 2026 - 11:26:40 EST
On Wed, Mar 04, 2026 at 10:38:54PM +0100, Andrew Lunn wrote:
> This is the first board since 2017, when support for SFPs was added,
> which can actually control the power supplies. We cannot make
> regulators mandatory without breaking backwards compatibility.
> So for me, the patch is good as it is now, the regulators are
> optional.
To be clear the actual effect of the regular API is that no regulator
has been specified by the firmware then we assume that there's something
we don't know about and substitute in a dummy regulator, otherwise
adding regulator support to anything would be excessively complex and
fragile. We do currently warn when we do this since we're generally
very conservative about things like this as messing up power can crash
the system.
The issues Russell is seeing with AHCI are a combination of people just
bodging those warnings and the AHCI regulator bindings being very
confused, I'll follow up to his mail separately.
Optional regulators are for the case where the supply may be physically
absent and the driver needs to do something about it, for example the
original use case was for some of the MMC/SD specs where higher
performance modes add an additional supply which needs to be turned on
only after negotating with the device, if it's absent then the system
should handle this by not enabling those higher performance modes.
If a supply absolutely has to be there the driver should use a normal
regulator and write code on the basis that it will actually have power.
Attachment:
signature.asc
Description: PGP signature