diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-02-03 09:33:38 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2016-02-03 09:33:38 +0000 |
commit | 19b9e14c47cf289758dc465fd44ee282c41c469a (patch) | |
tree | 0f673757582bbc407457df6c81410a92cde5d898 /target/linux/generic/files/include | |
parent | 8ebc9e7539b720deb847ee3480e0d08f9ed68cdc (diff) | |
download | upstream-19b9e14c47cf289758dc465fd44ee282c41c469a.tar.gz upstream-19b9e14c47cf289758dc465fd44ee282c41c469a.tar.bz2 upstream-19b9e14c47cf289758dc465fd44ee282c41c469a.zip |
swconfig: add (PHY) generic helper setting port link
It's quite common for switches to have PHY per port so adding a generic
helper setting link state will help many drivers. It just needs an API
to access PHYs which this patch also adds.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 48621
Diffstat (limited to 'target/linux/generic/files/include')
-rw-r--r-- | target/linux/generic/files/include/linux/switch.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h index 4ada0e5d33..0c4cce7fa5 100644 --- a/target/linux/generic/files/include/linux/switch.h +++ b/target/linux/generic/files/include/linux/switch.h @@ -99,6 +99,9 @@ struct switch_dev_ops { struct switch_port_link *link); int (*get_port_stats)(struct switch_dev *dev, int port, struct switch_port_stats *stats); + + int (*phy_read16)(struct switch_dev *dev, int addr, u8 reg, u16 *value); + int (*phy_write16)(struct switch_dev *dev, int addr, u8 reg, u16 value); }; struct switch_dev { @@ -170,4 +173,7 @@ struct switch_attr { int max; }; +int switch_generic_set_link(struct switch_dev *dev, int port, + struct switch_port_link *link); + #endif /* _LINUX_SWITCH_H */ |