summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
...
* | hwmon: (lm63) Make fan speed control strategy changeableJean Delvare2012-03-231-16/+89
| | | | | | | | | | | | | | | | | | Let the user switch between automatic and manual fan speed control. Before switching to automatic fan speed control, we always check that the lookup table looks sane. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
* | hwmon: (lm63) Reorganize the codeJean Delvare2012-03-231-206/+187
| | | | | | | | | | | | | | | | | | Reorder functions and driver declaration to no longer need to forward-declare functions. Also rename new_client to just client everywhere for readability. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
* | hwmon: (lm90) Restore original configuration if probe function failsGuenter Roeck2012-03-231-8/+13
| | | | | | | | | | | | | | | | | | The lm90 driver restores the original chip configuration in its exit function. However, the chip configuration is not restored if the probe function fails. Restore it there as well. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: (lm90) Add support for GMT G781Guenter Roeck2012-03-232-2/+20
| | | | | | | | | | | | | | | | | | GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver. Cc: Mike Gorchak <lestat@i.com.ua> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: (lm90) Fix multi-line commentsGuenter Roeck2012-03-231-24/+34
| | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: (w83795) Fix multi-line commentsGuenter Roeck2012-03-231-32/+62
| | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: (w83795) Unconditionally support manual fan speed controlJean Delvare2012-03-232-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Manual fan speed control uses a standard interface and has received sufficient testing and review by now, it can be enabled unconditionally. This includes attributes pwm[1-8], pwm[1-8]_enable, pwm[1-8]_mode and pwm[1-8]_freq. We only let the user switch from automatic mode to manual mode, but not the other way around, as automatic control settings may not have been set properly by the BIOS. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
* | hwmon: (fam15h_power) Increase output resolutionAndre Przywara2012-03-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | On high CPU load the accumulating values in the running_avg_cap register are very low (below 10), so averaging them too early leads to unnecessary poor output resolution. Since we pretend to output micro-Watt we better keep all the bits we have as long as possible. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: (fam15h_power) Correct sign extension of running_avg_captureAndreas Herrmann2012-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Wrong bit was used for sign extension which caused wrong end results. Thanks to Andre for spotting this bug. Reported-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org
* | Merge tag 'hwmon-for-linus' of ↵Linus Torvalds2012-03-21121-6178/+8489
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * | hwmon: (sch56xx) Add support for the integrated watchdog (v2)Hans de Goede2012-03-205-7/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the watchdog integrated into the SMSC SCH5627 and SCH5636 superio-s. Since the watchdog is part of the hwmon logical device and thus shares ioports with it, the watchdog driver is integrated into the existing hwmon drivers for these. Note that this version of the watchdog support for sch56xx superio-s implements the watchdog chardev interface itself, rather then relying on the recently added watchdog core / watchdog_dev. This is done because currently some needed functionality is missing from watchdog_dev, as soon as this functionality is added (which is being discussed on the linux-watchdog mailinglist), I'll convert this driver over to using watchdog_dev. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [guenter.roeck@ericsson.com: Added missing linux/slab.h include] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * | hwmon: (w83627ehf) Add support for temperature offset registersGuenter Roeck2012-03-181-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | Add support for temperature offset registers for CPUTIN, SYSTIN, and AUXTIN temperatures. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (jc42) Remove unnecessary device IDsGuenter Roeck2012-03-181-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really use or need separate device IDs for the various JC42.4 compliant chips, so remove them and just stick with jc42. Also update a datasheet references for SE98A, STTS424, and STTS424E02. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (zl6100) Add support for ZL9101M and ZL9117MGuenter Roeck2012-03-182-4/+7
| | | | | | | | | | | | | | | | | | | | | ZL9101M and ZL9117M are compatible to ZL6100. Add support to the zl6100 driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (adm1275) Add support for ADM1075Guenter Roeck2012-03-182-6/+86
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (max34440) Add support for MAX34446Guenter Roeck2012-03-182-5/+111
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pmbus) Add more virtual registersGuenter Roeck2012-03-182-29/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add PMBUS_VIRT_READ_TEMP_AVG, PMBUS_VIRT_READ_TEMP2_AVG, PMBUS_VIRT_READ_POUT_AVG, PMBUS_VIRT_READ_POUT_MAX, and PMBUS_VIRT_RESET_POUT_HISTORY. We'll need those for MAX34446. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pmbus) Add support for Lineage Power MDT040Guenter Roeck2012-03-182-1/+3
| | | | | | | | | | | | | | | | | | | | | MDT040 is supported by the generic PMBus driver. Add device ID and reference to datasheet. Also mention Lineage Power device support in Kconfig. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pmbus) Add support for TI TPS40400 and TPS40422Guenter Roeck2012-03-182-1/+3
| | | | | | | | | | | | | | | | | | | | | TPS40400 and TPS40422 are supported by the generic PMBus driver. Add device IDs and data sheet references. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (max34440) Add support for 'lowest' output voltage attributeGuenter Roeck2012-03-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | MAX34440 and compatibles support reporting the lowest measured output voltage. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (jc42) Convert to use devm_kzallocGuenter Roeck2012-03-181-35/+25
| | | | | | | | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Also replace new_client variable with client and introduce dev variable to make the code a bit easier to read. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (max16065) Convert to use devm_kzallocGuenter Roeck2012-03-181-16/+7
| | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (smm665) Convert to use devm_kzallocGuenter Roeck2012-03-181-9/+3
| | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (ltc4261) Convert to use devm_kzallocGuenter Roeck2012-03-181-11/+4
| | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pmbus) Simplify remove functionsGuenter Roeck2012-03-1812-74/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since devm_kzalloc() is now used to allocate driver memory, the client driver remove function has no purpose other than to call pmbus_do_remove(). This means we can get rid of it by redefining pmbus_do_remove() to use the same prototype, and pointing to it directly. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pmbus) Convert pmbus drivers to use devm_kzallocGuenter Roeck2012-03-188-154/+56
| | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (lineage-pem) Convert to use devm_kzallocGuenter Roeck2012-03-181-7/+4
| | | | | | | | | | | | | | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (hwmon-vid) Fix checkpatch issuesGuenter Roeck2012-03-181-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: space required before the open parenthesis '(' WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Not fixed (url): WARNING: line over 80 characters Not fixed (false positive): ERROR: Macros with complex values should be enclosed in parenthesis Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (hwmon-vid) Add new entries to VRM model tableGuenter Roeck2012-03-181-56/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VRM model table was missing several Intel CPUs, resulting in wrong VRM table entries to be used for many recent CPUs. Update it. Also, use values from struct cpuinfo_x86 to retrieve CPU model information instead of re-calculating it locally. Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (lm80) Add detection of NatSemi/TI LM96080Jean Delvare2012-03-182-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * | hwmon: (lm87) Get rid of macro-generated functionsJean Delvare2012-03-181-193/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use SENSORS_DEVICE_ATTR instead of DEVICE_ATTR for most attributes, so that the attribute number can be retrieved and it is no longer necessary to generate functions using macros. This shaves about 2 kB on the binary module size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * | hwmon: (lm87) Reorganize the codeJean Delvare2012-03-181-186/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reorder functions and driver declaration to no longer need to forward-declare functions. Also rename new_client to just client everywhere for readability. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * | hwmon: (applesmc) Silence uninitialized warningsHenrik Rydberg2012-03-181-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some error paths do not set a result, leading to the (false) assumption that the value may be used uninitialized. Set results for those paths as well. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * | hwmon: (lm70) Fix: do not use assignment in if conditionGuenter Roeck2012-03-181-4/+6
| | | | | | | | | | | | | | | | | | | | | Fix checkpatch issue: ERROR: do not use assignment in if condition Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (lm70) Register hwmon device after creating attribute files, and ↵Guenter Roeck2012-03-181-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove it first Register hwmon device as last operation in the probe function to ensure that all attribute files exist when accessed from user applications. Otherwise, there is a short time frame where the device is registered as hwmon device but sysfs attributes do not yet exist. This could result in applications erroneously not detecting attributes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83l786ng) Fix multi-line commentsGuenter Roeck2012-03-181-32/+36
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83l785ts) Fix multi-line commentsGuenter Roeck2012-03-181-6/+9
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83781d) Fix: do not use assignment in if conditionGuenter Roeck2012-03-181-68/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix checkpatch issue: ERROR: do not use assignment in if condition Replace repeated calls to device_create_file() with calls to sysfs_create_group. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83781d) Fix multi-line commentsGuenter Roeck2012-03-181-80/+117
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (smsc47b397) Fix multi-line commentsGuenter Roeck2012-03-181-30/+34
| | | | | | | | | | | | | | | Cc: Mark M Hoffman <mhoffman@lightlink.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (pc87427) Fix multi-line commentsGuenter Roeck2012-03-181-27/+45
| | | | | | | | | | | | | | | | | | Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (max1668) Fix multi-line commentsGuenter Roeck2012-03-181-19/+19
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (lm80) Fix multi-line commentsGuenter Roeck2012-03-181-13/+19
| | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| * | hwmon: (emc2103) Fix multi-line commentsGuenter Roeck2012-03-181-23/+27
| | | | | | | | | | | | | | | Cc: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (adm1031) Fix multi-line commentsGuenter Roeck2012-03-181-27/+33
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (adm1029) Fix multi-line commentsGuenter Roeck2012-03-181-8/+11
| | | | | | | | | | | | | | | Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83627hf) Fix checkpatch issuesGuenter Roeck2012-03-181-90/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead ERROR: do not use assignment in if condition Modify multi-line comments to follow Documentation/CodingStyle. Other checkpatch issues not fixed to reduce number of conflicts with pending rewrite as mfd driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83l786ng) Fix checkpatch issuesGuenter Roeck2012-03-181-33/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: space required after that ',' (ctx:VxV) WARNING: braces {} are not necessary for single statement blocks WARNING: please, no space before tabs WARNING: please, no spaces at the start of a line 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 complex values should be enclosed in parenthesis Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83793) Fix checkpatch issuesGuenter Roeck2012-03-181-181/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: space required after that ',' (ctx:VxV) WARNING: braces {} are not necessary for any arm of this statement WARNING: braces {} are not necessary for single statement blocks WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Modify multi-line comments to follow Documentation/CodingStyle. Also replaced "<constant> == <variable>" with "<variable> == <constant>". Translation was done with the following coccinelle script to limit risk. @@ identifier i; constant C; @@ <... - C == i + i == C ...> Not fixed (false positive): ERROR: Macros with complex values should be enclosed in parenthesis Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * | hwmon: (w83792d) Fix checkpatch issuesGuenter Roeck2012-03-181-148/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: space prohibited after that open parenthesis '(' ERROR: space required after that ',' (ctx:VxV) ERROR: space required after that ',' (ctx:WxV) ERROR: spaces required around that ':' (ctx:VxE) ERROR: spaces required around that '<=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '||' (ctx:VxV) ERROR: spaces required around that ':' (ctx:VxV) ERROR: spaces required around that '?' (ctx:VxV) WARNING: braces {} are not necessary for any arm of this statement WARNING: braces {} are not necessary for single statement blocks 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 '(' Modify multi-line comments to follow Documentation/CodingStyle. Signed-off-by: Guenter Roeck <linux@roeck-us.net>