]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: mscc: Consolidate probe functions into a common helper
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 12 Nov 2025 13:57:13 +0000 (13:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 14 Nov 2025 01:48:43 +0000 (17:48 -0800)
commit217eb2d60f564681cf5d57e3571eb52e3ebfa465
treee6d70bf6add9487f8cc5c85aa42b3228b8aa6c2b
parentc31783c2b5ae2399388b349f48fa89818b66f6d8
net: phy: mscc: Consolidate probe functions into a common helper

Unify the probe implementations of the VSC85xx PHY family into a single
vsc85xx_probe_common() helper. The existing probe functions for the
vsc85xx, vsc8514, vsc8574, and vsc8584 variants contained almost
identical initialization logic, differing only in configuration
parameters such as the number of LEDs, supported LED modes, hardware
statistics, and PTP support.

Introduce a vsc85xx_probe_config structure to describe the per-variant
parameters, and move all common setup code into the shared helper. Each
variant's probe function now defines a constant configuration instance
and calls vsc85xx_probe_common().

Also mark the default LED mode array parameter as const to match its
usage.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251112135715.1017117-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/mscc/mscc_main.c