Lines Matching full:phydev

42 static int aqr_hwmon_get(struct phy_device *phydev, int reg, long *value)  in aqr_hwmon_get()  argument
44 int temp = phy_read_mmd(phydev, MDIO_MMD_VEND1, reg); in aqr_hwmon_get()
55 static int aqr_hwmon_set(struct phy_device *phydev, int reg, long value) in aqr_hwmon_set() argument
65 return phy_write_mmd(phydev, MDIO_MMD_VEND1, reg, (u16)temp); in aqr_hwmon_set()
68 static int aqr_hwmon_test_bit(struct phy_device *phydev, int reg, int bit) in aqr_hwmon_test_bit() argument
70 int val = phy_read_mmd(phydev, MDIO_MMD_VEND1, reg); in aqr_hwmon_test_bit()
78 static int aqr_hwmon_status1(struct phy_device *phydev, int bit, long *value) in aqr_hwmon_status1() argument
80 int val = aqr_hwmon_test_bit(phydev, VEND1_GENERAL_STAT1, bit); in aqr_hwmon_status1()
93 struct phy_device *phydev = dev_get_drvdata(dev); in aqr_hwmon_read() local
101 reg = aqr_hwmon_test_bit(phydev, VEND1_THERMAL_STAT2, in aqr_hwmon_read()
108 return aqr_hwmon_get(phydev, VEND1_THERMAL_STAT1, value); in aqr_hwmon_read()
111 return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_LOW_TEMP_FAIL, in aqr_hwmon_read()
114 return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_LOW_TEMP_WARN, in aqr_hwmon_read()
117 return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_WARN, in aqr_hwmon_read()
120 return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_FAIL, in aqr_hwmon_read()
123 return aqr_hwmon_status1(phydev, in aqr_hwmon_read()
127 return aqr_hwmon_status1(phydev, in aqr_hwmon_read()
131 return aqr_hwmon_status1(phydev, in aqr_hwmon_read()
135 return aqr_hwmon_status1(phydev, in aqr_hwmon_read()
146 struct phy_device *phydev = dev_get_drvdata(dev); in aqr_hwmon_write() local
153 return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_LOW_TEMP_FAIL, in aqr_hwmon_write()
156 return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_LOW_TEMP_WARN, in aqr_hwmon_write()
159 return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_WARN, in aqr_hwmon_write()
162 return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_FAIL, in aqr_hwmon_write()
190 int aqr_hwmon_probe(struct phy_device *phydev) in aqr_hwmon_probe() argument
192 struct device *dev = &phydev->mdio.dev; in aqr_hwmon_probe()
211 phydev, &aqr_hwmon_chip_info, NULL); in aqr_hwmon_probe()