diff options
author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-01-31 00:06:45 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-02-25 23:37:37 +0300 |
commit | 5f85c4d10ef46a5f457a9d337159ff620a0a2191 (patch) | |
tree | f682bee51310c919cd948cf1feef9421760fdc1c /drivers/hwmon | |
parent | cc804e48fef1535150f7b300b81990230b8a10f0 (diff) | |
download | linux-5f85c4d10ef46a5f457a9d337159ff620a0a2191.tar.xz |
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/hwmon')
-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[] = { |