summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
2012-07-25Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree from Jiri Kosina: "Trivial updates all over the place as usual." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits) Fix typo in include/linux/clk.h . pci: hotplug: Fix typo in pci iommu: Fix typo in iommu video: Fix typo in drivers/video Documentation: Add newline at end-of-file to files lacking one arm,unicore32: Remove obsolete "select MISC_DEVICES" module.c: spelling s/postition/position/g cpufreq: Fix typo in cpufreq driver trivial: typo in comment in mksysmap mach-omap2: Fix typo in debug message and comment scsi: aha152x: Fix sparse warning and make printing pointer address more portable. Change email address for Steve Glendinning Btrfs: fix typo in convert_extent_bit via: Remove bogus if check netprio_cgroup.c: fix comment typo backlight: fix memory leak on obscure error path Documentation: asus-laptop.txt references an obsolete Kconfig item Documentation: ManagementStyle: fixed typo mm/vmscan: cleanup comment error in balance_pgdat mm: cleanup on the comments of zone_reclaim_stat ...
2012-07-25Merge tag 'hwmon-for-linus' of ↵Linus Torvalds65-846/+1119
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity and temperature sensors. Convert drivers to use devm_ functions and to use dev_pm_ops. Address a couple of Coverity errors/warnings as well as compile warnings. Some functional improvements in applesmc driver." * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits) hwmon: (applesmc) Ignore some temperature registers hwmon: (applesmc) Allow negative temperature values hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc hwmon: (w83781d) Fix compile warning hwmon: (applesmc) Shorten minimum wait time hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management hwmon: (gpio-fan) Use struct dev_pm_ops for power management hwmon: (abituguru3) Use struct dev_pm_ops for power management hwmon: (abituguru) Use struct dev_pm_ops for power management hwmon: (acpi_power_meter) Fix unintentional integer overflow hwmon: (acpi_power_meter) Cleanup and optimizations hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver hwmon: (applesmc) Skip sensor mapping hwmon: (ntc_thermistor) Ensure that data->name string is terminated hwmon: (w83l785ts) Convert to use devm_ functions hwmon: (w83l785ts) Simplify code and improve readability hwmon: (smsc47m192) Convert to use devm_ functions hwmon: (smsc47m1) Convert to use devm_ functions hwmon: (smsc47b397) Convert to use devm_ functions hwmon: (k8temp) Convert to use devm_ functions ...
2012-07-23Merge branch 'x86-mce-for-linus' of ↵Linus Torvalds1-4/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86/mce changes from Ingo Molnar: "This tree improves the AMD thresholding bank code and includes a memory fault signal handling fixlet." * 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Fix siginfo_t->si_addr value for non-recoverable memory faults x86, MCE, AMD: Update copyrights and boilerplate x86, MCE, AMD: Give proper names to the thresholding banks x86, MCE, AMD: Make error_count read only x86, MCE, AMD: Cleanup reading of error_count x86, MCE, AMD: Print decimal thresholding values x86, MCE, AMD: Move shared bank to node descriptor x86, MCE, AMD: Remove local_allocate_... wrapper x86, MCE, AMD: Remove shared banks sysfs linking x86, amd_nb: Export model 0x10 and later PCI id
2012-07-22hwmon: (applesmc) Ignore some temperature registersHenrik Rydberg1-28/+47
Not all sensors in the T range are useful temperatures. This patch creates a subset of sensors to be exported to userland, excluding the unknown types. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (applesmc) Allow negative temperature valuesHenrik Rydberg1-11/+8
There are many userland reports of sensors with unreasonably small and large temperatures. There seem to be several reasons for this: Firstly, the major sensor type (sp78) is actually a signed number. This explains why some sensors show very small or large values - they are in fact all small, but of different sign. Secondly, the other sensor type (1-hex) is not properly understood; it may be that it is not a temperature after all. Thirdly, some sensors are differential in nature, showing changes over time rather than absolute numbers. This explains why those values are small and of varying sign. This patch interprets the sp78 type as signed short, but keeps the original scaling. For other types, -EINVAL is returned, since the nature of those sensors is unknown. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzallocSachin Kamat1-5/+2
This makes the code simpler as explicit freeing is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (w83781d) Fix compile warningGuenter Roeck1-3/+3
The following compile warning may be seen if the driver is compiled with -Wuninitialized: drivers/hwmon/w83781d.c: warning: 'sc_addr[1]' may be used uninitialized in this function [-Wuninitialized] While this is a false positive, it is annoying in nightly builds, and may help to conceal real problems. The current code is quite tricky, and and it is easy to rearrage the code to make the warning disappear. So fix it. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (applesmc) Shorten minimum wait timeHenrik Rydberg1-1/+1
The 2012 series of MacBooks have a faster SMC, and the current driver timings do not work at all. Tests show that decreasing the minimum wait time, from 64 us to 16 us, works well. Since this is still larger than the original minimum of 10 us used before 2008, there is nothing inherently problematic with changing it. The fail frequency on older machines seems to increase slightly, but not enough to be noticeable. Tested on MBA11, MBA31, MBA5,2, MBP9,2. The patch was originally written by adamski99 (ubuntuforums.org) and later tested by janhouse (bbs.archlinux.org). Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (exynos4_tmu) Use struct dev_pm_ops for power managementRafael J. Wysocki1-8/+12
Make the Exynos4 TMU driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> [linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (gpio-fan) Use struct dev_pm_ops for power managementRafael J. Wysocki1-10/+11
Make the gpio-fan driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> [linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (abituguru3) Use struct dev_pm_ops for power managementRafael J. Wysocki1-9/+10
Make the Abit uGuru rev. 3 driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> [linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (abituguru) Use struct dev_pm_ops for power managementRafael J. Wysocki1-9/+10
Make the Abit uGuru driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> [linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (acpi_power_meter) Fix unintentional integer overflowGuenter Roeck1-3/+1
Expression with two integer variables is calculated as integer before it is converted to u64. This may result in an integer overflow. Fix by declaring trip point variables as s64 instead of int. This patch addresses Coverity #200596: Unintentional integer overflow. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (acpi_power_meter) Cleanup and optimizationsGuenter Roeck1-3/+3
An unsigned value can not be smaller than 0. Remove the check for it. Use DIV_ROUND_CLOSEST for divide operations converting milli-degrees C into degrees C. Limit maximum accepted trip point temperature to INT_MAX. This patch fixes Coverity #115214: Unsigned compared against 0 Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor ↵Iain Paton3-0/+304
driver This is a new driver for the Honeywell Humidicon HIH-6130/HIH-6131 humidity sensor. The driver is based on the existing Sensiron sht21 driver with the necessary changes to the probe, update_measurements and conversion functions necessary to use the Honeywell sensors. There's no difference between the 6130 & 6131 other than the 6131 having an external condensation filter attached. Signed-off-by: Iain Paton <ipaton0@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (applesmc) Skip sensor mappingHenrik Rydberg1-28/+13
The special motion sensor mapping is unnecessary; remove it. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-22hwmon: (ntc_thermistor) Ensure that data->name string is terminatedGuenter Roeck1-1/+1
Fix Coverity warning: Calling strncpy with a maximum size argument of 20 bytes on destination array "data->name" of size 20 bytes might leave the destination string unterminated. Fix by replacing strncpy() with strlcpy() and by using sizeof() to determine the maximum string length. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (w83l785ts) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (w83l785ts) Simplify code and improve readabilityGuenter Roeck1-11/+8
In probe function, rename new_client variable to client, and introduce local variable dev to point to client->dev, to simplify the code and improve readability. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (smsc47m192) Convert to use devm_ functionsGuenter Roeck1-11/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (smsc47m1) Convert to use devm_ functionsGuenter Roeck1-34/+11
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (smsc47b397) Convert to use devm_ functionsGuenter Roeck1-16/+6
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (k8temp) Convert to use devm_ functionsGuenter Roeck1-18/+7
Convert to use devm_ functions to reduce code size and simplify the code. 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-07-22hwmon: (w83791d) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (w83792d) Convert to use devm_ functionsGuenter Roeck1-12/+6
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (w83781d) Convert to use devm_ functionsGuenter Roeck1-30/+16
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (w83627hf) Convert to use devm_ functionsGuenter Roeck1-30/+16
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (vt1211) Convert to use devm_ functionsGuenter Roeck1-17/+5
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (via686a) Convert to use devm_ functionsGuenter Roeck1-16/+7
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (tmp421) Convert to use devm_ functionsGuenter Roeck1-9/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (tmp401) Convert to use devm_ functionsGuenter Roeck1-3/+3
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (tmp102) Convert to use devm_ functionsGuenter Roeck1-10/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (thmc50) Convert to use devm_ functionsGuenter Roeck1-12/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (sis5595) Convert to use devm_ functionsGuenter Roeck1-20/+8
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (pc87427) Convert to use devm_ functionsGuenter Roeck1-40/+11
Convert to use devm_ functions to reduce code size and simplify the code. 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-07-22hwmon: (gpio-fan) Convert to use devm_ functionsGuenter Roeck1-41/+15
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Simon Guinot <sguinot@lacie.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Simon Guinot <sguinot@lacie.com>
2012-07-22hwmon: (pcf8591) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (max6642) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Per Dalen <per.dalen@appeartv.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (max1619) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (max1111) Convert to use devm_ functionsGuenter Roeck1-6/+3
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm93) Convert to use devm_ functionsGuenter Roeck1-10/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm92) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (asc7621) Convert to use devm_ functionsGuenter Roeck1-3/+2
Convert to use devm_ functions to reduce code size and simplify the code. Cc: George Joseph <george.joseph@fairview5.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com>
2012-07-22hwmon: (lm87) Convert to use devm_ functionsGuenter Roeck1-10/+5
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm85) Convert to use devm_ functionsGuenter Roeck1-5/+2
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm80) Convert to use devm_ functionsGuenter Roeck1-10/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm77) Convert to use devm_ functionsGuenter Roeck1-10/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm77) Improve code readabilityGuenter Roeck1-30/+29
Rename new_client variable, and define new variable for client->dev. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm75) Convert to use devm_ functionsGuenter Roeck1-6/+3
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (lm63) Convert to use devm_ functionsGuenter Roeck1-10/+4
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>