Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (pmbus) Add support for lowest power value attributes

Add support for powerX_input_lowest for both input and output power.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>

+33 -23
+25 -23
drivers/hwmon/pmbus/pmbus.h
··· 162 162 #define PMBUS_VIRT_READ_IIN_MAX (PMBUS_VIRT_BASE + 10) 163 163 #define PMBUS_VIRT_RESET_IIN_HISTORY (PMBUS_VIRT_BASE + 11) 164 164 #define PMBUS_VIRT_READ_PIN_AVG (PMBUS_VIRT_BASE + 12) 165 - #define PMBUS_VIRT_READ_PIN_MAX (PMBUS_VIRT_BASE + 13) 166 - #define PMBUS_VIRT_RESET_PIN_HISTORY (PMBUS_VIRT_BASE + 14) 167 - #define PMBUS_VIRT_READ_POUT_AVG (PMBUS_VIRT_BASE + 15) 168 - #define PMBUS_VIRT_READ_POUT_MAX (PMBUS_VIRT_BASE + 16) 169 - #define PMBUS_VIRT_RESET_POUT_HISTORY (PMBUS_VIRT_BASE + 17) 170 - #define PMBUS_VIRT_READ_VOUT_AVG (PMBUS_VIRT_BASE + 18) 171 - #define PMBUS_VIRT_READ_VOUT_MIN (PMBUS_VIRT_BASE + 19) 172 - #define PMBUS_VIRT_READ_VOUT_MAX (PMBUS_VIRT_BASE + 20) 173 - #define PMBUS_VIRT_RESET_VOUT_HISTORY (PMBUS_VIRT_BASE + 21) 174 - #define PMBUS_VIRT_READ_IOUT_AVG (PMBUS_VIRT_BASE + 22) 175 - #define PMBUS_VIRT_READ_IOUT_MIN (PMBUS_VIRT_BASE + 23) 176 - #define PMBUS_VIRT_READ_IOUT_MAX (PMBUS_VIRT_BASE + 24) 177 - #define PMBUS_VIRT_RESET_IOUT_HISTORY (PMBUS_VIRT_BASE + 25) 178 - #define PMBUS_VIRT_READ_TEMP2_AVG (PMBUS_VIRT_BASE + 26) 179 - #define PMBUS_VIRT_READ_TEMP2_MIN (PMBUS_VIRT_BASE + 27) 180 - #define PMBUS_VIRT_READ_TEMP2_MAX (PMBUS_VIRT_BASE + 28) 181 - #define PMBUS_VIRT_RESET_TEMP2_HISTORY (PMBUS_VIRT_BASE + 29) 165 + #define PMBUS_VIRT_READ_PIN_MIN (PMBUS_VIRT_BASE + 13) 166 + #define PMBUS_VIRT_READ_PIN_MAX (PMBUS_VIRT_BASE + 14) 167 + #define PMBUS_VIRT_RESET_PIN_HISTORY (PMBUS_VIRT_BASE + 15) 168 + #define PMBUS_VIRT_READ_POUT_AVG (PMBUS_VIRT_BASE + 16) 169 + #define PMBUS_VIRT_READ_POUT_MIN (PMBUS_VIRT_BASE + 17) 170 + #define PMBUS_VIRT_READ_POUT_MAX (PMBUS_VIRT_BASE + 18) 171 + #define PMBUS_VIRT_RESET_POUT_HISTORY (PMBUS_VIRT_BASE + 19) 172 + #define PMBUS_VIRT_READ_VOUT_AVG (PMBUS_VIRT_BASE + 20) 173 + #define PMBUS_VIRT_READ_VOUT_MIN (PMBUS_VIRT_BASE + 21) 174 + #define PMBUS_VIRT_READ_VOUT_MAX (PMBUS_VIRT_BASE + 22) 175 + #define PMBUS_VIRT_RESET_VOUT_HISTORY (PMBUS_VIRT_BASE + 23) 176 + #define PMBUS_VIRT_READ_IOUT_AVG (PMBUS_VIRT_BASE + 24) 177 + #define PMBUS_VIRT_READ_IOUT_MIN (PMBUS_VIRT_BASE + 25) 178 + #define PMBUS_VIRT_READ_IOUT_MAX (PMBUS_VIRT_BASE + 26) 179 + #define PMBUS_VIRT_RESET_IOUT_HISTORY (PMBUS_VIRT_BASE + 27) 180 + #define PMBUS_VIRT_READ_TEMP2_AVG (PMBUS_VIRT_BASE + 28) 181 + #define PMBUS_VIRT_READ_TEMP2_MIN (PMBUS_VIRT_BASE + 29) 182 + #define PMBUS_VIRT_READ_TEMP2_MAX (PMBUS_VIRT_BASE + 30) 183 + #define PMBUS_VIRT_RESET_TEMP2_HISTORY (PMBUS_VIRT_BASE + 31) 182 184 183 - #define PMBUS_VIRT_READ_VMON (PMBUS_VIRT_BASE + 30) 184 - #define PMBUS_VIRT_VMON_UV_WARN_LIMIT (PMBUS_VIRT_BASE + 31) 185 - #define PMBUS_VIRT_VMON_OV_WARN_LIMIT (PMBUS_VIRT_BASE + 32) 186 - #define PMBUS_VIRT_VMON_UV_FAULT_LIMIT (PMBUS_VIRT_BASE + 33) 187 - #define PMBUS_VIRT_VMON_OV_FAULT_LIMIT (PMBUS_VIRT_BASE + 34) 188 - #define PMBUS_VIRT_STATUS_VMON (PMBUS_VIRT_BASE + 35) 185 + #define PMBUS_VIRT_READ_VMON (PMBUS_VIRT_BASE + 32) 186 + #define PMBUS_VIRT_VMON_UV_WARN_LIMIT (PMBUS_VIRT_BASE + 33) 187 + #define PMBUS_VIRT_VMON_OV_WARN_LIMIT (PMBUS_VIRT_BASE + 34) 188 + #define PMBUS_VIRT_VMON_UV_FAULT_LIMIT (PMBUS_VIRT_BASE + 35) 189 + #define PMBUS_VIRT_VMON_OV_FAULT_LIMIT (PMBUS_VIRT_BASE + 36) 190 + #define PMBUS_VIRT_STATUS_VMON (PMBUS_VIRT_BASE + 37) 189 191 190 192 /* 191 193 * OPERATION
+8
drivers/hwmon/pmbus/pmbus_core.c
··· 1329 1329 .update = true, 1330 1330 .attr = "average", 1331 1331 }, { 1332 + .reg = PMBUS_VIRT_READ_PIN_MIN, 1333 + .update = true, 1334 + .attr = "input_lowest", 1335 + }, { 1332 1336 .reg = PMBUS_VIRT_READ_PIN_MAX, 1333 1337 .update = true, 1334 1338 .attr = "input_highest", ··· 1362 1358 .reg = PMBUS_VIRT_READ_POUT_AVG, 1363 1359 .update = true, 1364 1360 .attr = "average", 1361 + }, { 1362 + .reg = PMBUS_VIRT_READ_POUT_MIN, 1363 + .update = true, 1364 + .attr = "input_lowest", 1365 1365 }, { 1366 1366 .reg = PMBUS_VIRT_READ_POUT_MAX, 1367 1367 .update = true,