diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 10:37:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 10:37:25 -0700 |
commit | 31f6765266417c0d99f0e922fe82848a7c9c2ae9 (patch) | |
tree | 2d5914dac0a918baad37decd3845b8c206051420 /drivers/hwmon/f71882fg.c | |
parent | d15d76448bb58c7832e954b6a8f1e301720b7866 (diff) | |
parent | 312869ec935ab3bb67b7ba641a7d11230555aff5 (diff) |
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon changes for v3.4 from Guenter Roeck:
"Mostly cleanup. No new drivers this time around, but support for
several chips added to existing drivers: TPS40400, TPS40422, MTD040,
MAX34446, ZL9101M, ZL9117M, and LM96080. Also, added watchdog support
for SCH56xx, and additional attributes for a couple of drivers."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (137 commits)
hwmon: (sch56xx) Add support for the integrated watchdog (v2)
hwmon: (w83627ehf) Add support for temperature offset registers
hwmon: (jc42) Remove unnecessary device IDs
hwmon: (zl6100) Add support for ZL9101M and ZL9117M
hwmon: (adm1275) Add support for ADM1075
hwmon: (max34440) Add support for MAX34446
hwmon: (pmbus) Add more virtual registers
hwmon: (pmbus) Add support for Lineage Power MDT040
hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
hwmon: (max34440) Add support for 'lowest' output voltage attribute
hwmon: (jc42) Convert to use devm_kzalloc
hwmon: (max16065) Convert to use devm_kzalloc
hwmon: (smm665) Convert to use devm_kzalloc
hwmon: (ltc4261) Convert to use devm_kzalloc
hwmon: (pmbus) Simplify remove functions
hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
hwmon: (lineage-pem) Convert to use devm_kzalloc
hwmon: (hwmon-vid) Fix checkpatch issues
hwmon: (hwmon-vid) Add new entries to VRM model table
hwmon: (lm80) Add detection of NatSemi/TI LM96080
...
Diffstat (limited to 'drivers/hwmon/f71882fg.c')
-rw-r--r-- | drivers/hwmon/f71882fg.c | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index e50305819f01..6d1226365e30 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -112,7 +112,7 @@ MODULE_PARM_DESC(force_id, "Override the detected device ID"); enum chips { f71808e, f71808a, f71858fg, f71862fg, f71869, f71869a, f71882fg, f71889fg, f71889ed, f71889a, f8000, f81865f }; -static const char *f71882fg_names[] = { +static const char *const f71882fg_names[] = { "f71808e", "f71808a", "f71858fg", @@ -252,9 +252,11 @@ struct f71882fg_data { u16 fan_full_speed[4]; u8 fan_status; u8 fan_beep; - /* Note: all models have max 3 temperature channels, but on some - they are addressed as 0-2 and on others as 1-3, so for coding - convenience we reserve space for 4 channels */ + /* + * Note: all models have max 3 temperature channels, but on some + * they are addressed as 0-2 and on others as 1-3, so for coding + * convenience we reserve space for 4 channels + */ u16 temp[4]; u8 temp_ovt[4]; u8 temp_high[4]; @@ -362,7 +364,7 @@ static ssize_t store_pwm_auto_point_temp(struct device *dev, static ssize_t show_name(struct device *dev, struct device_attribute *devattr, char *buf); -static int __devinit f71882fg_probe(struct platform_device * pdev); +static int __devinit f71882fg_probe(struct platform_device *pdev); static int f71882fg_remove(struct platform_device *pdev); static struct platform_driver f71882fg_driver = { @@ -376,8 +378,10 @@ static struct platform_driver f71882fg_driver = { static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); -/* Temp attr for the f71858fg, the f71858fg is special as it has its - temperature indexes start at 0 (the others start at 1) */ +/* + * Temp attr for the f71858fg, the f71858fg is special as it has its + * temperature indexes start at 0 (the others start at 1) + */ static struct sensor_device_attribute_2 f71858fg_temp_attr[] = { SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0), SENSOR_ATTR_2(temp1_max, S_IRUGO|S_IWUSR, show_temp_max, @@ -424,9 +428,11 @@ static struct sensor_device_attribute_2 fxxxx_temp_attr[3][9] = { { store_temp_max, 0, 1), SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, store_temp_max_hyst, 0, 1), - /* Should really be temp1_max_alarm, but older versions did not handle - the max and crit alarms separately and lm_sensors v2 depends on the - presence of temp#_alarm files. The same goes for temp2/3 _alarm. */ + /* + * Should really be temp1_max_alarm, but older versions did not handle + * the max and crit alarms separately and lm_sensors v2 depends on the + * presence of temp#_alarm files. The same goes for temp2/3 _alarm. + */ SENSOR_ATTR_2(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 1), SENSOR_ATTR_2(temp1_crit, S_IRUGO|S_IWUSR, show_temp_crit, store_temp_crit, 0, 1), @@ -485,10 +491,11 @@ static struct sensor_device_attribute_2 fxxxx_temp_beep_attr[3][2] = { { store_temp_beep, 0, 7), } }; -/* Temp attr for the f8000 - Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max) - is used as hysteresis value to clear alarms - Also like the f71858fg its temperature indexes start at 0 +/* + * Temp attr for the f8000 + * Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max) + * is used as hysteresis value to clear alarms + * Also like the f71858fg its temperature indexes start at 0 */ static struct sensor_device_attribute_2 f8000_temp_attr[] = { SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp, NULL, 0, 0), @@ -603,8 +610,10 @@ static struct sensor_device_attribute_2 fxxxx_fan_beep_attr[] = { store_fan_beep, 0, 3), }; -/* PWM attr for the f71862fg, fewer pwms and fewer zones per pwm than the - standard models */ +/* + * PWM attr for the f71862fg, fewer pwms and fewer zones per pwm than the + * standard models + */ static struct sensor_device_attribute_2 f71862fg_auto_pwm_attr[3][7] = { { SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, show_pwm_auto_point_channel, @@ -673,9 +682,11 @@ static struct sensor_device_attribute_2 f71862fg_auto_pwm_attr[3][7] = { { show_pwm_auto_point_temp_hyst, NULL, 3, 2), } }; -/* PWM attr for the f71808e/f71869, almost identical to the f71862fg, but the - pwm setting when the temperature is above the pwmX_auto_point1_temp can be - programmed instead of being hardcoded to 0xff */ +/* + * PWM attr for the f71808e/f71869, almost identical to the f71862fg, but the + * pwm setting when the temperature is above the pwmX_auto_point1_temp can be + * programmed instead of being hardcoded to 0xff + */ static struct sensor_device_attribute_2 f71869_auto_pwm_attr[3][8] = { { SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, show_pwm_auto_point_channel, @@ -925,9 +936,11 @@ static struct sensor_device_attribute_2 f8000_fan_attr[] = { SENSOR_ATTR_2(fan4_input, S_IRUGO, show_fan, NULL, 0, 3), }; -/* PWM attr for the f8000, zones mapped to temp instead of to pwm! - Also the register block at offset A0 maps to TEMP1 (so our temp2, as the - F8000 starts counting temps at 0), B0 maps the TEMP2 and C0 maps to TEMP0 */ +/* + * PWM attr for the f8000, zones mapped to temp instead of to pwm! + * Also the register block at offset A0 maps to TEMP1 (so our temp2, as the + * F8000 starts counting temps at 0), B0 maps the TEMP2 and C0 maps to TEMP0 + */ static struct sensor_device_attribute_2 f8000_auto_pwm_attr[3][14] = { { SENSOR_ATTR_2(pwm1_auto_channels_temp, S_IRUGO|S_IWUSR, show_pwm_auto_point_channel, @@ -2295,8 +2308,10 @@ static int __devinit f71882fg_probe(struct platform_device *pdev) data->temp_config = f71882fg_read8(data, F71882FG_REG_TEMP_CONFIG); if (data->temp_config & 0x10) - /* The f71858fg temperature alarms behave as - the f8000 alarms in this mode */ + /* + * The f71858fg temperature alarms behave as + * the f8000 alarms in this mode + */ err = f71882fg_create_sysfs_files(pdev, f8000_temp_attr, ARRAY_SIZE(f8000_temp_attr)); |