aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> [[email protected]: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> [[email protected]: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> [[email protected]: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> [[email protected]: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()] Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor ↵Iain Paton4-0/+341
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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (applesmc) Skip sensor mappingHenrik Rydberg1-28/+13
The special motion sensor mapping is unnecessary; remove it. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: Document the use of devres functionsGuenter Roeck1-0/+3
devres functions are the preferred means to allocate resources in hwmon drivers. Document it. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Simon Guinot <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: George Joseph <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (lm77) Improve code readabilityGuenter Roeck1-30/+29
Rename new_client variable, and define new variable for client->dev. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (gl520sm) 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 <[email protected]> Acked-by: Jean Delvare <[email protected]>
2012-07-21hwmon: (gl518sm) 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 <[email protected]> Acked-by: Jean Delvare <[email protected]>