summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6131.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-05-09 19:22:42 +0200
committerDavid S. Miller <davem@davemloft.net>2016-05-09 20:26:09 +0200
commit6594f615792a52ccb66c07000ade917e8c8f62fd (patch)
treeb4e2a9ba2533843dc3fa06fac45d057100b9e82e /drivers/net/dsa/mv88e6131.c
parentnet: dsa: mv88e6xxx: factorize EEPROM access (diff)
downloadlinux-6594f615792a52ccb66c07000ade917e8c8f62fd.tar.xz
linux-6594f615792a52ccb66c07000ade917e8c8f62fd.zip
net: dsa: mv88e6xxx: factorize temperature access
Add MV88E6XXX_FLAG_TEMP and MV88E6XXX_FLAG_TEMP_LIMIT flags to describe switch models featuring a temperature access. Use them to centralize the access to the temperature feature. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6131.c')
-rw-r--r--drivers/net/dsa/mv88e6131.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c
index ab8c507b8f8c..089f9c05ea38 100644
--- a/drivers/net/dsa/mv88e6131.c
+++ b/drivers/net/dsa/mv88e6131.c
@@ -155,6 +155,12 @@ struct dsa_switch_driver mv88e6131_switch_driver = {
.get_sset_count = mv88e6xxx_get_sset_count,
.get_eeprom = mv88e6xxx_get_eeprom,
.set_eeprom = mv88e6xxx_set_eeprom,
+#ifdef CONFIG_NET_DSA_HWMON
+ .get_temp = mv88e6xxx_get_temp,
+ .get_temp_limit = mv88e6xxx_get_temp_limit,
+ .set_temp_limit = mv88e6xxx_set_temp_limit,
+ .get_temp_alarm = mv88e6xxx_get_temp_alarm,
+#endif
.adjust_link = mv88e6xxx_adjust_link,
.port_bridge_join = mv88e6xxx_port_bridge_join,
.port_bridge_leave = mv88e6xxx_port_bridge_leave,