hwmon: (core) Add support for rated attributes
authorZbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
Fri, 31 Jul 2020 19:37:16 +0000 (21:37 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 23 Sep 2020 16:42:39 +0000 (09:42 -0700)
commit1967f712677429f52ac3e8896b5ecfecc2372d95
tree5987d57e7a95f3ced20944e27faf7488ab6a4d1f
parente8e612350f178674ba738ae8ae8fd31467868a05
hwmon: (core) Add support for rated attributes

Adding implementation for new attributes (rated_min/rated_max) for
currentX, inX, powerX, tempX and humidityX.

Tested with OpenBMC stack and simple hwmon driver using
rated_min/rated_max for the following types of sensors: hwmon_temp,
hwmon_in, hwmon_curr, hwmon_power, hwmon_humidity.
For each sensor rated attributes were available and returned
expected values.

Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
Link: https://lore.kernel.org/r/1596224237-32280-3-git-send-email-zbigniew.lukwinski@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c
include/linux/hwmon.h