[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa319ca7-d8a6-4a6a-9d10-997594a51420@lunn.ch>
Date: Sat, 16 Aug 2025 00:59:14 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Daniel Braunwarth <daniel.braunwarth@...a.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jon Hunter <jonathanh@...dia.com>,
netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Thierry Reding <treding@...dia.com>
Subject: Re: [PATCH net-next] net: phy: realtek: fix RTL8211F wake-on-lan
support
On Wed, Aug 13, 2025 at 01:02:46PM +0100, Russell King (Oracle) wrote:
> On Wed, Aug 13, 2025 at 11:04:45AM +0100, Russell King (Oracle) wrote:
> > + /* Mark this PHY as wakeup capable and register the interrupt as a
> > + * wakeup IRQ if the PHY is marked as a wakeup source in firmware,
> > + * and the interrupt is valid.
> > + */
> > + if (device_property_read_bool(dev, "wakeup-source") &&
> > + phy_interrupt_is_valid(phydev)) {
> > + device_set_wakeup_capable(dev, true);
> > + devm_pm_set_wake_irq(dev, phydev->irq);
> > + }
>
> I'm wondering whether this should just check for the "wakeup-source"
> property, which would allow for PMEB mode, and if we don't have a valid
> interrupt, we set the INTB/PMEB pin to PMEB mode here. In other words:
>
> if (device_property_read_bool(dev, "wakeup-source")) {
> device_set_wakeup_capable(dev, true);
> if (phy_interrupt_is_valid(phydev)) {
> devm_pm_set_wake_irq(dev, phydev->irq);
> } else {
> ret = phy_modify_paged(phydev, RTL8211F_INTBCR_PAGE,
> RTL8211F_INTBCR,
> RTL8211F_INTBCR_INTB_PMEB,
> RTL8211F_INTBCR_INTB_PMEB);
> }
> }
>
> this would support example 3 in the wakeup-source document, where the
> PHY is connected to an interrupt-less power management controller.
>
> Any thoughts?
I guess you have no way to actually test it?
I would probably not support it now. When somebody actually needs it,
this email exists, it points out how to do it.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists