diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-05-09 19:22:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 20:26:09 +0200 |
commit | 6594f615792a52ccb66c07000ade917e8c8f62fd (patch) | |
tree | b4e2a9ba2533843dc3fa06fac45d057100b9e82e /drivers/net/dsa/mv88e6xxx.h | |
parent | net: dsa: mv88e6xxx: factorize EEPROM access (diff) | |
download | linux-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 '')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h index 0181f6775bfc..9ddb6d04389e 100644 --- a/drivers/net/dsa/mv88e6xxx.h +++ b/drivers/net/dsa/mv88e6xxx.h @@ -366,12 +366,20 @@ enum mv88e6xxx_cap { * GLOBAL2_SMI_OP, otherwise direct access to PHY registers is done. */ MV88E6XXX_CAP_SMI_PHY, + + /* Internal temperature sensor. + * Available from any enabled port's PHY register 26, page 6. + */ + MV88E6XXX_CAP_TEMP, + MV88E6XXX_CAP_TEMP_LIMIT, }; /* Bitmask of capabilities */ #define MV88E6XXX_FLAG_EEPROM BIT(MV88E6XXX_CAP_EEPROM) #define MV88E6XXX_FLAG_PPU BIT(MV88E6XXX_CAP_PPU) #define MV88E6XXX_FLAG_SMI_PHY BIT(MV88E6XXX_CAP_SMI_PHY) +#define MV88E6XXX_FLAG_TEMP BIT(MV88E6XXX_CAP_TEMP) +#define MV88E6XXX_FLAG_TEMP_LIMIT BIT(MV88E6XXX_CAP_TEMP_LIMIT) #define MV88E6XXX_FLAGS_FAMILY_6095 \ MV88E6XXX_FLAG_PPU @@ -379,21 +387,27 @@ enum mv88e6xxx_cap { #define MV88E6XXX_FLAGS_FAMILY_6097 \ MV88E6XXX_FLAG_PPU -#define MV88E6XXX_FLAGS_FAMILY_6165 0 +#define MV88E6XXX_FLAGS_FAMILY_6165 \ + MV88E6XXX_FLAG_TEMP #define MV88E6XXX_FLAGS_FAMILY_6185 \ MV88E6XXX_FLAG_PPU #define MV88E6XXX_FLAGS_FAMILY_6320 \ (MV88E6XXX_FLAG_EEPROM | \ - MV88E6XXX_FLAG_SMI_PHY) + MV88E6XXX_FLAG_SMI_PHY | \ + MV88E6XXX_FLAG_TEMP | \ + MV88E6XXX_FLAG_TEMP_LIMIT) #define MV88E6XXX_FLAGS_FAMILY_6351 \ - MV88E6XXX_FLAG_SMI_PHY + (MV88E6XXX_FLAG_SMI_PHY | \ + MV88E6XXX_FLAG_TEMP) #define MV88E6XXX_FLAGS_FAMILY_6352 \ (MV88E6XXX_FLAG_EEPROM | \ - MV88E6XXX_FLAG_SMI_PHY) + MV88E6XXX_FLAG_SMI_PHY | \ + MV88E6XXX_FLAG_TEMP | \ + MV88E6XXX_FLAG_TEMP_LIMIT) struct mv88e6xxx_info { enum mv88e6xxx_family family; |