mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 12:29:44 +07:00
fb470f70fe
This adds HWMON support for the temperature sensor and the related alarms on the 107/108/109 chips. This patch is based on work from Nikita and Andrew. I added: - support for changing alarm thresholds via sysfs - move HWMON code to a separate source file to improve maintainability - smaller changes like using IS_REACHABLE instead of ifdef (avoids problems if PHY driver is built in and HWMON is a module) v2: - remove struct aqr_priv - rename header file to aquantia.h v3: - add conditional compiling of aquantia_hwmon.c - improve converting sensor register values to/from long - add helper aqr_hwmon_test_bit Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
17 lines
447 B
C
17 lines
447 B
C
/* SPDX-License-Identifier: GPL-2.0
|
|
* HWMON driver for Aquantia PHY
|
|
*
|
|
* Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
|
|
* Author: Andrew Lunn <andrew@lunn.ch>
|
|
* Author: Heiner Kallweit <hkallweit1@gmail.com>
|
|
*/
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/phy.h>
|
|
|
|
#if IS_REACHABLE(CONFIG_HWMON)
|
|
int aqr_hwmon_probe(struct phy_device *phydev);
|
|
#else
|
|
static inline int aqr_hwmon_probe(struct phy_device *phydev) { return 0; }
|
|
#endif
|