Re: [PATCH RFC net-next] net: phy: always set polarity_modes if op is supported

From: Daniel Golle
Date: Fri Oct 04 2024 - 18:11:21 EST


On Fri, Oct 04, 2024 at 10:59:45PM +0200, Andrew Lunn wrote:
> On Fri, Oct 04, 2024 at 04:46:33PM +0100, Daniel Golle wrote:
> > Some PHYs drive LEDs active-low by default and polarity needs to be
> > configured in case the 'active-low' property is NOT set.
> > One way to achieve this without introducing an additional 'active-high'
> > property would be to always call the led_polarity_set operation if it
> > is supported by the phy driver.
>
> It is a good idea to state why it is RFC. What comments do you want?
>
> [...]
> I think adding an active-high property is probably the safest bet,
> even if it is more work.

Thank you. Exactly that was the clarification I was looking for:
If absence of "active-low" would mean "active-high" or should be
interpreted as "don't touch".

I'll add "active-high" as an additional property then, as I found out
that both, Aquantia and Intel/MaxLinear are technically speaking
active-low by default (ie. after reset) and what we need to set is a
property setting the LED to be driven active-high (ie. driving VDD
rather than GND) instead. I hope it's not too late to make this change
also for the Aquantia driver.