summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'staging-3.10-rc1' of ↵Linus Torvalds2013-04-293-0/+206
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver tree update from Greg Kroah-Hartman: "Here's the big staging driver tree update for 3.10-rc1 This update contains loads of comedi driver cleanups and fixes in here, iio updates, android driver changes, and other various staging driver cleanups. Thanks to some drivers being removed, and the comedi driver cleanups, we have removed more code than we added: 627 files changed, 65145 insertions(+), 76321 deletions(-) which is always nice to see. All of these have been in linux-next for a while." * tag 'staging-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (940 commits) staging: comedi: ni_labpc: fix legacy driver build staging: comedi: das800: cleanup the cio-das802/16 fifo comments staging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd() staging: comedi: das800: tidy up the private data staging: comedi: das800: tidy up das800_interrupt() staging: comedi: das800: tidy up das800_ai_insn_read() staging: comedi: das800: tidy up das800_di_insn_bits() staging: comedi: das800: tidy up das800_do_insn_bits() staging: comedi: das800: remove extra divisor calculation call staging: comedi: das800: rename {enable,disable}_das800 staging: comedi: das800: tidy up subdevice init staging: comedi: das800: allow attaching without interrupt support staging: comedi: das800: interrupts are required for async command support staging: comedi: das800: tidy up das800_ai_do_cmdtest() staging: comedi: das800: remove 'volatile' on private data variables staging: comedi: das800: cleanup the boardinfo staging: comedi: das800: cleanup range table declarations staging: comedi: das800: introduce das800_ind_{write, read}() staging: comedi: das800: remove forward declarations staging: comedi: das800: move das800_set_frequency() ...
| * Merge 3.9-rc5 into staging-nextGreg Kroah-Hartman2013-04-011-1/+1
| |\ | | | | | | | | | | | | | | | This pulls in all of the good fixes we need here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * \ Merge tag 'iio-for-3.10a' of ↵Greg Kroah-Hartman2013-03-253-0/+206
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of IIO new drivers and cleanup for the 3.10 cycle. New stuff 1) Add OF support for specifying mappings between iio devices and their in kernel consumers. 2) Driver for AD7923 (extra functionality and support for ad7904, ad7914 and ad7924 added later in series) 3) Driver for Exynos adc (dt suppor for phy added later in series). 4) Make iio_push_event save IRQ context - necessary if it is to be used within an interrupt handler. Users of this functionality to follow. 5) For iio use the device tree node name to provide the hwmon name attribute if available. Removal and moves out of staging 1) Drop the adt7410 driver from IIO now that there is a hmwon driver with equivalent support. This device is very much targeted at hardware monitoring so hwmon is a more appropriate host for the driver. 2) Move iio_hwmon driver to drivers/hwmon. Cleanups 1) Minor cleanup in ST common library. 2) Large set of patches to break the info_mask element which previously used odd and even bits to specify if a channel attribute was either shared across similar channels or specific to only one. Now we have two bitmaps, one for those parameters that are specific to this channel and one for those shared by all channels with the same type as this one. This has no effect on the userspace abi. It simplifies the core code and provides more space for new channel parameters. It has been on the todo list for a long time! Conflicts: drivers/iio/dac/ad5064.c
| | * | hwmon: Move the IIO client driver for hwmon out of stagingJonathan Cameron2013-03-233-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver uses channel maps, defined either through device tree or platform data, to create a hwmon driver which acts as a client for the underlying IIO device channels. Thus a general purpose IIO adc driver can be used to provide hardware monitoring using a subset of its channels. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> -- The only non move changes here concern the description and changes to the dependencies to IIO explicit and hwmon implicit. I'm proposing moving this into hwmon on the basis of placing drivers based on what they provide rather than what their underlying hardware is. drivers/hwmon/Kconfig | 9 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/iio_hwmon.c | 196 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/iio/Kconfig | 8 -- drivers/staging/iio/Makefile | 2 - drivers/staging/iio/iio_hwmon.c | 196 ---------------------------------------- 6 files changed, 206 insertions(+), 206 deletions(-)
* | | | hwmon: (nct6775) Fix coding style problemsGuenter Roeck2013-04-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add space around binary operators (CodingStyle, chapter 3.1). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Constify stringsGuenter Roeck2013-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nct6775_sio_names should be a constant pointer to an array of constant strings. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (tmp401) Add support for TMP432Guenter Roeck2013-04-212-38/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TMP432 is similar to TMP431 with a second external temperature sensor. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (tmp401) Add support for update_interval attributeGuenter Roeck2013-04-211-1/+53
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (tmp401) Reset valid flag when resetting temperature historyGuenter Roeck2013-04-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cached data is no longer valid after resetting the temperature history. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (tmp401) Simplification and cleanupGuenter Roeck2013-04-211-234/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use two-dimensional array pointing to registers Merge temperature and limit access functions into a single function Return error codes from I2C reads Use DIV_ROUND_CLOSEST for rounding operations and improve rounding Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (tmp401) Use sysfs_create_group / sysfs_remove_groupGuenter Roeck2013-04-141-63/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of creating and removing sysfs attribute files individually. Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (tmp401) Drop unused defines, use BIT for bit masksGuenter Roeck2013-04-141-11/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (nct6775) Use ARRAY_SIZE for loops where possibleGuenter Roeck2013-04-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that the loop iterations are correct even if/when the number of elements in an array changes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Enable both AUXTIN and VIN3 on NCT6776Guenter Roeck2013-04-071-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per datasheet, VIN3 and AUXTIN share the same external pin. However, there is no clean way to detect this condition. Furthermore, both are reported by the BIOS on Supermicro C7H61. It may thus be possible that chip revisions exist where both attributes are supported at the same time. Better play safe and report both. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata()Jingoo Han2013-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Expand scope of supported chipsGuenter Roeck2013-04-072-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NCT6775, NCT6776, and NCT6779 have a number of variants with the same chip ID but different chip labels. Add text "or compatible" to the message displayed when the driver is loaded and rephrase the Kconfig entry to reflect that it also supports compatible chips. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (gpio-fan) Use is_visible to determine if attributes should be createdGuenter Roeck2013-04-071-65/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify code and reduce object size by more than 300 bytes (x86_64). Cc: Jamie Lentin <jm@lentin.co.uk> Cc: Simon Guinot <simon.guinot@sequanux.org> Tested-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (tmp401) Fix device detection for TMP411B and TMP411CGuenter Roeck2013-04-071-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that TMP411B and TMP411C have different and unique device IDs. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: Add driver for LM95234Guenter Roeck2013-04-073-0/+780
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (tmp401) Add support for TMP431Guenter Roeck2013-04-072-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TMP431 is compatible to TMP401. Also add support for additional I2C addresses supported by TMP411B and TMP411C. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* | | | hwmon: (pmbus/lm25066) Add support for LM25056Guenter Roeck2013-04-072-10/+124
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (pmbus/lm25066) Refactor device specific coefficientsGuenter Roeck2013-04-071-78/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize device specific coefficients from table instead of hard-coding it to simplify adding additional chips. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (pmbus/lm25066) Clamp limit attributesGuenter Roeck2013-04-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limits on all supported sensors and chips have to be within 0..0x0fff, and limits are always positive. Clamp written values in chip driver. Also clear value cache to ensure that the actually written value is read back and reported correctly. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (pmbus/lm25066) Report VAUX as vmonGuenter Roeck2013-04-071-52/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the driver reported the voltage on VAUX as "vout2". This was not entirely appropriate as it is not an output voltage, and complicates the code. Use the new virtual "VMON" register set and report the voltage as "vmon" instead. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (max6697) Use is_visible and sysfs_create_groupGuenter Roeck2013-04-071-116/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the code and reduce its size by using is_visible to determine valid attributes, and sysfs_create_group to create all of them with a single call. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (adt7310) Fix sparse warningGuenter Roeck2013-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: drivers/hwmon/adt7310.c:51:16: sparse: cast to restricted __be16 Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (pmbus/ltc2978) Add support for LTC2974 and LTC3883Guenter Roeck2013-04-072-21/+132
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (pmbus/ltc2978) Code cleanupGuenter Roeck2013-04-071-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use u16 instead of int to store cached limit attributes. This reduces allocated data size per driver instance by 48 bytes. Use defines for the number of pages supported by individual chips. Use ARRAY_SIZE for loops to initialize array variables, and initialize all variables in the same code block. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ltc4261) Fix 'Macros with complex values' checkpatch errorGuenter Roeck2013-04-071-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: ERROR: Macros with complex values should be enclosed in parenthesis by unwinding the problematic macros. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ltc4245) Fix 'Macros with complex values' checkpatch errorGuenter Roeck2013-04-071-57/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: ERROR: Macros with complex values should be enclosed in parenthesis by unwinding the problematic macros. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ltc4215) Fix 'Macros with complex values' checkpatch errorGuenter Roeck2013-04-071-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: ERROR: Macros with complex values should be enclosed in parenthesis by unwinding the problematic macros. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ltc4151) Fix 'Avoid unnecessary line continuations' checkpatch warningGuenter Roeck2013-04-071-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (ina2xx) Fix 'Avoid unnecessary line continuations' checkpatch warningGuenter Roeck2013-04-071-8/+8
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: Fix checkpatch warning 'quoted string split across lines'Guenter Roeck2013-04-0736-249/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: Fix CamelCase checkpatch warningsGuenter Roeck2013-04-078-216/+216
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Drop read/write lockGuenter Roeck2013-04-071-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The read/write lock is acquired for each read/write operation from/to the chip. This occurs either during initialization, when it is not needed, or during updates, when the update_lock is held as well, and it is not needed either. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Only report VID if supported and enabledGuenter Roeck2013-04-071-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | VID is not always enabled (NCT6775, NCT6776) or supported (NCT6779). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Detect and report additional temperature sourcesGuenter Roeck2013-04-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Scan all temperature sources used for fan control and report if additional monitoring registers are available. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for weighted fan controlGuenter Roeck2013-04-071-14/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NCT677X series support weighted fan control. In this mode, a secondary temperature source is used in addition to the primary temperature source to control fan speed. Add support for this feature. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for automatic fan controlGuenter Roeck2013-04-071-7/+1092
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for pwm, pwm_mode, and pwm_enableGuenter Roeck2013-04-071-0/+329
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add power management supportGuenter Roeck2013-04-071-0/+86
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for fan debounce module parameterGuenter Roeck2013-04-071-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | If set, fan debounce is enabled when loading the driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for fanX_pulses sysfs attributeGuenter Roeck2013-04-071-0/+64
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for fan speed attributesGuenter Roeck2013-04-071-1/+515
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add support for temperature sensorsGuenter Roeck2013-04-071-3/+745
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: (nct6775) Add case open detectionGuenter Roeck2013-04-071-0/+67
| | | | | | | | | | | | | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: Driver for Nuvoton NCT6775F, NCT6776F, and NCT6779DGuenter Roeck2013-04-073-0/+1035
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver will replace the w83627ehf driver for NCT6775F and NCT6776F, and provides support for NCT6779D. This patch provides support for voltage monitor attributes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: Fix 'Macros with complex values' checkpatch errorsGuenter Roeck2013-04-074-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: ERROR: Macros with complex values should be enclosed in parenthesis when it is seen due to complex code and not due to multi-line variable declarations. Cc: Hans de Goede <hdegoede@redhat.com> Cc: Alistair John Strachan <alistair@devzero.co.uk> Acked-by: Alistair John Strachan <alistair@devzero.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | | hwmon: checkpatch cleanup: Replace printk with pr_debug or dev_dbg as ↵Guenter Roeck2013-04-074-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate Cc: Hans de Goede <hdegoede@redhat.com> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Henrik Rydberg <rydberg@euromail.se> Acked-by: Alistair John Strachan <alistair@devzero.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
OpenPOWER on IntegriCloud