diff options
author | Mark Starovoytov <mstarovoitov@marvell.com> | 2020-07-20 21:32:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-20 18:07:39 -0700 |
commit | 8dcf2ad39fdb2d183b7bd4307c837713e3150b9a (patch) | |
tree | 2c14c831ac90d7d9ca21f9b1f59b4d4f1334e52b /drivers/net/ethernet/aquantia/atlantic/aq_hw.h | |
parent | a89df867ce1a3368015ff6f85ab4a23d2a0aaba1 (diff) | |
download | linux-stable-8dcf2ad39fdb2d183b7bd4307c837713e3150b9a.tar.gz linux-stable-8dcf2ad39fdb2d183b7bd4307c837713e3150b9a.tar.bz2 linux-stable-8dcf2ad39fdb2d183b7bd4307c837713e3150b9a.zip |
net: atlantic: add hwmon getter for MAC temperature
This patch adds the possibility to obtain MAC temperature via hwmon.
On A1 there are two separate temperature sensors.
On A2 there's only one temperature sensor, which is used for reporting
both MAC and PHY temperature.
Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_hw.h')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h index 96d59ee3eb70..95ee1336ac79 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h +++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h @@ -333,6 +333,8 @@ struct aq_hw_ops { int (*hw_set_fc)(struct aq_hw_s *self, u32 fc, u32 tc); int (*hw_set_loopback)(struct aq_hw_s *self, u32 mode, bool enable); + + int (*hw_get_mac_temp)(struct aq_hw_s *self, u32 *temp); }; struct aq_fw_ops { @@ -355,6 +357,8 @@ struct aq_fw_ops { int (*update_stats)(struct aq_hw_s *self); + int (*get_mac_temp)(struct aq_hw_s *self, int *temp); + int (*get_phy_temp)(struct aq_hw_s *self, int *temp); u32 (*get_flow_control)(struct aq_hw_s *self, u32 *fcmode); |