aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
2012-03-18hwmon: convert drivers/hwmon/* to use module_i2c_driver()Gravatar Axel Lin 74-909/+74
This patch converts the drivers in drivers/hwmon/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com> Cc: David George <david.george@ska.ac.za> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (vt8231) Fix multi-line commentsGravatar Guenter Roeck 1-77/+87
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (adt7475) Fix multi-line commentsGravatar Guenter Roeck 1-32/+58
Cc: Jean Delvare <khali@linux-fr.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (f71805f) Fix checkpatch issuesGravatar Guenter Roeck 1-51/+136
Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: need consistent spacing around '|' (ctx:VxW) WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead WARNING: static const char * array should probably be static const char * const Also modified multi-line comments to follow Documents/Codingstyle. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18hwmon: (max6650) Fix multi-line commentsGravatar Guenter Roeck 1-23/+28
Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (w83781d) Fix checkpatch issuesGravatar Guenter Roeck 1-54/+92
Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: space prohibited after that open parenthesis '(' ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) WARNING: line over 80 characters WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead WARNING: space prohibited between function name and open parenthesis '(' Not fixed (false positive): ERROR: Macros with multiple statements should be enclosed in a do - while loop ERROR: Macros with complex values should be enclosed in parenthesis Not all fixed (code complexity): ERROR: do not use assignment in if condition Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (adm1025) Fix checkpatch issuesGravatar Guenter Roeck 1-17/+46
Fixed: ERROR: do not use assignment in if condition ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: trailing whitespace WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Not fixed: ERROR: Macros with multiple statements should be enclosed in a do - while loop Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (abituguru3) Fix checkpatch issuesGravatar Guenter Roeck 1-21/+35
Fixed: ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" WARNING: line over 80 characters Not fixed: WARNING: msleep < 20ms can sleep for up to 20ms Cc: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (vt8231) Fix checkpatch issuesGravatar Guenter Roeck 1-33/+94
Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing statements should be on next line WARNING: braces {} are not necessary for any arm of this statement WARNING: line over 80 characters WARNING: please, no space before tabs WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Not fixed (false positive): ERROR: Macros with multiple statements should be enclosed in a do - while loop Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (max6650) Fix checkpatch issuesGravatar Guenter Roeck 1-50/+63
Fixed: ERROR: do not use assignment in if condition ERROR: open brace '{' following struct go on the same line ERROR: spaces required around that '||' (ctx:VxV) ERROR: switch and case should be at the same indent WARNING: simple_strtoul is obsolete, use kstrtoul instead Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (pmbus) Replace strict_strtol with kstrtolGravatar Guenter Roeck 1-1/+1
strict_strtol is deprecated and results in a checkpatch warning. Replace it with kstrtol. Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (lm83) fix checkpatch issuesGravatar Frans Meulenbroeks 1-5/+12
resolved: ERROR: trailing whitespace WARNING: please, no spaces at the start of a line WARNING: simple_strtol is obsolete, use kstrtol instead ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (k8temp) fix checkpatch issuesGravatar Frans Meulenbroeks 1-7/+8
resolved: WARNING: line over 80 characters ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (lm80) reset device if error occurredGravatar Frans Meulenbroeks 1-0/+6
If an error occurs while updating (e.g. because the chip was disconnected) the device needs to be reinitialized in order to get back to 11 bit temperature and set the fan divider. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (lm80) fix checkpatch warningsGravatar Frans Meulenbroeks 1-4/+16
fix: WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> [guenter.roeck@ericsson.com: kstrtol->kstrtoul where appropriate] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (adt7470) fix checkpatch issuesGravatar Frans Meulenbroeks 1-3/+3
fixed: ERROR: that open brace { should be on the previous line #1135: FILE: adt7470.c:1135: +static struct attribute *adt7470_attr[] = +{ ERROR: do not use assignment in if condition #1279: FILE: adt7470.c:1279: + if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (adt7411) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: please, no space before tabs #11: FILE: adt7411.c:11: + * ^I use power-down mode for suspend?, interrupt handling?$ not fixed as all other macros around it are the same structure and this one is only 2 chars longer: WARNING: line over 80 characters #229: FILE: adt7411.c:229: +static ADT7411_BIT_ATTR(fast_sampling, ADT7411_REG_CFG3, ADT7411_CFG3_ADC_CLK_225); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (lm70) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: ERROR: spaces required around that '=' (ctx:VxV) #60: FILE: lm70.c:60: + s16 raw=0; ^ ERROR: do not use assignment in if condition #168: FILE: lm70.c:168: + if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input)) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (f71882fg) fix checkpatch issuesGravatar Frans Meulenbroeks 1-2/+2
fixed: WARNING: static const char * array should probably be static const char * const +static const char *f71882fg_names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (asus_atk0110) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+2
fixed: WARNING: line over 80 characters #1321: FILE: asus_atk0110.c:1321: + if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (adt7475) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: static const char * array should probably be static const char * const + static const char *names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (smm665) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: please, no spaces at the start of a line #379: FILE: smm665.c:379: + static ssize_t smm665_show_##what(struct device *dev, \$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (sht15) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: line over 80 characters #809: FILE: sht15.c:809: + /* If still not occurred or another handler has been scheduled */ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (ibmaem) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: please, no space before tabs +{"power3_average", ^I aem2_show_pcap_value,^IPOWER_AUX},$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (ad7414) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+5
fixed: WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133: + long temp = simple_strtol(buf, NULL, 10); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (ad7418) fix checkpatch issuesGravatar Frans Meulenbroeks 1-3/+9
fixed: WARNING: simple_strtol is obsolete, use kstrtol instead + long temp = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if (!(data = kzalloc(sizeof(struct ad7418_data), GFP_KERNEL))) { ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (w83l785ts) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: ERROR: trailing whitespace + $ WARNING: please, no spaces at the start of a line + $ not fixed (did not want to break url): WARNING: line over 80 characters + * http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L785TS-S.pdf Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (wm831x-hwmon) fix checkpatch issuesGravatar Frans Meulenbroeks 1-1/+1
fixed: WARNING: static const char * array should probably be static const char * const +static const char *input_names[] = { not fixed (will probably provide separate fix later) ERROR: Macros with multiple statements should be enclosed in a do - while loop +#define WM831X_NAMED_VOLTAGE(id, name) \ + WM831X_VOLTAGE(id, name); \ + static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label, \ + NULL, name) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: fix checkpatch issuesGravatar Frans Meulenbroeks 1-3/+2
fixed: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_register); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_unregister); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (adm1029) fix checkpatch issuesGravatar Frans Meulenbroeks 1-3/+7
fixed: ERROR: space prohibited after that open parenthesis '(' +#define DIV_FROM_REG(val) ( 1 << (((val) >> 6) - 1)) WARNING: simple_strtol is obsolete, use kstrtol instead + long val = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (g760a) fix checkpatch issuesGravatar Frans Meulenbroeks 1-2/+2
fixed: ERROR: code indent should use tabs where possible + fan speed PWM controller chip$ ERROR: trailing whitespace + http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf $ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (i5k_amb) fix checkpatch issuesGravatar Frans Meulenbroeks 1-3/+15
fixed: WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: use DEFINE_PCI_DEVICE_TABLEGravatar Frans Meulenbroeks 5-5/+5
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: remove () used with returnGravatar Frans Meulenbroeks 8-32/+32
fix checkpatch ERROR: return is not a function, parentheses are not required Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (amc6821) fix initialisationGravatar Frans Meulenbroeks 1-1/+1
fix checkpatch error: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: (lm80) add error handlingGravatar Frans Meulenbroeks 1-31/+101
The LM80 driver currently does not return errors after I2C access failures. Add it. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-14hwmon: (zl6100) Enable interval between chip accesses for all chipsGravatar Guenter Roeck 1-9/+3
Intersil reports that all chips supported by the zl6100 driver require an interval between chip accesses, even ZL2004 and ZL6105 which were thought to be safe. Reported-by: Vivek Gani <vgani@intersil.com> Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-13hwmon: (w83627ehf) Fix temp2 source for W83627UHGGravatar Jean Delvare 1-4/+4
Properly set the source of temp2 for the W83627UHG. Also fix a comment right before that, and document the W83627UHG as reporting up to 3 temperatures. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-12hwmon: (w83627ehf) Fix memory leak in probe functionGravatar Guenter Roeck 1-4/+3
The driver probe function leaked memory if creating the cpu0_vid attribute file failed. Fix by converting the driver to use devm_kzalloc. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 2.6.32+ Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-12hwmon: (w83627ehf) Fix writing into fan_stop_time for NCT6775F/NCT6776FGravatar Guenter Roeck 1-1/+1
NCT6775F and NCT6776F have their own set of registers for FAN_STOP_TIME. The correct registers were used to read FAN_STOP_TIME, but writes used the wrong registers. Fix it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-07hwmon: (jc42) Add support for AT30TS00, TS3000GB2, TSE2002GB2, and MCP9804Gravatar Guenter Roeck 2-5/+21
Also update IDT datasheet locations. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-07hwmon: (zl6100) Maintain delay parameter in driver instance dataGravatar Guenter Roeck 1-4/+6
A global delay parameter has the side effect of being overwritten with 0 if a single ZL2004 or ZL6105 is instantiated. If other chips supported by the same driver are in the system, this will result in access errors for those chips. To solve the problem, keep a per-instance copy of the delay parameter, and do not change the original parameter. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 3.1+ Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-07hwmon: (pmbus_core) Fix maximum number of POUT alarm attributesGravatar Guenter Roeck 1-1/+2
There are up to three POUT alarm attributes, not two, since cap_alarm was added. Reported-by: Michele Petracca <mi.petracca@gmail.com> Cc: stable@vger.kernel.org # 3.0+ [3.0 will need backport] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-07hwmon: (jc42) Add support for ST Microelectronics STTS2002 and STTS3000Gravatar Jean Delvare 2-1/+12
These are fully compatible with Jedec JC 42.4 as far as I can see. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02hwmon: (f75375s) Catch some attempts to write to r/o registersGravatar Nikolaus Schulz 1-0/+27
It makes no sense to attempt to manually configure the fan in auto mode, or set the duty cycle directly in closed loop mode. The corresponding registers are then read-only. If the user tries it nonetheless, error out with EINVAL instead of silently doing nothing. Signed-off-by: Nikolaus Schulz <mail@microschulz.de> [guenter.roeck@ericsson.com: Minor formatting cleanup] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enableGravatar Nikolaus Schulz 1-8/+34
The F75387 supports automatic fan control using either PWM duty cycle or RPM speed values. Make the driver detect the latter mode, and expose the different modes in sysfs as per pwm_enable, so that the user can switch between them. The interpretation of the pwm_enable attribute for the F75387 is adjusted to be a superset of those values used for similar Fintek chips which do not support automatic duty mode, with 2 mapping to automatic speed mode, and moving automatic duty mode to the new value 4. Toggling the duty mode via pwm_enable is currently denied for the F75387, as the chip then simply reinterprets the fan configuration register values according to the new mode, switching between RPM and PWM units, which makes this a dangerous operation. This patch introduces a new pwm mode into the driver. This is necessary because the new mode (automatic pwm mode, 4) may already be enabled by the BIOS, and the driver should not break existing functionality. This was seen on at least one board. Signed-off-by: Nikolaus Schulz <mail@microschulz.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-02-28hwmon: (f75375s) Make pwm*_mode writable for the F75387Gravatar Nikolaus Schulz 1-1/+1
Signed-off-by: Nikolaus Schulz <mail@microschulz.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-02-28hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387Gravatar Nikolaus Schulz 1-5/+13
For the F75387, the register holding the current PWM duty cycle value is r/o; changing it requires writing to the fan expect register instead. Signed-off-by: Nikolaus Schulz <mail@microschulz.de> [guenter.roeck@ericsson.com: Simplified function parameters] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-02-24hwmon: (max34440) Fix resetting temperature historyGravatar Guenter Roeck 1-1/+1
Temperature history is reset by writing 0x8000 into the peak temperature register, not 0xffff. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-02-23hwmon: (f75375s) Fix register write order when setting fans to full speedGravatar Nikolaus Schulz 1-4/+3
By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan to full speed. In the f75375s driver, this need be done by enabling manual fan control, plus duty mode for the F875387 chip, and then setting the maximum duty cycle. Fix a bug where the two necessary register writes were swapped, effectively discarding the setting to full-speed. Signed-off-by: Nikolaus Schulz <mail@microschulz.de> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>