[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201125104242.GD25562@amd>
Date: Wed, 25 Nov 2020 11:42:42 +0100
From: Pavel Machek <pavel@....cz>
To: Marek Behún <marek.behun@....cz>
Cc: linux-leds@...r.kernel.org, Dan Murphy <dmurphy@...com>,
Ondřej Jirman <megous@...ous.com>,
Russell King <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, linux-kernel@...r.kernel.org,
Matthias Schiffer <matthias.schiffer@...tq-group.com>,
Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH leds + devicetree v2 2/2] leds: trigger: netdev: parse
`trigger-sources` from device tree
Hi!
> Allow setting netdev LED trigger as default when given LED DT node has
> the `trigger-sources` property pointing to a node corresponding to a
> network device.
>
> The specific netdev trigger mode is determined from the `function` LED
> property.
Sounds reasonable.
> + netdev = of_find_net_device_by_node(args.np);
> + if (!netdev)
> + return false;
> +
> + np = dev_of_node(led_cdev->dev);
> + if (!np)
> + return false;
Missing of_node_put?
> +++ b/include/dt-bindings/leds/common.h
> @@ -77,6 +77,7 @@
> #define LED_FUNCTION_HEARTBEAT "heartbeat"
> #define LED_FUNCTION_INDICATOR "indicator"
> #define LED_FUNCTION_LAN "lan"
> +#define LED_FUNCTION_LINK "link"
> #define LED_FUNCTION_MAIL "mail"
> #define LED_FUNCTION_MTD "mtd"
> #define LED_FUNCTION_PANIC "panic"
We have function "lan" already defined; "link" would do mostly same
thing. Should we use "lan"? Or should we delete "lan" and replace it
with "link"?
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists