diff options
author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-01-30 22:06:45 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-02-25 21:37:37 +0100 |
commit | 5f85c4d10ef46a5f457a9d337159ff620a0a2191 (patch) | |
tree | f682bee51310c919cd948cf1feef9421760fdc1c /drivers | |
parent | dt-bindings: vendor-prefixes: add Amphenol (diff) | |
download | linux-5f85c4d10ef46a5f457a9d337159ff620a0a2191.tar.xz linux-5f85c4d10ef46a5f457a9d337159ff620a0a2191.zip |
hwmon: (core) Add support for humidity min/max alarm
Add min_alarm and max_alarm attributes for humidityX to support devices
that can generate these alarms.
Such attributes already exist for other magnitudes such as tempX.
Tested with a ChipCap 2 temperature-humidity sensor.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240130-topic-chipcap2-v6-2-260bea05cf9b@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/hwmon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 18705049ad61..3b259c425ab7 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -587,6 +587,8 @@ static const char * const hwmon_humidity_attr_templates[] = { [hwmon_humidity_fault] = "humidity%d_fault", [hwmon_humidity_rated_min] = "humidity%d_rated_min", [hwmon_humidity_rated_max] = "humidity%d_rated_max", + [hwmon_humidity_min_alarm] = "humidity%d_min_alarm", + [hwmon_humidity_max_alarm] = "humidity%d_max_alarm", }; static const char * const hwmon_fan_attr_templates[] = { |