summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2013-11-27Merge branch 'acpica'Rafael J. Wysocki
* acpica: ACPI: Clean up incorrect inclusions of ACPICA headers ACPICA: Update version to 20131115. ACPICA: Add support to delete all objects attached to the root namespace node. ACPICA: Delete all attached data objects during namespace node deletion. ACPICA: Resources: Fix loop termination for the get AML length function. ACPICA: Tests: Add CHECKSUM_ABORT protection for test utilities. ACPICA: Debug output: Do not emit function nesting level for kernel build.
2013-11-25ACPI: Clean up incorrect inclusions of ACPICA headersLv Zheng
Header file <acpi/acpi.h> contains environemnt settings and architecture specific implementation that should be included before any other ACPICA headers in order to keep a consistent build environment for ACPICA users. The following internal ACPICA header files should be included from <acpi/acpi.h> and should not be included by other kernel files: <acpi/acpiosxf.h> <acpi/acpixf.h> Clean up incorrect inclusions of these files from non-ACPICA source files. [rjw: Subject and changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-20hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value checkYijing Wang
Since acpi_bus_get_device() returns plain int and not acpi_status, ACPI_FAILURE() should not be used for checking its return value. Fix that. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-11-18hwmon: (nct6775) NCT6791 supports weight control only for CPUFANGuenter Roeck
Unlike other chips supported by this driver, the NCT6791 only has a single set of registers to configure weighted fan control. Enable it only for the single channel supporting it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-11-18hwmon: (nct6775) Monitor additional temperature registersGuenter Roeck
The number of SMIOVT registers on NCT6779 and NCT6791 is limited to 2. As result, the driver may not report some of the temperatures used for fan control. This can result in some of the pwmX_temp_sel or pwm2_weight_temp_sel attributes to wrongly return 0. Fortunately, the chip has registers to monitor those temperatures. Add them to the list of temperatures to report. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-11-18hwmon: (lm75) Add support for GMT G751 chipArnaud Ebalard
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP based board, via DT). Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-11-16Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull hwmon fixes and updates from Jean Delvare: "All lm90 driver fixes and improvements" * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: Documentation: dt: hwmon: Add OF document for LM90 hwmon: (lm90) Add power control hwmon: (lm90) Add support for TI TMP451 hwmon: (lm90) Use enums for the indexes of temp8 and temp11 hwmon: (lm90) Add support to handle IRQ hwmon: (lm90) Define status bits hwmon: (lm90) Fix max6696 alarm handling
2013-11-15hwmon: (lm90) Add power controlWei Ni
The device lm90 can be controlled by the vcc rail. Adding the regulator support to power on/off the vcc rail. Enable the "vcc" regulator before accessing the device. [JD: Rename variables to avoid confusion with registers.] Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15hwmon: (lm90) Add support for TI TMP451Wei Ni
TI TMP451 is mostly compatible with ADT7461, except for local temperature low byte and max conversion rate. Add support to the LM90 driver. Signed-off-by: Wei Ni <wni@nvidia.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15hwmon: (lm90) Use enums for the indexes of temp8 and temp11Wei Ni
Using enums for the indexes and nrs of temp8 and temp11. This make the code much more readable. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15hwmon: (lm90) Add support to handle IRQWei Ni
When the temperature exceed the limit range value, the driver can handle the interrupt. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15hwmon: (lm90) Define status bitsWei Ni
Add bit defines for the status register. And add a function lm90_is_tripped() which will read status register and return tripped or not, then lm90_alert can call it directly, and in the future the IRQ thread also can use it. [JD: Adjusted to include all the new MAX6696 status flags.] Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15hwmon: (lm90) Fix max6696 alarm handlingGuenter Roeck
Bit 2 of status register 2 on MAX6696 (external diode 2 open) sets ALERT; the bit thus has to be listed in alert_alarms. Also display a message in the alert handler if the condition is encountered. Even though not all overtemperature conditions cause ALERT to be set, we should not ignore them in the alert handler. Display messages for all out-of-range conditions. Reported-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-11-15tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-12Merge tag 'spi-v3.13' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "As well as the usual driver updates and cleanups there's a few improvements to the core here: - The start of some improvements to factor out more of the SPI message loop into the core. Right now this is just simplifying the code a bit but hopefully next time around we'll also have managed to roll out some noticable performance improvements which drivers can take advantage of. - Support for loading modules for ACPI enumerated SPI devices. - Managed registration for SPI controllers. - Helper for another common I/O pattern" * tag 'spi-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (116 commits) spi/hspi: add device tree support spi: atmel: fix return value check in atmel_spi_probe() spi: spi-imx: only enable the clocks when we start to transfer a message spi/s3c64xx: Fix doubled clock disable on suspend spi/s3c64xx: Do not ignore return value of spi_master_resume/suspend spi: spi-mxs: Use u32 instead of uint32_t spi: spi-mxs: Don't set clock for each xfer spi: spi-mxs: Clean up setup_transfer function spi: spi-mxs: Remove check of spi mode bits spi: spi-mxs: Fix race in setup method spi: spi-mxs: Remove bogus setting of ssp clk rate field spi: spi-mxs: Remove full duplex check, spi core already does it spi: spi-mxs: Fix chip select control bits in DMA mode spi: spi-mxs: Fix extra CS pulses and read mode in multi-transfer messages spi: spi-mxs: Change flag arguments in txrx functions to bit flags spi: spi-mxs: Always clear INGORE_CRC, to keep CS asserted spi: spi-mxs: Remove mxs_spi_enable and mxs_spi_disable spi: spi-mxs: Always set LOCK_CS spi/s3c64xx: Add missing pm_runtime_put on setup fail spi/s3c64xx: Add missing pm_runtime_set_active() call in probe() ...
2013-10-25Merge remote-tracking branch 'spi/topic/wr' into spi-nextMark Brown
2013-10-19hwmon: (w83793) Clean up a signedness issueDan Carpenter
We cap the upper bound of "mtimeout" but since it's signed we should check for negative values as well. The mistake is harmless. But I have changed it to unsigned as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-19hwmon: (nct6775) Remove an unused variableDan Carpenter
We don't actually use "j" for anything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (emc1403) Add support for EMC1404 and EMC1424Guenter Roeck
EMC1404 and EMC1424 are similar to EMC1403 and EMC1423, but support an additional external temperature sensor. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code and reduce its size. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/ltc2978): Add support for LTC2978AGuenter Roeck
Detect LTC2978A chip ID. Treat it as LC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/ltc2978): Add support for LTC2977Guenter Roeck
LTC2977 is a pin compatible replacement for LTC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/lm25066) Add support for LM25063Guenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: Correct some typosLABBE Corentin
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (gpio-fan) Include linux/of.h headerSachin Kamat
'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (lm70) Remove redundant spi_set_drvdataSachin Kamat
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kaiwan N Billimoria <kaiwan@designergraphix.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (adcxx) Remove redundant spi_set_drvdataSachin Kamat
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (jc42) fix coccinelle warningsFengguang Wu
drivers/hwmon/jc42.c:521:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (ltc4261) fix coccinelle warningsFengguang Wu
drivers/hwmon/ltc4261.c:243:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (lm95234) fix coccinelle warningsFengguang Wu
drivers/hwmon/lm95234.c:704:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (max6697) fix coccinelle warningsFengguang Wu
drivers/hwmon/max6697.c:649:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (max6642 fix coccinelle warningsFengguang Wu
drivers/hwmon/max6642.c:299:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (ds1621) fix coccinelle warningsFengguang Wu
drivers/hwmon/ds1621.c:381:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (nct6775) fix coccinelle warningsFengguang Wu
drivers/hwmon/nct6775.c:3866:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (jc42) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (ltc4261) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (ina209) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (lm95234) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (tmp401) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (ina2xx) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also introduce dev variable in probe function to simplify access to client->dev, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (max16065) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Modify code to use is_visible to determine if an attribute should be created or not, then use devm_hwmon_device_register_with_groups to create the hwmon device and all attributes in one operation. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (max6697) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (lm73) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also introduce new variable dev pointing to client->dev in the probe function, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (max6642) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also rename new_client variable to client and introduce new variable dev pointing to client->dev in the probe function, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (ds1621) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Also use new macro __ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (nct6775) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: Provide managed hwmon registrationGuenter Roeck
Drivers using the new hwmon_device_register_with_groups API often have a remove function which consists solely of a call hwmon_device_unregister(). Provide support for devm_hwmon_device_register_with_groups and devm_hwmon_device_unregister to allow this repeated code to be removed and help eliminate error handling code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (nct6775) Convert to use hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (pmbus) Convert to use hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (ltc4245) Convert to use hwmon_device_register_with_groupsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>