net: phy: qcom: generalize some qca808x LED functions
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 6 Feb 2024 17:31:12 +0000 (18:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Feb 2024 15:36:20 +0000 (15:36 +0000)
commit47b930d0dd437af927145dba50a2e2ea1ba97c67
tree8b6c8dbdb05c3dbadb50c24165f244425589f914
parentee9d9807bee0e6af8ca2a4db6f0d1dc0e5b41f44
net: phy: qcom: generalize some qca808x LED functions

Generalize some qca808x LED functions in preparation for qca807x LED
support.

The LED implementation of qca808x and qca807x is the same but qca807x
supports also Fiber port and have different hw control bits for Fiber
port. To limit code duplication introduce micro functions that takes reg
instead of LED index to tweak all the supported LED modes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/qcom/qca808x.c
drivers/net/phy/qcom/qcom-phy-lib.c
drivers/net/phy/qcom/qcom.h