summaryrefslogtreecommitdiffstats
path: root/include/linux/hwmon.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-06-26 15:20:46 -0400
committerGuenter Roeck <linux@roeck-us.net>2016-09-09 00:34:15 -0400
commitf9f7bb3a0efafb662a4c639bc62df1df2b7321f9 (patch)
tree80410b6cf71b802f7965c5b120f6ee0c1709b816 /include/linux/hwmon.h
parentbf7153fd2c6f70c1f1c75c0a4d353c2384dc94eb (diff)
hwmon: (core) Add basic pwm attribute support to new API
Add basic pwm attribute support (no auto attributes) to new API. Reviewed-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/linux/hwmon.h')
-rw-r--r--include/linux/hwmon.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
index 74e89d45ff67..9d2f8bde7d12 100644
--- a/include/linux/hwmon.h
+++ b/include/linux/hwmon.h
@@ -28,6 +28,7 @@ enum hwmon_sensor_types {
28 hwmon_energy, 28 hwmon_energy,
29 hwmon_humidity, 29 hwmon_humidity,
30 hwmon_fan, 30 hwmon_fan,
31 hwmon_pwm,
31}; 32};
32 33
33enum hwmon_chip_attributes { 34enum hwmon_chip_attributes {
@@ -272,6 +273,18 @@ enum hwmon_fan_attributes {
272#define HWMON_F_MAX_ALARM BIT(hwmon_fan_max_alarm) 273#define HWMON_F_MAX_ALARM BIT(hwmon_fan_max_alarm)
273#define HWMON_F_FAULT BIT(hwmon_fan_fault) 274#define HWMON_F_FAULT BIT(hwmon_fan_fault)
274 275
276enum hwmon_pwm_attributes {
277 hwmon_pwm_input,
278 hwmon_pwm_enable,
279 hwmon_pwm_mode,
280 hwmon_pwm_freq,
281};
282
283#define HWMON_PWM_INPUT BIT(hwmon_pwm_input)
284#define HWMON_PWM_ENABLE BIT(hwmon_pwm_enable)
285#define HWMON_PWM_MODE BIT(hwmon_pwm_mode)
286#define HWMON_PWM_FREQ BIT(hwmon_pwm_freq)
287
275/** 288/**
276 * struct hwmon_ops - hwmon device operations 289 * struct hwmon_ops - hwmon device operations
277 * @is_visible: Callback to return attribute visibility. Mandatory. 290 * @is_visible: Callback to return attribute visibility. Mandatory.