On Thu, Jun 01, 2023 at 09:29:01AM +0900, Atsushi Nemoto wrote: > On 2023/05/31 23:35, Andrew Lunn wrote: > >> The ADIN1200/ADIN1300 supports inverting the link status output signal > >> on the LINK_ST pin. > > > > Please could you add an explanation to the commit message why you > > would want to do this? Is this because there is an LED connected to > > it, but its polarity is inverted? > > Yes, the LINK_ST pin of AD1200/1300 is active-high but our custom > board designer connected it to an LED as an active-low signal. O.K. LED is the magic word here. And the fact that there is nothing specific to this PHY. Being able to specify the polarity of an output to an LED is pretty common. Please take a look at: ocumentation/devicetree/bindings/net/ethernet-phy.yaml where it describes LEDs. Please add a generic DT property there for everybody to use. See if the LED subsystem has a name for such a property. There is sufficient code in net-next to allow LED0 to be controlled in a limited way. There are more patches coming soon which will give you much more control. Using LINK_ST to control an LED is not so easy to represent in the current code because it appears you don't have manual control of the LED, i.e. forced on/off. But you can offload functions when the new code lands. Andrew