diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-06 19:56:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-06 19:56:51 -0700 |
commit | 7aefd944f038c7469571adb37769cb6f3924ecfa (patch) | |
tree | f0a8dc23633b6bbbc4f0bff932f332e847fb6c1b /drivers/hwmon/nct7904.c | |
parent | ffa6f55eb6188ee73339cab710fabf30d13110a7 (diff) | |
parent | 39abe9d88b30a51029b0b29a708a4f4459034565 (diff) |
Merge tag 'hwmon-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
- Add driver for Intersil ISL68137 PWM Controller
- Add driver for Lochnagar 2
- Add driver for Infineon IR38064 Voltage Regulator
- Add support for TMP75B to lm75 driver
- Convert documentation to ReST format
- Use request_muxed_region for Super-IO accesses in several drivers
- Add 'samples' attribute to ABI, and start using it
- Add support for custom sysfs attributes to pmbus drivers (used in
ISL68137 driver)
- Introduce HWMON_CHANNEL_INFO macro
- Automated changes:
- Use permission specific [SENSOR_][DEVICE_]ATTR variants
- Fix build warnings due to unused of_device_id structures
- Use HWMON_CHANNEL_INFO macro
- Various minor improvements and fixes
* tag 'hwmon-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (125 commits)
hwmon: (lm75) Add support for TMP75B
dt-bindings: hwmon: Add tmp75b to lm75.txt
hwmon: (s3c) Use dev_get_drvdata()
hwmon: (max6650) Drop call to thermal_cdev_update
docs: hwmon: remove the extension from .rst files
docs: hwmon: convert three docs to ReST format
hwmon: (max6650) add thermal cooling device capability
hwmon: (ina3221) Add voltage conversion time settings
hwmon: (ina3221) Do not read-back to cache reg_config
docs: hwmon: Add an index file and rename docs to *.rst
docs: hwmon: convert remaining files to ReST format
docs: hwmon: misc files: convert to ReST format
docs: hwmon: pmbus files: convert to ReST format
docs: hwmon: k8temp, w83793: convert to ReST format
docs: hwmon: da9052, da9055: convert to ReST format
docs: hwmon: wm831x, wm8350: convert to ReST format
docs: hwmon: dme1737, vt1211: convert to ReST format
docs: hwmon: ads1015: convert to ReST format
docs: hwmon: asc7621: convert to ReST format
docs: hwmon: ibmpowernv: convert to ReST format
...
Diffstat (limited to 'drivers/hwmon/nct7904.c')
-rw-r--r-- | drivers/hwmon/nct7904.c | 128 |
1 files changed, 46 insertions, 82 deletions
diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c index 82c7de7b4639..04516789b070 100644 --- a/drivers/hwmon/nct7904.c +++ b/drivers/hwmon/nct7904.c @@ -400,89 +400,53 @@ static int nct7904_detect(struct i2c_client *client, return 0; } -static const u32 nct7904_in_config[] = { - HWMON_I_INPUT, /* dummy, skipped in is_visible */ - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - HWMON_I_INPUT, - 0 -}; - -static const struct hwmon_channel_info nct7904_in = { - .type = hwmon_in, - .config = nct7904_in_config, -}; - -static const u32 nct7904_fan_config[] = { - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - HWMON_F_INPUT, - 0 -}; - -static const struct hwmon_channel_info nct7904_fan = { - .type = hwmon_fan, - .config = nct7904_fan_config, -}; - -static const u32 nct7904_pwm_config[] = { - HWMON_PWM_INPUT | HWMON_PWM_ENABLE, - HWMON_PWM_INPUT | HWMON_PWM_ENABLE, - HWMON_PWM_INPUT | HWMON_PWM_ENABLE, - HWMON_PWM_INPUT | HWMON_PWM_ENABLE, - 0 -}; - -static const struct hwmon_channel_info nct7904_pwm = { - .type = hwmon_pwm, - .config = nct7904_pwm_config, -}; - -static const u32 nct7904_temp_config[] = { - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - HWMON_T_INPUT, - 0 -}; - -static const struct hwmon_channel_info nct7904_temp = { - .type = hwmon_temp, - .config = nct7904_temp_config, -}; - static const struct hwmon_channel_info *nct7904_info[] = { - &nct7904_in, - &nct7904_fan, - &nct7904_pwm, - &nct7904_temp, + HWMON_CHANNEL_INFO(in, + HWMON_I_INPUT, /* dummy, skipped in is_visible */ + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT, + HWMON_I_INPUT), + HWMON_CHANNEL_INFO(fan, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT, + HWMON_F_INPUT), + HWMON_CHANNEL_INFO(pwm, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE, + HWMON_PWM_INPUT | HWMON_PWM_ENABLE), + HWMON_CHANNEL_INFO(temp, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT, + HWMON_T_INPUT), NULL }; |