summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2008-08-15hwmon-vid: Fix AMD K8 VID decodingJean Delvare
Not all AMD K8 have 6 VID pins, contrary to what was assumed in commit 116d0486bdefc11f71e567cadf0c47f788b4dd06. This commit broke support of older CPU models which have only 5 VID pins: http://bugzilla.kernel.org/show_bug.cgi?id=11329 We need two entries in the hwmon-vid table, one for 5-bit VID models (K8 revision <= E) and one for 6-bit VID models (K8 revision >= F). This fixes bug #11329. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Frank Myhr <fmyhr@fhmtech.com> Tested-by: Jean-Luc Coulon <jean.luc.coulon@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15coretemp: recognize Nehalem CPUsDarrick J. Wong
Add in the CPUID for Nehalem chips. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Cc: Kent Liu <kent.liu@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15ibmaem: don't query the entire sensor repository when reading energy meterDarrick J. Wong
Currently, all sensors are read when the energy meter is queried via sysfs. This introduces a considerable amount of delay and variation in the sysfs reading, which is not desirable when trying to profile energy use. Therefore, read only the energy meters when a sysfs query comes in for them, and don't cache the results so that we always get the latest reading. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15ibmaem: prevent infinite probing loop on x3650 M2 systemsDarrick J. Wong
On older machines, probing for a nonexistent AEM interface returned an IPMI error; when we saw this, we'd stop probing. On the x3650 M2 and (presumably) later, we are returned a value indicating success and a buffer full of garbage or zeroes. This causes the probe function to run in an infinite loop. To fix this, we add one last check--if the interface number we're looking for is higher than the number of interfaces that AEM claims to have, stop probing. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15ibmaem: update the documentation to reflect the current nameDarrick J. Wong
Minor documentation update to reflect the current full name of the power management hardware interface and reflows the text a bit. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15abituguru3: prefer DMI probing to manual probingAlistair John Strachan
Previously the driver was only using DMI to prevent smbus probing on non-Abit motherboards. However, since the manual probing method is brittle and prone to failure on some Abit motherboards (esp. the Abit IP35 Pro) it is better to use DMI to also read the board name and then decide whether or not to probe the bus. At the moment, we do not have a list of valid DMI name strings to use for existing and supported motherboards. This patch only implements DMI probing for the IP35 Pro. For motherboards that can not yet use DMI probing, a warning will be printed to the kernel log asking those users to email me their dmidecode output. The existing manual probing mechanism will be used if CONFIG_DMI is not enabled, if DMI probing fails (for DMI-unsupported motherboards), or if DMI probing fails and the "force" option is set (for DMI-supported motherboards). Ideally in the longer term this manual probing method would be removed. This patch should be safe to apply as it does not change the probing behaviour for most of the supported motherboards, just the IP35 Pro, which already has regressions filed against it in 2.6.26. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11212 Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15i5k_amb: provide labels for temperature sensorsDarrick J. Wong
Export the sensor -> channel/dimm mapping in tempX_label. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> 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>
2008-08-15hwmon: ADC124S501 generic driverMarc Pignat
SPI driver for analog to digital converters national semiconductor ADC081S101, ADC124S501, ... Code for 8 channels by Tobias Himmer. This driver adds support for National Semiconductor ADC<bb><c>S<sss> chip family, where: * bb is the resolution in number of bits (8, 10, 12) * c is the number of channels (1, 2, 4, 8) * sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500 kSPS and 101 for 1 MSPS) [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Cc: Tobias Himmer <tobias@himmer-online.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Jean Delvare <khali@linux-fr.org> 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>
2008-08-15drivers/hwmon/w83791d.c: fix unused var warningMichael Borisov
drivers/hwmon/w83791d.c: In function `w83791d_probe': drivers/hwmon/w83791d.c:1049: warning: unused variable `val1' Signed-off-by: Michael Borisov <niro@tut.by> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15applesmc: add support for MacbookGuilherme M. Schroeder
Add support for Macbook v3 (sensors and accelerometer). Signed-off-by: Nicolas Boichat <nicolas@boichat.ch> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> 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>
2008-08-15applesmc: support for Intel iMacRoberto De Ioris
This adds support for fans and temperature sensors on intel iMac. Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors: cpu A ambient gpu gpu diode gpu heatsink hd bay 1 memory controller optical drive power Signed-off-by: Roberto De Ioris <roberto@unbit.it> Cc: Nicolas Boichat <nicolas@boichat.ch> Cc: Jean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-10hwmon: (lm75) Drop legacy i2c driverJean Delvare
Drop the legacy lm75 driver, and add a detect callback to the new-style driver to achieve the same functionality. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
2008-08-06hwmon: (it87) Support for 16-bit fan reading in it8705 >= rev 0x03Andrew Paprocki
The it8705 chip supports 16-bit fan tachometers in revisions at least >= 0x03 (Version G). This patch enables 16-bit fan readings on all revisions >= 0x03 just like the it8712, it8716, and it8718 chips. Signed-off-by: Andrew Paprocki <andrew@ishiboo.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (it87) Support for 16-bit fan reading in it8712 >= rev 0x07Andrew Paprocki
The it8712 chip supports 16-bit fan tachometers in revisions >= 0x07. Revisions >= 0x08 dropped support for 8-bit fan divisor registers. The patch enables 16-bit fan readings on all revisions >= 0x07 just like the it8716 and it8718 chips. Signed-off-by: Andrew Paprocki <andrew@ishiboo.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (hwmon-vid) Add 6-bit vid codes for AMD NPT 0Fh cpusFrank Myhr
AMD NPT 0Fh cpus use 6 bit VID codes. Successive codes with msb 0 describe 25mV decrements, while those with msb 1 describe 12.5mV decrements. Existing hwmon-vid.c is correct only for codes with msb 0; add support for the codes with msb 1. Ref: p 309, Table 71 AMD Publication 32559, BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf Signed-off-by: Frank Myhr <fmyhr@fhmtech.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (hwmon-vid) Trivial format multi-line comments per CodingStyleFrank Myhr
Signed-off-by: Frank Myhr <fmyhr@fhmtech.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: ad7414 driverSean MacLennan
Driver for the Analog Devices AD7414 temperature monitoring chip. Signed-off-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (thmc50) Add support for critical temperature limitsKrzysztof Helt
Add critical temperature limits to the driver. These limits are read only. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (adm9240) Remove EXPERIMENTAL dependencyGrant Coady
The adm9240 driver is in the kernel for three years now, time to remove the EXPERIMENTAL dependency. Signed-off-by: Grant Coady <gcoady.lk@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (w83627hf) Drop reset module parameterJean Delvare
Drop the reset parameter of the w83627hf driver. It seems it wasn't that useful. It was dropped from the Linux 2.4 version of this driver back in July 2004. The only users who have reported that they were still using this parameter, needed it to switch the chip from automatic fan speed control back to manual mode. Now that the driver creates pwmN_enable sysfs files, users will be able to use these files instead, which is way less agressive. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Dominik Geyer <dominik.geyer@gmx.de>
2008-08-06hwmon: (w83627hf) Add pwm_enable sysfs interfaceDominik Geyer
Adds support for pwm_enable sysfs interface for the w83627hf driver. Signed-off-by: Dominik Geyer <dominik.geyer@gmx.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (w83791d) Use fan divisor bits from vbat registerMarc Hulsman
Update w83791d with fan bits in vbat mon register (7.48 of the datasheet). This change allows all fans to have a divisor of 128, and fixes a problem with incorrectly reported fan speeds. Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (f71882fg) Delete needless forward declarationsJean Delvare
These functions aren't used before being defined, so there's no point in forward-declaring them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
2008-08-06hwmon: (dme1737) Add support for the SMSC SCH5027Juerg Haefliger
Add support for the SCH5027. The differences to the DME1737 are: - No support for programmable temp offsets - In auto mode, PWM outputs stay on min value if temp goes below low threshold and can't be programmed to fully turn off - Different voltage scaling - No VID input Signed-off-by: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (dme1737) Skip detection if forcedJuerg Haefliger
Skip the checking of the device ID register in the hwmon register block if the force_id option is used. Signed-off-by: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06hwmon: (dme1737) CleanupsJuerg Haefliger
Fix names of attribute structs to make them more consistent with the rest of the code. Minor comment changes. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-01Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: hwmon: needs new maintainer hwmon: (lm85) Simplify device initialization function hwmon: (lm85) Misc cleanups hwmon: (lm85) Don't write back cached values hwmon: (lm85) Drop dead code hwmon: (lm85) Coding-style cleanups hwmon: (lm75) add new-style driver binding hwmon: (lm75) cleanup/reorg hwmon: (adt7473) clarify an awkward bit of code hwmon: (adt7473) Remove unused defines hwmon: (dme1737) fix voltage scaling hwmon: (dme1737) probe all addresses hwmon: (dme1737) demacrofy for readability
2008-07-31hwmon: (lm85) Simplify device initialization functionJean Delvare
Clean up and simplify the device initialization function: * Degrade error messages to warnings - what they really are. * Stop warning about VxI mode, we don't really care. * Drop comment about lack of limit initialization - that's the standard way, all hardware monitoring drivers do that. * Only read the configuration register once. * Only write back to the configuration register if needed. * Don't attempt to clear the lock bit, it locks itself to 1. * Move the function to before it's called, so that we no longer need to forware declare it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Misc cleanupsJean Delvare
Misc cleanups to the lm85 hardware monitoring driver: * Mark constant arrays as const. * Remove useless masks. * Have lm85_write_value return void - nobody is checking the returned value anyway and in some cases it was plain wrong. * Remove useless initializations. * Rename new_client to client in lm85_detect. * Replace cascaded if/else with a switch/case in lm85_detect. * Group similar loops in lm85_update_device. * Remove legacy comments. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Don't write back cached valuesJean Delvare
In set_pwm_auto_pwm_minctl, we write cached register bits back to the chip. This is a bad idea as we have no guarantee that the cache is up-to-date. Better read a fresh register value from the chip, it's safer and in fact it is also more simple. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Drop dead codeJean Delvare
Drop a lot of useless register defines, conversion macros, data structure members and update code. All these register values were read from the device but nothing is done out of them, so this is all dead code in practice. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Coding-style cleanupsJean Delvare
Fix most style issues reported by checkpatch, including: * Trailing, missing and extra whitespace * Extra parentheses, curly braces and semi-colons * Broken indentation * Lines too long I verified that the generated code is the same before and after these changes. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm75) add new-style driver bindingDavid Brownell
More LM75 updates: - Teach the LM75 driver to use new-style driver binding: * Create a second driver struct, using new-style driver binding methods cribbed from the legacy code. * Add a MODULE_DEVICE_TABLE (for "newER-style binding") * The legacy probe logic delegates its work to this new code. * The legacy driver now uses the name "lm75_legacy". - More careful initialization. Chips are put into 9-bit mode so the current interconversion routines will never fail. - Save the original chip configuration, and restore it on exit. (Among other things, this normally turns off the mode where the chip is constantly sampling ... and thus saves power.) So the new-style code should catch all chips that boards declare, while the legacy code catches others. This particular coexistence strategy may need some work yet ... legacy modes might best be set up explicitly by some tool not unlike "sensors-detect". (Or else completely eradicated...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm75) cleanup/reorgDavid Brownell
Minor cleanup and reorg of the lm75 code. - Kconfig provides a larger list of lm75-compatible chips - A top comment now says what the driver does (!) ... as in, just what sort of sensor is this?? - Section comments now delineate the various sections of the driver: hwmon attributes, driver binding, register access, module glue. One driver binding function moved out of the attribute section, as did the driver struct itself. - Minor tweaks to legacy probe logic: correct a comment, and remove a pointless variable. - Whitespace, linelength, and comment fixes. This patch should include no functional changes. It's preparation for adding new-style (driver model) I2C driver binding. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (adt7473) clarify an awkward bit of codeMark M. Hoffman
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2008-07-31hwmon: (adt7473) Remove unused definesJean Delvare
All the *_MAX_ADDR defines are never used, so remove them. The number of registers of each type is already expressed by the *_COUNT defines. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) fix voltage scalingJuerg Haefliger
This patch fixes a voltage scaling issue for the sch311x device. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) probe all addressesJuerg Haefliger
This patch adds a module load parameter to enable probing of non-standard LPC addresses 0x162e and 0x164e when scanning for supported ISA chips. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) demacrofy for readabilityJuerg Haefliger
This patch gets rid of a couple of macros previously used for sysfs attribute generation and manipulation. This makes the source a little bigger but a lot more readable and maintainable. It also fixes an issue with pwm5 & pwm6 attributes not being created read-only initially. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-21device create: hwmon: convert device_create to device_create_drvdataGreg Kroah-Hartman
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into nextDmitry Torokhov
2008-07-16hwmon: (w83l786ng) Convert to a new-style i2c driverJean Delvare
The new-style w83l786ng driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Kevin Lo <kevlo@kevlo.org>
2008-07-16hwmon: (w83l785ts) Convert to a new-style i2c driverJean Delvare
The new-style w83l785ts driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83793) Convert to a new-style i2c driverJean Delvare
The new-style w83793 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83792d) Convert to a new-style i2c driverJean Delvare
The new-style w83792d driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83791d) Convert to a new-style i2c driverJean Delvare
The new-style w83791d driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Marc Hulsman <m.hulsman@tudelft.nl>
2008-07-16hwmon: (thmc50) Convert to a new-style i2c driverJean Delvare
The new-style thmc50 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
2008-07-16hwmon: (smsc47m192) Convert to a new-style i2c driverJean Delvare
The new-style smsc47m192 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hartmut Rick <linux@rick.claranet.de>
2008-07-16hwmon: (max6650) Convert to a new-style i2c driverJean Delvare
The new-style max6650 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans J. Koch <hjk@linutronix.de>
2008-07-16hwmon: (max1619) Convert to a new-style i2c driverJean Delvare
The new-style max1619 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alexey Fisher <fishor@mail.ru>