hwmon: (core) Add support for pwm auto channels attribute
authorArmin Wolf <W_Armin@gmx.de>
Thu, 24 Feb 2022 06:12:09 +0000 (07:12 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 28 Feb 2022 01:03:19 +0000 (17:03 -0800)
pwm[1-*]_auto_channels_temp is documented as an official
hwmon sysfs attribute, yet there is no support for it in
the new with_info-API. Fix that.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20220224061210.16452-2-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c
include/linux/hwmon.h

index 0d6c6809f26ccfb70d28ff697f188bef04763b84..989e2c8496dd2d8693bbf9d3c06d319975bcf158 100644 (file)
@@ -604,6 +604,7 @@ static const char * const hwmon_pwm_attr_templates[] = {
        [hwmon_pwm_enable] = "pwm%d_enable",
        [hwmon_pwm_mode] = "pwm%d_mode",
        [hwmon_pwm_freq] = "pwm%d_freq",
+       [hwmon_pwm_auto_channels_temp] = "pwm%d_auto_channels_temp",
 };
 
 static const char * const hwmon_intrusion_attr_templates[] = {
index fad1f1df26df7dbbe2c7d0e0a4921a132775d3c9..eba380b76d157671bd2ea75e27e99e896ea3ac44 100644 (file)
@@ -332,12 +332,14 @@ enum hwmon_pwm_attributes {
        hwmon_pwm_enable,
        hwmon_pwm_mode,
        hwmon_pwm_freq,
+       hwmon_pwm_auto_channels_temp,
 };
 
 #define HWMON_PWM_INPUT                        BIT(hwmon_pwm_input)
 #define HWMON_PWM_ENABLE               BIT(hwmon_pwm_enable)
 #define HWMON_PWM_MODE                 BIT(hwmon_pwm_mode)
 #define HWMON_PWM_FREQ                 BIT(hwmon_pwm_freq)
+#define HWMON_PWM_AUTO_CHANNELS_TEMP   BIT(hwmon_pwm_auto_channels_temp)
 
 enum hwmon_intrusion_attributes {
        hwmon_intrusion_alarm,