summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2014-08-04hwmon: (w83l786ng) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (w83l786ng) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (fam15h_power) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (wm8350) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (wm831x) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ads7828) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (atxp1) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups. This simplifies the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: Driver for TI TMP103 temperature sensorHeiko Schocher
Driver for the TI TMP103. The TI TMP103 is similar to the TMP102. It differs from the TMP102 by having only 8 bit registers. Signed-off-by: Heiko Schocher <hs@denx.de> [linux@roeck-us.net: Select REGMAP_I2C in Kconfig] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (gpio-fan) Convert to devm_hwmon_device_register_with_groupsAxel Lin
This simplifies the code a bit and also ensures the attribute groups are properly removed from sysfs when unload the module. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (twl4030-madc-hwmon) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: Add support for Lattice's POWR1220 power manager ICScott Kanowitz
This patch adds support for Lattice's POWR1220 power manager IC. Read access to all the ADCs on the chip are supported through the hwmon sysfs files. Signed-off-by: Scott Kanowitz <skanowitz@echo360.com> [Guenter Roeck: Removed some extra ( )] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-31hwmon: (lm77) Prevent overflow problem when writing large limitsAxel Lin
On platforms with sizeof(int) < sizeof(long), writing a temperature limit larger than MAXINT will result in unpredictable limit values written to the chip. Clamp the input values to the supported limits first to fix the problem. For set_temp_hyst: As Guenter pointed out that the temperature is read as unsigned and stored in an unsigned long. This is wrong; nothing in the datasheet suggests that the value (the absolute temperature) must be positive. So change it to signed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-30hwmon: (amc6821) Fix possible race condition bugAxel Lin
Ensure mutex lock protects the read-modify-write period to prevent possible race condition bug. In additional, update data->valid should also be protected by the mutex lock. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-30hwmon: (lm78) Fix overflow problems seen when writing large temperature limitsGuenter Roeck
On platforms with sizeof(int) < sizeof(long), writing a temperature limit larger than MAXINT will result in unpredictable limit values written to the chip. Avoid auto-conversion from long to int to fix the problem. Cc: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-30hwmon: (lm85) Fix various errors on attribute writesGuenter Roeck
Temperature limit register writes did not account for negative numbers. As a result, writing -127000 resulted in -126000 written into the temperature limit register. This problem affected temp[1-3]_min, temp[1-3]_max, temp[1-3]_auto_temp_crit, and temp[1-3]_auto_temp_min. When writing pwm[1-3]_freq, a long variable was auto-converted into an int without range check. Wiring values larger than MAXINT resulted in unexpected register values. When writing temp[1-3]_auto_temp_max, an unsigned long variable was auto-converted into an int without range check. Writing values larger than MAXINT resulted in unexpected register values. vrm is an u8, so the written value needs to be limited to [0, 255]. Cc: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-29hwmon: (ads1015) Fix off-by-one for valid channel index checkingAxel Lin
Current code uses channel as array index, so the valid channel value is 0 .. ADS1015_CHANNELS - 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-24hwmon: (smsc47m192) Fix temperature limit and vrm write operationsGuenter Roeck
Temperature limit clamps are applied after converting the temperature from milli-degrees C to degrees C, so either the clamp limit needs to be specified in degrees C, not milli-degrees C, or clamping must happen before converting to degrees C. Use the latter method to avoid overflows. vrm is an u8, so the written value needs to be limited to [0, 255]. Cc: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-07-16hwmon: (adt7470) Fix writes to temperature limit registersGuenter Roeck
Temperature limit registers are signed. Limits therefore need to be clamped to (-128, 127) degrees C and not to (0, 255) degrees C. Without this fix, writing a limit of 128 degrees C sets the actual limit to -128 degrees C. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org Reviewed-by: Axel Lin <axel.lin@ingics.com>
2014-07-14hwmon: (da9055) Don't use dash in the name attributeAxel Lin
Dashes are not allowed in hwmon name attributes. Use "da9055" instead of "da9055-hwmon". Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-14hwmon: (da9052) Don't use dash in the name attributeAxel Lin
Dashes are not allowed in hwmon name attributes. Use "da9052" instead of "da9052-hwmon". Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07hwmon: (adc128d818) Drop write support on inX_input attributesGuenter Roeck
Writes into input registers doesn't make sense, even more so since the writes actually ended up writing into the maximum limit registers. Drop it. Cc: stable@vger.kernel.org Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07hwmon: (emc2103) Clamp limits instead of bailing outGuenter Roeck
It is customary to clamp limits instead of bailing out with an error if a configured limit is out of the range supported by the driver. This simplifies limit configuration, since the user will not typically know chip and/or driver specific limits. Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-07hwmon: (adm1031) Fix writes to limit registersGuenter Roeck
Upper limit for write operations to temperature limit registers was clamped to a fractional value. However, limit registers do not support fractional values. As a result, upper limits of 127.5 degrees C or higher resulted in a rounded limit of 128 degrees C. Since limit registers are signed, this was stored as -128 degrees C. Clamp limits to (-55, +127) degrees C to solve the problem. Value on writes to auto_temp[12]_min and auto_temp[12]_max were not clamped at all, but masked. As a result, out-of-range writes resulted in a more or less arbitrary limit. Clamp those attributes to (0, 127) degrees C for more predictable results. Cc: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-03hwmon: (adm1021) Fix cache problem when writing temperature limitsAxel Lin
The module test script for the adm1021 driver exposes a cache problem when writing temperature limits. temp_min and temp_max are expected to be stored in milli-degrees C but are stored in degrees C. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-03hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_divAxel Lin
Writing to fanX_div does not clear the cache. As a result, reading from fanX_div may return the old value for up to two seconds after writing a new value. This patch ensures the fan_div cache is updated in set_fan_div(). Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-03hwmon: (amc6821) Fix permissions for temp2_inputAxel Lin
temp2_input should not be writable, fix it. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-29hwmon: (ntc_thermistor) Correct information printed during probeNaveen Krishna Chatradhi
Currently, dev_info() at the end of the probe says "type:%s ". But, prints pdev->name. This patch uses "pdev_id->name" which prints the thermistor type. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25hwmon: (gpio-fan) Change name used in hwmon_device_register_with_groupsJulien D'Ascenzio
Since commit 648cd48c9e566f53c5df30d79857e0937ae13b09 The hwmon name attributes must not include '-' so the name must be rename from gpio-fan to gpio_fan Signed-off-by: Julien D'Ascenzio <jdascenzio@yahoo.fr> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in KconfigJosef Gajdusek
In commit 4cab259f, the emc1403 driver was converted to use regmap but the necessary Kconfig option was not added. Signed-off-by: Josef Gajdusek <atx@atx.name> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25hwmon: (ntc_thermistor) Use the manufacturer name properlyNaveen Krishna Chatradhi
Murata Manufacturing Co., Ltd is the vendor for NTC (Negative Temperature coefficient) based Thermistors. But, the driver extensively uses "NTC" as the vendor name. This patch corrects the vendor name also updates the compatibility strings according to the vendor-prefix.txt Note: Drivers continue to support the previous compatible strings but further addition of these compatible strings in device tree is deprecated. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25hwmon: (w83l786ng) Report correct minimum fan speedAxel Lin
Current code is buggy, it shows the current fan speed as minimum fan speed. Fix up show_fan_reg macro to correctly report fan and fan_min speed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: vexpress: Use devm helper for hwmon device registrationPawel Moll
Use devm_hwmon_device_register_with_groups instead of the old-style manual attributes and hwmon device registration. Also, unroll the attribute group macros for better code readability. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: (atxp1) Avoid forward declarationAxel Lin
Move atxp1_id and atxp1_driver to proper place to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: add support for Sensirion SHTC1 sensorTomas Pop
Add support for Sensirion SHTC1 and compatible temperature and humidity sensors. Signed-off-by: Tomas Pop <tomas.pop@sensirion.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: (ltc4151) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Per Dalén <per.dalen@appeartv.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: (lm85) Drop generic detectionJean Delvare
Generic detection leads to too many false positives, so drop it. FWIW sensors-detect does not have such generic detection. If the user wants to force the driver to bind to a not yet supported chip, he/she can still do so using sysfs attribute new_device. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12hwmon: (ina2xx) Cast to s16 on shunt and current regsFabio Baltieri
All devices supported by ina2xx are bidirectional and report the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to userspace in ina2xx_get_value(). This patch fixes the problem by casting the signed registers to s16. Tested on an INA219. Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-03Merge tag 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging into next Pull hwmon updates from Guenter Roeck: "New driver for NCT6683D New chip support to existing drivers: - add support for STTS2004 and AT30TSE004 to jc42 driver - add support for EMC1402/EMC1412/EMC1422 to emc1403 driver Other notable changes: - document hwmon kernel API - convert jc42, lm70, lm75, lm77, lm83, lm92, max1619, tmp421, and tmp102 drivers to use new hwmon API functions - replace function macros in lm80, lm92, and jc42 drivers with real code - convert emc1403 driver to use regmap, add support for additional attributes, and add device IDs for EMC1412, EMC1413, and EMC1414 - various additional cleanup and minor bug fixes in several drivers" * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (60 commits) hwmon: (nct6775) Fix probe unwind paths to properly unregister platform devices hwmon: (nct6683) Fix probe unwind paths to properly unregister platform devices hwmon: (ultra45_env) Introduce managed version of kzalloc hwmon: Driver for NCT6683D hwmon: (lm80) Rearrange code to avoid forward declarations hwmon: (lm80) Convert fan display function macros into functions hwmon: (lm80) Convert voltage display function macros into functions hwmon: (lm80) Convert temperature display function macros into functions hwmon: (lm80) Normalize all temperature values to 16 bit hwmon: (lm80) Simplify TEMP_FROM_REG hwmon: (lm83) Convert to use devm_hwmon_device_register_with_groups hwmon: (lm83) Rearange code to avoid forward declarations hwmon: (lm83) Drop FSF address hwmon: (max1619) Convert to use devm_hwmon_device_register_with_groups hwmon: (max1619) Drop function macros hwmon: (max1619) Rearrange code to avoid forward declarations hwmon: (max1619) Drop FSF address hwmon: (max1619) Fix critical alarm display hwmon: (jc42) Add support for STTS2004 and AT30TSE004 hwmon: (jc42) Convert function macros into functions ...
2014-06-02Merge tag 'cleanup-for-3.16' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next Pull ARM SoC cleanups from Olof Johansson: "Cleanups for 3.16. Among these are: - a bunch of misc cleanups for Broadcom platforms, mostly housekeeping - enabling Common Clock Framework on the older s3c24xx Samsung chipsets - cleanup of the Versatile Express system controller code, moving it to syscon - power management cleanups for OMAP platforms plus a handful of other cleanups across the place" * tag 'cleanup-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (87 commits) ARM: kconfig: allow PCI support to be selected with ARCH_MULTIPLATFORM clk: samsung: fix build error ARM: vexpress: refine dependencies for new code clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata cpufreq: exynos: Fix the compile error ARM: S3C24XX: move debug-macro.S into the common space ARM: S3C24XX: use generic DEBUG_UART_PHY/_VIRT in debug macro ARM: S3C24XX: trim down debug uart handling ARM: compressed/head.S: remove s3c24xx special case ARM: EXYNOS: Remove unnecessary inclusion of cpu.h ARM: EXYNOS: Migrate Exynos specific macros from plat to mach ARM: EXYNOS: Remove exynos_subsys registration ARM: EXYNOS: Remove duplicate lines in Makefile ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling ARM: OMAP4: PRCM: remove references to cm-regbits-44xx.h from PRCM core files ARM: OMAP3/4: PRM: add support of late_init call to prm_ll_ops ARM: OMAP3/OMAP4: PRM: add prm_features flags and add IO wakeup under it ARM: OMAP3/4: PRM: provide io chain reconfig function through irq setup ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exit ARM: OMAP2+: PRCM: cleanup some header includes ...
2014-05-25hwmon: (ntc_thermistor) Fix OF device ID mappingJean Delvare
The mapping from OF device IDs to platform device IDs is wrong. TYPE_NCPXXWB473 is 0, TYPE_NCPXXWL333 is 1, so ntc_thermistor_id[TYPE_NCPXXWB473] is { "ncp15wb473", TYPE_NCPXXWB473 } while ntc_thermistor_id[TYPE_NCPXXWL333] is { "ncp18wb473", TYPE_NCPXXWB473 }. So the name is wrong for all but the "ntc,ncp15wb473" entry, and the type is wrong for the "ntc,ncp15wl333" entry. So map the entries by index, it is neither elegant nor robust but at least it is correct. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: 9e8269de hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Cc: Doug Anderson <dianders@chromium.org>
2014-05-25hwmon: (ntc_thermistor) Fix dependenciesJean Delvare
In commit 9e8269de, support was added for ntc_thermistor devices being declared in the device tree and implemented on top of IIO. With that change, a dependency was added to the ntc_thermistor driver: depends on (!OF && !IIO) || (OF && IIO) This construct has the drawback that the driver can no longer be selected when OF is set and IIO isn't, nor when IIO is set and OF is not. This is a regression for the original users of the driver. As the new code depends on IIO and is useless without OF, include it only if both are enabled, and set the dependencies accordingly. This is clearer, more simple and more correct. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: 9e8269de hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Cc: Doug Anderson <dianders@chromium.org>
2014-05-24hwmon: (nct6775) Fix probe unwind paths to properly unregister platform devicesAxel Lin
Call platform_device_unregister() rather than platform_device_put() to unregister successfully registered platform devices. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-24hwmon: (nct6683) Fix probe unwind paths to properly unregister platform devicesAxel Lin
Call platform_device_unregister() rather than platform_device_put() to unregister successfully registered platform devices. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (ultra45_env) Introduce managed version of kzallocHimangi Saraogi
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, the unnecessary label out_free is removed. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: Driver for NCT6683DGuenter Roeck
Nuvoton NCT6683D is an eSIO with hardware monitoring capabilities. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (lm80) Rearrange code to avoid forward declarationsGuenter Roeck
Avoid need for forward declarations by rearranging code. No functional change. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (lm80) Convert fan display function macros into functionsGuenter Roeck
Convert fan display function macros into functions to reduce code size and improve code readability. Code size reduction is about 200 bytes on x86_64. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (lm80) Convert voltage display function macros into functionsGuenter Roeck
Convert voltage display function macros into functions to reduce code size and improve code readability. Code size reduction is about 600 bytes on x86_64. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (lm80) Convert temperature display function macros into functionsGuenter Roeck
Convert temperature display function macros into functions to reduce code size and improve code readability. Code size reduction is about 2k on x86_64. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21hwmon: (lm80) Normalize all temperature values to 16 bitGuenter Roeck
Normalize all stored temperature values to 16 bit to simplify temperature calculations. Signed-off-by: Guenter Roeck <linux@roeck-us.net>