aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-23hwmon: (lm63) Reorganize the codeJean Delvare1-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>
2012-03-23hwmon: (lm90) Restore original configuration if probe function failsGuenter Roeck1-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>
2012-03-23hwmon: (lm90) Add support for GMT G781Guenter Roeck2-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>
2012-03-23hwmon: (lm90) Fix multi-line commentsGuenter Roeck1-24/+34
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23hwmon: (w83795) Fix multi-line commentsGuenter Roeck1-32/+62
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23hwmon: (w83795) Unconditionally support manual fan speed controlJean Delvare2-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>
2012-03-23hwmon: (fam15h_power) Increase output resolutionAndre Przywara1-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>
2012-03-23hwmon: (fam15h_power) Correct sign extension of running_avg_captureAndreas Herrmann1-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
2012-03-21Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-stagingLinus Torvalds121-6178/+8489
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 ...
2012-03-20Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
Pull trivial tree from Jiri Kosina: "It's indeed trivial -- mostly documentation updates and a bunch of typo fixes from Masanari. There are also several linux/version.h include removals from Jesper." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits) kcore: fix spelling in read_kcore() comment constify struct pci_dev * in obvious cases Revert "char: Fix typo in viotape.c" init: fix wording error in mm_init comment usb: gadget: Kconfig: fix typo for 'different' Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c" writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header writeback: fix typo in the writeback_control comment Documentation: Fix multiple typo in Documentation tpm_tis: fix tis_lock with respect to RCU Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c" Doc: Update numastat.txt qla4xxx: Add missing spaces to error messages compiler.h: Fix typo security: struct security_operations kerneldoc fix Documentation: broken URL in libata.tmpl Documentation: broken URL in filesystems.tmpl mtd: simplify return logic in do_map_probe() mm: fix comment typo of truncate_inode_pages_range power: bq27x00: Fix typos in comment ...
2012-03-20Merge tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds2-8/+25
Pull driver core patches for 3.4-rc1 from Greg KH: "Here's the big driver core merge for 3.4-rc1. Lots of various things here, sysfs fixes/tweaks (with the nlink breakage reverted), dynamic debugging updates, w1 drivers, hyperv driver updates, and a variety of other bits and pieces, full information in the shortlog." * tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits) Tools: hv: Support enumeration from all the pools Tools: hv: Fully support the new KVP verbs in the user level daemon Drivers: hv: Support the newly introduced KVP messages in the driver Drivers: hv: Add new message types to enhance KVP regulator: Support driver probe deferral Revert "sysfs: Kill nlink counting." uevent: send events in correct order according to seqnum (v3) driver core: minor comment formatting cleanups driver core: move the deferred probe pointer into the private area drivercore: Add driver probe deferral mechanism DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers w1_bq27000: Only one thread can access the bq27000 at a time. w1_bq27000 - remove w1_bq27000_write w1_bq27000: remove unnecessary NULL test. sysfs: Fix memory leak in sysfs_sd_setsecdata(). intel_idle: Revert change of auto_demotion_disable_flags for Nehalem w1: Fix w1_bq27000 driver-core: documentation: fix up Greg's email address powernow-k6: Really enable auto-loading powernow-k7: Fix CPU family number ...
2012-03-20hwmon: (sch56xx) Add support for the integrated watchdog (v2)Hans de Goede5-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>
2012-03-18hwmon: (w83627ehf) Add support for temperature offset registersGuenter Roeck1-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>
2012-03-18hwmon: (jc42) Remove unnecessary device IDsGuenter Roeck1-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>
2012-03-18hwmon: (zl6100) Add support for ZL9101M and ZL9117MGuenter Roeck2-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>
2012-03-18hwmon: (adm1275) Add support for ADM1075Guenter Roeck2-6/+86
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (max34440) Add support for MAX34446Guenter Roeck2-5/+111
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (pmbus) Add more virtual registersGuenter Roeck2-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>
2012-03-18hwmon: (pmbus) Add support for Lineage Power MDT040Guenter Roeck2-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>
2012-03-18hwmon: (pmbus) Add support for TI TPS40400 and TPS40422Guenter Roeck2-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>
2012-03-18hwmon: (max34440) Add support for 'lowest' output voltage attributeGuenter Roeck1-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>
2012-03-18hwmon: (jc42) Convert to use devm_kzallocGuenter Roeck1-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>
2012-03-18hwmon: (max16065) Convert to use devm_kzallocGuenter Roeck1-16/+7
Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (smm665) Convert to use devm_kzallocGuenter Roeck1-9/+3
Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (ltc4261) Convert to use devm_kzallocGuenter Roeck1-11/+4
Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (pmbus) Simplify remove functionsGuenter Roeck12-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>
2012-03-18hwmon: (pmbus) Convert pmbus drivers to use devm_kzallocGuenter Roeck8-154/+56
Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (lineage-pem) Convert to use devm_kzallocGuenter Roeck1-7/+4
Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (hwmon-vid) Fix checkpatch issuesGuenter Roeck1-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>
2012-03-18hwmon: (hwmon-vid) Add new entries to VRM model tableGuenter Roeck1-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>
2012-03-18hwmon: (lm80) Add detection of NatSemi/TI LM96080Jean Delvare2-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>
2012-03-18hwmon: (lm87) Get rid of macro-generated functionsJean Delvare1-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>
2012-03-18hwmon: (lm87) Reorganize the codeJean Delvare1-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>
2012-03-18hwmon: (applesmc) Silence uninitialized warningsHenrik Rydberg1-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>
2012-03-18hwmon: (lm70) Fix: do not use assignment in if conditionGuenter Roeck1-4/+6
Fix checkpatch issue: ERROR: do not use assignment in if condition Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (lm70) Register hwmon device after creating attribute files, and remove it firstGuenter Roeck1-10/+11
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>
2012-03-18hwmon: (w83l786ng) Fix multi-line commentsGuenter Roeck1-32/+36
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (w83l785ts) Fix multi-line commentsGuenter Roeck1-6/+9
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (w83781d) Fix: do not use assignment in if conditionGuenter Roeck1-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>
2012-03-18hwmon: (w83781d) Fix multi-line commentsGuenter Roeck1-80/+117
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (smsc47b397) Fix multi-line commentsGuenter Roeck1-30/+34
Cc: Mark M Hoffman <mhoffman@lightlink.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (pc87427) Fix multi-line commentsGuenter Roeck1-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>
2012-03-18hwmon: (max1668) Fix multi-line commentsGuenter Roeck1-19/+19
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (lm80) Fix multi-line commentsGuenter Roeck1-13/+19
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18hwmon: (emc2103) Fix multi-line commentsGuenter Roeck1-23/+27
Cc: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (adm1031) Fix multi-line commentsGuenter Roeck1-27/+33
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (adm1029) Fix multi-line commentsGuenter Roeck1-8/+11
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: (w83627hf) Fix checkpatch issuesGuenter Roeck1-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>
2012-03-18hwmon: (w83l786ng) Fix checkpatch issuesGuenter Roeck1-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>
2012-03-18hwmon: (w83793) Fix checkpatch issuesGuenter Roeck1-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>