summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCiprian Regus <ciprian.regus@analog.com>2026-07-08 01:33:31 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-07-21 10:53:24 +0200
commit1d030cdd52ee0042753327601156e7938f2455c1 (patch)
tree73ed71c855c7bbbafecb363184c65a7f74054231 /include
parent7d0e4c4b8c85d8ea2c77a90e1f7a7f74ce531e52 (diff)
downloadlinux-next-1d030cdd52ee0042753327601156e7938f2455c1.tar.gz
linux-next-1d030cdd52ee0042753327601156e7938f2455c1.zip
net: ethernet: oa_tc6: add OA_TC6_BROKEN_PHY quirk flag
Some MAC-PHY devices need custom MDIO bus access functions to work around hardware issues. Add the OA_TC6_BROKEN_PHY quirk flag so drivers can opt in to skip oa_tc6's internal PHY init and manage the PHY themselves. When the flag is set, oa_tc6 skips MDIO bus registration, PHY discovery and PHY connection, leaving these to the driver. Drivers that do not set the flag retain the existing behavior. Update lan865x and the framework documentation accordingly. Signed-off-by: Ciprian Regus <ciprian.regus@analog.com> Link: https://patch.msgid.link/20260708-adin1140-driver-v5-3-4aca7b51a58b@analog.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/oa_tc6.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/oa_tc6.h b/include/linux/oa_tc6.h
index 15f58e3c56c7..62e3d89f80ed 100644
--- a/include/linux/oa_tc6.h
+++ b/include/linux/oa_tc6.h
@@ -12,7 +12,16 @@
struct oa_tc6;
-struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev);
+enum oa_tc6_quirk_flag {
+ OA_TC6_BROKEN_PHY = BIT(0),
+};
+
+struct oa_tc6_quirks {
+ enum oa_tc6_quirk_flag quirk_flags;
+};
+
+struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev,
+ struct oa_tc6_quirks *quirks);
void oa_tc6_exit(struct oa_tc6 *tc6);
int oa_tc6_write_register(struct oa_tc6 *tc6, u32 address, u32 value);
int oa_tc6_write_registers(struct oa_tc6 *tc6, u32 address, u32 value[],