lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/7] dt-bindings: net: realtek: Add property to configure LED mode
> as of now it isn't even an API, the phy_device populates a new array
> in its struct with the values from the DT. PHY drivers access the
> array directly. Is it still preferable to post everything together?
>
> (maybe I'm too concerned about 'noise' from the driver patches while
> we are figuring out what exactly the binding should be).

We should try to have the DT parsing made generic in phylib, and add
new driver API calls to actually configure the LEDs.

Please also take a look at the Linux generic LED binding. It would be
nice to have something compatible with that. With time, the code could
morph into being part of the generic LED subsystem. So we are mostly
talking about triggers. But we offload the trigger to the hardware,
rather than have software trigger the blinking of the LEDs. So
something like:

ethernet-phy0 {
reg = <0>;

leds {
phy-led@0 {
reg = <0>
label = "left:green";
linux,default-trigger = "phy_link_1000_active";
}
phy-led@1 {
reg = <1>
label = "right:red";
linux,default-trigger = "phy_collision";
}
}
}

Andrew

\
 
 \ /
  Last update: 2019-07-22 21:39    [W:0.060 / U:2.944 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site