From: Andrew Lunn <andrew@lunn.ch>
To: Artem Shimko <a.shimko.dev@gmail.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
maxime.chevallier@bootlin.com, pavel@ucw.cz,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-leds@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] net: phy: dap8211r: add led hardware control support
Date: Fri, 13 Nov 2026 21:32:55 +0100 [thread overview]
Message-ID: <8ef5b0a7-58f6-4c62-8153-6a9c8d3703f7@lunn.ch> (raw)
In-Reply-To: <20261113110546.173624-4-a.shimko.dev@gmail.com>
> +#define DAP8211R_LED_ACT_BLINK BIT(13)
> +#define DAP8211R_LED_FULL_DUPLEX BIT(12)
> +#define DAP8211R_LED_HALF_DUPLEX BIT(11)
> +#define DAP8211R_LED_TX BIT(10)
> +#define DAP8211R_LED_RX BIT(9)
> +#define DAP8211R_LED_LINK_1000 BIT(6)
> +#define DAP8211R_LED_LINK_100 BIT(5)
> +#define DAP8211R_LED_LINK_10 BIT(4)
Do any of these bits allow forced on/off?
> +static int dap8211r_led_hw_is_supported(struct phy_device *phydev, u8 index, unsigned long rules)
> +{
> + switch (index) {
> + case DAP8211R_LED_ID_0:
> + fallthrough;
> + case DAP8211R_LED_ID_1:
> + fallthrough;
> + case DAP8211R_LED_ID_2:
> + break;
You can collapse case statements, without fallthrough, if there is no
code.
It is also possible to do:
case DAP8211R_LED_ID_0..DAP8211R_LED_ID_2:
Andrew
prev parent reply other threads:[~2026-11-13 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 11:05 [PATCH net-next 0/3] net: phy: dap8211r: add LED hardware control Artem Shimko
2026-11-13 11:05 ` [PATCH net-next 1/3] dt-bindings: net: dptel,dap8211r: add led nodes Artem Shimko
2026-11-13 17:17 ` Conor Dooley
2026-11-13 11:05 ` [PATCH net-next 2/3] net: phy: dap8211r: add extended register write helper Artem Shimko
2026-11-13 20:28 ` Andrew Lunn
2026-11-13 11:05 ` [PATCH net-next 3/3] net: phy: dap8211r: add led hardware control support Artem Shimko
2026-11-13 20:32 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ef5b0a7-58f6-4c62-8153-6a9c8d3703f7@lunn.ch \
--to=andrew@lunn.ch \
--cc=a.shimko.dev@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®