summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value checkYijing Wang2013-11-201-3/+2
| | | | | | | | | 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>
* hwmon: (nct6775) NCT6791 supports weight control only for CPUFANGuenter Roeck2013-11-181-8/+21
| | | | | | | | 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>
* hwmon: (nct6775) Monitor additional temperature registersGuenter Roeck2013-11-181-2/+60
| | | | | | | | | | | 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>
* hwmon: (lm75) Add support for GMT G751 chipArnaud Ebalard2013-11-182-0/+4
| | | | | | | | 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>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2013-11-151-97/+230
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * hwmon: (lm90) Add power controlWei Ni2013-11-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | 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>
| * hwmon: (lm90) Add support for TI TMP451Wei Ni2013-11-151-8/+37
| | | | | | | | | | | | | | | | | | | | 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>
| * hwmon: (lm90) Use enums for the indexes of temp8 and temp11Wei Ni2013-11-151-64/+88
| | | | | | | | | | | | | | | | 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>
| * hwmon: (lm90) Add support to handle IRQWei Ni2013-11-151-0/+24
| | | | | | | | | | | | | | | | 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>
| * hwmon: (lm90) Define status bitsWei Ni2013-11-151-27/+61
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * hwmon: (lm90) Fix max6696 alarm handlingGuenter Roeck2013-11-151-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge tag 'spi-v3.13' of ↵Linus Torvalds2013-11-121-6/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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() ...
| * \ Merge remote-tracking branch 'spi/topic/wr' into spi-nextMark Brown2013-10-251-6/+1
| |\ \ | | |/ | |/|
| | * hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16()Lars-Peter Clausen2013-10-031-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using spi_w8r16be() instead of spi_w8r16() in this driver makes a code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | hwmon: (w83793) Clean up a signedness issueDan Carpenter2013-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (nct6775) Remove an unused variableDan Carpenter2013-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (emc1403) Add support for EMC1404 and EMC1424Guenter Roeck2013-10-181-8/+51
| | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-47/+26
| | | | | | | | | | | | | | | | | | Simplify code and reduce its size. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus/ltc2978): Add support for LTC2978AGuenter Roeck2013-10-181-1/+3
| | | | | | | | | | | | | | | | | | Detect LTC2978A chip ID. Treat it as LC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus/ltc2978): Add support for LTC2977Guenter Roeck2013-10-181-3/+9
| | | | | | | | | | | | | | | | | | LTC2977 is a pin compatible replacement for LTC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus/lm25066) Add support for LM25063Guenter Roeck2013-10-181-9/+82
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: Correct some typosLABBE Corentin2013-10-188-10/+10
| | | | | | | | | | | | | | | Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (gpio-fan) Include linux/of.h headerSachin Kamat2013-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | '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>
* | | hwmon: (lm70) Remove redundant spi_set_drvdataSachin Kamat2013-10-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (adcxx) Remove redundant spi_set_drvdataSachin Kamat2013-10-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (jc42) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (ltc4261) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (lm95234) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (max6697) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (max6642 fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (ds1621) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (nct6775) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (jc42) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-36/+25
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc4261) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-39/+16
| | | | | | | | | | | | | | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ina209) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-28/+18
| | | | | | | | | | | | | | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (lm95234) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-87/+50
| | | | | | | | | | | | | | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (tmp401) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-64/+28
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ina2xx) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-43/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (max16065) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-72/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (max6697) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-37/+17
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (lm73) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-48/+22
| | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (max6642) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-48/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (ds1621) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-20/+4
| | | | | | | | | | | | | | | | | | Also use new macro __ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (nct6775) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-16/+5
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: Provide managed hwmon registrationGuenter Roeck2013-10-131-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | hwmon: (nct6775) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-86/+36
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-13/+7
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc4245) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-54/+24
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (gpio-fan) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-27/+14
| | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
OpenPOWER on IntegriCloud