lkml.org 
[lkml]   [2022]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware
> > > -static void marvell_config_led(struct phy_device *phydev)
> > > +static int marvell_find_led_config(struct phy_device *phydev)
> > > {
> > > - u16 def_config;
> > > - int err;
> > > + int def_config;
> > > +
> > > + if (phydev->dev_flags & PHY_USE_FIRMWARE_LED) {
> > > + def_config = phy_read_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL);
> > > + return def_config < 0 ? -1 : def_config;
> >
> > What about the other two registers which configure the LEDs?
>
> Do you mean the other two LEDs? They are not used on this machine.

Have you read the datasheet for the PHY? It has three registers for
configuring the LEDs. There is one register which controls the blink
mode, a register which controls polarity, and a third register which
controls how long each blink lasts, and interrupts. If you are going
to save the configuration over suspend/resume you probably need to
save all three.

This last register is also important for WoL, which is why i asked
about it.

Andrew

\
 
 \ /
  Last update: 2022-01-21 14:11    [W:0.073 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site