summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2009-10-29Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (it87) Fix VID reading on IT8718F/IT8720F hwmon: (dme1737) No vid attributes for SCH311x hwmon: (fschmd) Fix check on unsigned in watchdog_write() hwmon: (coretemp) Maintainer update
2009-10-29lis3: add support for the HP HDX 18Ian E. Morgan
I have an HP HDX 18 laptop, and noted that the configuration of the accelerometer needs to be x_inverted. Signed-off-by: Ian E. Morgan <penguin.wrangler@gmail.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29lis3: add support for the HP EliteBook 8530wÉric Piel
Correct orientation for HP EliteBook 8530w. Reported-by: Jörgen Jonssson <jorgen.jonsson@saitek.se> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29lis3: better support for hp 6730xPavel Herrmann
I have learned that the 6730b and 6730s have different accelerometer orientation, and have modified the driver accordingly (diff attached), while dropping the wild guess for AMD based 6735 having the same orientation as Intel based 6730 (this is not true for any other related series/family, thus is not probable for 673x). Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-24hwmon: (it87) Fix VID reading on IT8718F/IT8720FJean Delvare
Comparing apples to bananas doesn't seem right. Consistently use the chips enum for chip type comparisons, to avoid such bugs in the future. The bug has been there since support for the IT8718F was added, so VID never worked for this chip nor for the similar IT8720F. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-24hwmon: (dme1737) No vid attributes for SCH311xJean Delvare
The SCH311x chips do not have VID inputs, so the cpu0_vid and vrm attributes shouldn't be created for them. This fixes lm-sensors ticket #2353: http://www.lm-sensors.org/ticket/2353 Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Udo van den Heuvel <udovdh@xs4all.nl> Cc: Juerg Haefliger <juergh@gmail.com>
2009-10-24hwmon: (fschmd) Fix check on unsigned in watchdog_write()Roel Kluin
If unsigned the watchdog_trigger() return value will not be checked correctly. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-11Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (s3c-hwmon) Disable build for S3C64xx MAINTAINERS: Fix Riku Voipio's address hwmon: (asus_atk0110) Enable the EC hwmon: (asus_atk0110) Refactor the code hwmon: (sht15) Fix spurious section mismatch warning
2009-10-11headers: remove sched.h from interrupt.hAlexey Dobriyan
After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-09hwmon: (s3c-hwmon) Disable build for S3C64xxMark Brown
The s3c-hwmon driver depends on the arch/arm implementation of the core ADC support for the chip. Since the S3C64xx version has not yet been merged disable building of the driver on S3C64xx for now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09hwmon: (asus_atk0110) Enable the ECLuca Tettamanti
On newer ASUS boards (e.g. P7P55D) the EC (that - among other things - is responsible for updating the readings from the hwmon sensors) is disabled by default since ASUS detected conflict with some tools under Windows. The following patch checks the state of the EC and enable it if needed; under Linux, native drivers are locked out from ACPI owned resources so there's no risk of conflict. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Tested-by: Robert Hancock <hancockrwd@gmail.com> Tested-by: Thomas Backlund <tmb@mandriva.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09hwmon: (asus_atk0110) Refactor the codeLuca Tettamanti
Refactor the code of the new style interface around GGRP (enumeration) and GITM (read) helpers to mimic ASL code. Also switch the read path to use dynamic buffers (handled by ACPI core) since ASUS expanded the return buffer (ASBF) in newer boards (e.g. P7P55D). Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Tested-by: Robert Hancock <hancockrwd@gmail.com> Tested-by: Thomas Backlund <tmb@mandriva.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09hwmon: (sht15) Fix spurious section mismatch warningRakib Mullick
Fix spurious section mismatch warnings, caused due to reference from variable sht_drivers to __devinit/__devexit functions sht15_probe()/remove(). We were warned by the following warnings: LD drivers/hwmon/built-in.o WARNING: drivers/hwmon/built-in.o(.data+0x264a0): Section mismatch in reference from the variable sht_drivers to the function .devinit.text:sht15_probe() The variable sht_drivers references the function __devinit sht15_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x264a4): Section mismatch in reference from the variable sht_drivers to the function .devexit.text:sht15_remove() The variable sht_drivers references the function __devexit sht15_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x264f0): Section mismatch in reference from the variable sht_drivers to the function .devinit.text:sht15_probe() The variable sht_drivers references the function __devinit sht15_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x264f4): Section mismatch in reference from the variable sht_drivers to the function .devexit.text:sht15_remove() The variable sht_drivers references the function __devexit sht15_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x26540): Section mismatch in reference from the variable sht_drivers to the function .devinit.text:sht15_probe() The variable sht_drivers references the function __devinit sht15_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x26544): Section mismatch in reference from the variable sht_drivers to the function .devexit.text:sht15_remove() The variable sht_drivers references the function __devexit sht15_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: drivers/hwmon/built-in.o(.data+0x26590): Section mismatch in reference from the variable sht_drivers to the function .devinit.text:sht15_probe() The variable sht_drivers references the function __devinit sht15_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-08lis3lv02d_spi: module unload didn't remove sysfs entrySamu Onkalo
In module unload, lis3lv02d core driver sysfs clean up was not called. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Daniel Mack <daniel@caiaq.de> Cc: Éric Piel <eric.piel@tremplin-utc.net> Cc: "Trisal, Kalhan" <kalhan.trisal@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-04ltc4215/ltc4245: Discard obsolete detect methodsJean Delvare
There is no point in implementing a detect callback for the LTC4215 and LTC4245, as these devices can't be detected. It was there solely to handle "force" module parameters to instantiate devices, but now we have a better sysfs interface that can do the same. So we can get rid of the ugly module parameters and the detect callbacks. This shrinks the binary module sizes by 36% and 46%, respectively. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ira W. Snyder <iws@ovro.caltech.edu>
2009-10-01const: constify remaining file_operationsAlexey Dobriyan
[akpm@linux-foundation.org: fix KVM] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (ltc4245) Clear faults at startup hwmon: (ltc4215) Clear faults at startup hwmon: (coretemp) Add Lynnfield CPU hwmon: (coretemp) Add support for Penryn mobile CPUs hwmon: (coretemp) Fix Atom CPUs support hwmon: Delete deprecated FSC drivers hwmon: (adm1031) Add sysfs files for temperature offsets
2009-09-23hwmon: (ltc4245) Clear faults at startupIra W. Snyder
When power is applied to the ltc4245 chip it sometimes reports spurious faults, which are exposed as alarms in the hwmon output. Clear the fault register when the driver is installed to clear the alarms. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23hwmon: (ltc4215) Clear faults at startupIra W. Snyder
When power is applied to the ltc4215 chip it sometimes reports spurious faults. The faults are not yet exposed via sysfs, however it may be useful for userspace to read the fault register directly with the i2cget command. Clear the fault register when the driver is installed so userspace doesn't have to worry about spurious fault indications. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23hwmon: (coretemp) Add Lynnfield CPUHuaxu Wan
Add Lynnfield processor support. Lynnfield is a quad-core Nehalem based microprocessor for Desktop market, which is introduced in September 2009. Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com> Signed-off-by: Kent Liu <kent.liu@linux.intel.com> Acked-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23hwmon: (coretemp) Add support for Penryn mobile CPUsRudolf Marek
Following patch adds support for mobile Penryn CPUs. Intel documents this poorly. I asked the Coretemp author for some help. This is totally untested and may not work. Please test! Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@linux.intel.com> Cc: Kent Liu <kent.liu@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23hwmon: (coretemp) Fix Atom CPUs supportRudolf Marek
Fix Atom CPUs support. Intel documents TjMax at 90 degrees C but some Atoms may have 125 degrees C (this is undocumented speculation). Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@linux.intel.com> Cc: Kent Liu <kent.liu@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23hwmon: Delete deprecated FSC driversJean Delvare
The legacy fscpos and fscher drivers have been replaced by the unified fschmd driver. The transition period is over now, we can delete them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com>
2009-09-23hwmon: (adm1031) Add sysfs files for temperature offsetsIra Snyder
The ADM1030/ADM1031 chips have temperature offset registers, for both the local and remote temperature sensors. Following the example set forth in the LM90/ADM1032 driver, expose the offset registers to userspace. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23spi: prefix modalias with "spi:"Anton Vorontsov
This makes it consistent with other buses (platform, i2c, vio, ...). I'm not sure why we use the prefixes, but there must be a reason. This was easy enough to do it, and I did it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Samuel Ortiz <sameo@openedhand.com> Cc: "John W. Linville" <linville@tuxdriver.com> Acked-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23hwmon: lm70: convert to device table matchingAnton Vorontsov
Make the code a little bit nicer, and shorter. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Kaiwan N Billimoria <kaiwan@designergraphix.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23hwmon: adxx: convert to device table matchingAnton Vorontsov
Make the code a little bit nicer, and shorter. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Marc Pignat <marc.pignat@hevs.ch> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23dme1737: Keep index within pwm_config[]Roel Kluin
The static code scanner "Parfait" reported this because pwm_config is only 3 bytes - pwm_config[3] is out of range. Since this code path is never called with ix == 3 (the device has no PWM4 output) this doesn't change anything in practice. But to encourage testing with Parfait, lets make the warning go away... Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22hwmon: applesmc: restore accelerometer and keyboard backlight on resumeHenrik Rydberg
On resume from suspend, the driver currently resets the logical state as if it was brought up from halt. This patch uses the dev_pm_ops.resume/restore methods to synchronize the hardware with the memorized logical state, in effect bringing back the accelerometer and backlight to the state prior to suspend. Works for both suspend to ram and hibernation. The patch has zero effect on the running state. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Cc: Nicolas Boichat <nicolas@boichat.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22hwmon: fix freeing of gpio_data and irqRoel Kluin
If already requested, gpio_data and irq should be freed in the case of an error. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22drivers/hwmon/adm1021.c: add low_power support for adm1021 driverMichael Abbott
Occasionally it is helpful to be able to turn a temperature sensor off (for example if it's making unwanted electrical noise). This patch adds a sysfs node to put any adm1021 compatible device into low power mode. Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22drivers/hwmon/adm1021.c: support high precision ADM1023 remote sensorMichael Abbott
The ADM1023 temperature sensor supports higher resolution for its external sensor (sensitivity of 1/8 deg C). This patch makes this higher resolution available through the appropriate temperature sysfs nodes. Curiously, this functionality was available in the 2.4 kernel driver (but formatted in a less helpful manner). Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22lis3_spi: code cleanupsDaniel Mack
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22lis3: add power management functionsDaniel Mack
This enabled power management functions for the SPI transport layer of the lis3 devices. The device's suspend mode is only entered in case no wakeup threshold has been given. In this case, the device is supposed to wake up the system and must thus not be put to deep sleep. [randy.dunlap@oracle.com: fix lis3-spi for CONFIG_PM=n] Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22lis3: add free-fall/wakeup function via platform_dataDaniel Mack
This offers a way for platforms to define flags and thresholds for the free-fall/wakeup functions of the lis302d chips. More registers needed to be seperated as they are specific to the Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22drivers/hwmon/coretemp.c: enable the Intel AtomMichael Riepe
Enable the coretemp driver on an Intel Atom. I'm not sure if the readings are correct, however - on my 330, the driver reports values between 27 and 41 °C (with core1 being about 8°C hotter than core0, given the same load). Maybe the maximum temperature of 100 °C is wrong for Atom CPUs. Cc: Arjan van de Ven <arjan@infradead.org> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-18Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (55 commits) regulator: Voltage count for AB3100 mfd: Convert WM8350 to use request_threaded_irq() mfd: Update MAINTAINERS patterns for WM831x mfd: Fix twl4030-power warnings regulator: AB3100 support rtc: AB3100 RTC support mfd: Fix ab3100-otp build failure mfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board mfd: Print warning for twl4030 out-of-order script loading mfd: Add support for TWL4030/5030 dynamic power switching mfd: AB3100 OTP readout regulator: Add Freescale MC13783 driver mfd: Add Freescale MC13783 driver mfd: AB3100 disable irq nosync mfd: AB3100 alter default setting mfd: AB3100 propagate error mfd: AB3100 accessor function cleanups rtc: Add support for RTCs on Wolfson WM831x devices regulator: get pcap data from the parent device input: PCAP2 misc input driver ...
2009-09-17hwmon: WM831x PMIC hardware monitoring driverMark Brown
This driver adds support for the hardware monitoring features of the WM831x PMICs to the hwmon API. Monitoring is provided for the system voltages supported natively by the WM831x, the chip temperature, the battery temperature and the auxiliary inputs of the WM831x. Currently no alarms are supported, though digital comparators on the WM831x devices would allow these to be provided. Since the auxiliary and battery temperature input scaling depends on the system configuration the value is reported as a voltage to userspace. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17hwmon: Add WM835x PMIC hardware monitoring driverMark Brown
This driver provides reporting of the status supply voltage rails of the WM835x series of PMICs via the hwmon API. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-15hwmon: (lm85) Don't bind to Winbond/Nuvoton WPCD377IJean Delvare
The Winbond/Nuvoton WPCD377I is the reduced version of a Super-I/O which emulates the National Semiconductor LM96000 hardware monitoring chips, but without the hardware monitoring part. Instead of plain disabling the emulation, the vendor left the emulated chip visible, but all monitored values are always zero. This is rather confusing for the users. So detect this case and refuse to bind to such fake chips. This fixes lm-sensors ticket #2182: http://www.lm-sensors.org/ticket/2182 Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15hwmon: Clearly mark ACPI drivers as suchJean Delvare
Now that we have ACPI-based hardware monitoring drivers, and we will start telling users to use them instead of native drivers when I/O resources conflict, I think it would be good to clearly mark ACPI drivers as such in Kconfig. Also, in the case of monolithic kernels, I think the ACPI drivers should take precedence over native drivers, so they should be listed first in Makefile. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Luca Tettamanti <kronos.it@gmail.com>
2009-09-15hwmon: Use resource_sizeJulia Lawall
Use the function resource_size, which reduces the chance of introducing off-by-one errors in calculating the resource size. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15hwmon: Include <linux/io.h> instead of <asm/io.h>H Hartley Sweeten
Drivers should be including <linux/io.h> instead of <asm/io.h>. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Nicolas Boichat <nicolas@boichat.ch> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Frank Seidel <frank@f-seidel.de> Acked-by: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15hwmon: Add driver for Texas Instruments TMP421/422/423 sensor chipsAndre Prendel
Add support for Texas Instruments TMP421/422/423 temperature sensor IC. TI's TMP421/422/423 are I2C temperature sensor chips. These chips are similar to TI's TMP401/411 chips, but with reduced functionality (only temperature measurement). The chips have one local sensor and up to three (TMP423) remote sensors. Signed-off-by: Andre Prendel <andre.prendel@gmx.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15hwmon-vid: Ignore 6th VID pin of AMD family 0Fh processorsJean Delvare
We had a report about a mainboard for AMD family 0Fh processors not routing the 6th VID pin from the CPU to the hardware monitoring chip. While the vendor should have wired the pin (or, failing that, should have hardwired it to level high rather than low), the fact is that none of these processors are currently known to operate at the lower voltage levels which require the 6th VID pin. So, as a practical workaround, I propose to ignore the 6th VID pin for these CPUs. If this decision ever causes problems, we'll reconsider. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Frank Myhr <fmyhr@fhmtech.com> Tested-by: Hleb Valoshka <375gnu@gmail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
2009-09-15hwmon: (abituguru3) Support multiple DMI strings per chip IDAlistair John Strachan
Most known Abit motherboards have unique uguru chip IDs. However, some "refresh" boards keep the same chip ID but have a different DMI string. As our DMI board string matching is (necessarily) strict, some boards were failing DMI detection, and as the old probe method was also failing, the driver would not load. The only known boards affected by this problem are the IP35 Pro XE (vs IP35 Pro) and the AB9 Pro (vs AB9). Is it not sufficient to relax the match criteria, as some boards (e.g. the AB9 Quad GT) have different uguru chip IDs. This patch replaces the dmi_name string with a NULL terminated array of strings to be matched per uguru chip ID. It has been compile and runtime tested (thanks Rune). References: https://bugs.launchpad.net/bugs/298798 Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Tested-by: Rune Svendsen <runesvend@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-08-14Merge branch 'next-s3c-hwmon' into next-s3cBen Dooks
2009-07-28hwmon: (asus_atk0110) Fix upper limit readingsLuca Tettamanti
On newer Asus boards the "upper" limit of a sensor is encoded as delta from the "lower" limit. Fix the driver to correctly handle this case. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Tested-by: Alex Macfarlane Smith <nospam@archifishal.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-07-28hwmon: (smsc47m1) Differentiate between LPC47M233 and LPC47M292Jean Delvare
The SMSC LPC47M233 and LPC47M292 chips have the same device ID but are not compatible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Juerg Haefliger <juergh@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com>
2009-07-18ARM: HWMON: S3C24XX series ADC driverBen Dooks
Add support for the ADC controller on the S3C series of processors to drivers/hwmon for use with hardware monitoring systems. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>