[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd88ed18-d348-42ea-ab15-a0f34f3bea3d@huawei.com>
Date: Wed, 7 Jan 2026 18:12:41 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
CC: <shaojijie@...wei.com>, Andrew Lunn <andrew@...n.ch>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <andrew+netdev@...n.ch>, <horms@...nel.org>,
<Frank.Sae@...or-comm.com>, <hkallweit1@...il.com>, <shenjian15@...wei.com>,
<liuyonglong@...wei.com>, <chenhao418@...wei.com>,
<jonathan.cameron@...wei.com>, <salil.mehta@...wei.com>,
<shiyongbang@...wei.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC net-next 2/6] net: phy: add support to set default
rules
on 2026/1/7 17:50, Russell King (Oracle) wrote:
> On Wed, Jan 07, 2026 at 05:43:08PM +0800, Jijie Shao wrote:
>> on 2026/1/2 19:26, Russell King (Oracle) wrote:
>>> On Wed, Dec 17, 2025 at 08:54:59PM +0800, Jijie Shao wrote:
>>>> on 2025/12/16 15:09, Andrew Lunn wrote:
>>>>> On Mon, Dec 15, 2025 at 08:57:01PM +0800, Jijie Shao wrote:
>>>>>> The node of led need add new property: rules,
>>>>>> and rules can be set as:
>>>>>> BIT(TRIGGER_NETDEV_LINK) | BIT(TRIGGER_NETDEV_RX)
>>>>> Please could you expand this description. It is not clear to my why it
>>>>> is needed. OF systems have not needed it so far. What is special about
>>>>> your hardware?
>>>> I hope to configure the default rules.
>>>> Currently, the LED does not configure rules during initialization; it uses the default rules in the PHY registers.
>>>> I would like to change the default rules during initialization.
>>> One of the issues here is that there are boards out there where the boot
>>> loader has configured the PHY LED configuration - and doesn't supply it
>>> via DT (because PHY LED configuration in the kernel is a new thing.)
>>>
>>> Adding default rules for LEDs will break these platforms.
>>>
>>> Please find a way to provide the LED rules via firmware rather than
>>> introducing some kind of rule defaulting.
>>
>> Actually, in my code, `default_rules` is an optional configuration;
>> you can choose not to set default rules.
> How is that achieved?
I use `fwnode_property_present()` to determine whether the rules exist,
and if they do not exist, I skip the configuration.
+static int fwnode_phy_led_set_rules(struct phy_device *phydev,
+ struct fwnode_handle *led, u32 index)
+{
+ u32 rules;
+ int err;
+
+ if (!fwnode_property_present(led, "rules"))
+ return 0;
Thanks,
Jijie Shao
Powered by blists - more mailing lists