]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
hwmon: Add support for samples attributes
authorGuenter Roeck <linux@roeck-us.net>
Mon, 15 Apr 2019 20:23:48 +0000 (13:23 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 16 Apr 2019 00:19:53 +0000 (17:19 -0700)
Add support for the new samples attributes to the hwmon core.

Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c
include/linux/hwmon.h

index c22dc1e079113f9174fe3b6a5bb1b0f6a4c9e724..cd91510a5387d604b86e28af721f3002072b8f70 100644 (file)
@@ -324,6 +324,11 @@ static const char * const hwmon_chip_attrs[] = {
        [hwmon_chip_power_reset_history] = "power_reset_history",
        [hwmon_chip_update_interval] = "update_interval",
        [hwmon_chip_alarms] = "alarms",
+       [hwmon_chip_samples] = "samples",
+       [hwmon_chip_curr_samples] = "curr_samples",
+       [hwmon_chip_in_samples] = "in_samples",
+       [hwmon_chip_power_samples] = "power_samples",
+       [hwmon_chip_temp_samples] = "temp_samples",
 };
 
 static const char * const hwmon_temp_attr_templates[] = {
index 7a8cc06a0d61d003ba2816b1e14a13ba6fe6b61a..2b949fa501e1dfa4fc4dc495a66d88a4d3ceccf2 100644 (file)
@@ -40,6 +40,11 @@ enum hwmon_chip_attributes {
        hwmon_chip_register_tz,
        hwmon_chip_update_interval,
        hwmon_chip_alarms,
+       hwmon_chip_samples,
+       hwmon_chip_curr_samples,
+       hwmon_chip_in_samples,
+       hwmon_chip_power_samples,
+       hwmon_chip_temp_samples,
 };
 
 #define HWMON_C_TEMP_RESET_HISTORY     BIT(hwmon_chip_temp_reset_history)
@@ -49,6 +54,11 @@ enum hwmon_chip_attributes {
 #define HWMON_C_REGISTER_TZ            BIT(hwmon_chip_register_tz)
 #define HWMON_C_UPDATE_INTERVAL                BIT(hwmon_chip_update_interval)
 #define HWMON_C_ALARMS                 BIT(hwmon_chip_alarms)
+#define HWMON_C_SAMPLES                        BIT(hwmon_chip_samples)
+#define HWMON_C_CURR_SAMPLES           BIT(hwmon_chip_curr_samples)
+#define HWMON_C_IN_SAMPLES             BIT(hwmon_chip_in_samples)
+#define HWMON_C_POWER_SAMPLES          BIT(hwmon_chip_power_samples)
+#define HWMON_C_TEMP_SAMPLES           BIT(hwmon_chip_temp_samples)
 
 enum hwmon_temp_attributes {
        hwmon_temp_input = 0,