Archived
14
0
Fork 0
Commit graph

577 commits

Author SHA1 Message Date
Andrew Paprocki
816d8c6a25 hwmon: (it87) Support for 16-bit fan reading in it8705 >= rev 0x03
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-06 22:41:06 +02:00
Andrew Paprocki
0475169c13 hwmon: (it87) Support for 16-bit fan reading in it8712 >= rev 0x07
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-06 22:41:06 +02:00
Frank Myhr
116d0486bd hwmon: (hwmon-vid) Add 6-bit vid codes for AMD NPT 0Fh cpus
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-06 22:41:06 +02:00
Frank Myhr
15872212e8 hwmon: (hwmon-vid) Trivial format multi-line comments per CodingStyle
Signed-off-by: Frank Myhr <fmyhr@fhmtech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-08-06 22:41:06 +02:00
Sean MacLennan
6c633c3025 hwmon: ad7414 driver
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-06 22:41:05 +02:00
Krzysztof Helt
84f768c163 hwmon: (thmc50) Add support for critical temperature limits
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-06 22:41:05 +02:00
Grant Coady
68f823de3f hwmon: (adm9240) Remove EXPERIMENTAL dependency
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-06 22:41:05 +02:00
Jean Delvare
2f8ea97a45 hwmon: (w83627hf) Drop reset module parameter
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-06 22:41:04 +02:00
Dominik Geyer
a95a5ed856 hwmon: (w83627hf) Add pwm_enable sysfs interface
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-06 22:41:04 +02:00
Marc Hulsman
ad02ad85cf hwmon: (w83791d) Use fan divisor bits from vbat register
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-06 22:41:04 +02:00
Jean Delvare
05a5e47768 hwmon: (f71882fg) Delete needless forward declarations
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-06 22:41:04 +02:00
Juerg Haefliger
549edb8332 hwmon: (dme1737) Add support for the SMSC SCH5027
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-06 22:41:03 +02:00
Juerg Haefliger
55d68d75ab hwmon: (dme1737) Skip detection if forced
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-06 22:41:03 +02:00
Juerg Haefliger
73ce48f6c6 hwmon: (dme1737) Cleanups
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-06 22:41:03 +02:00
Linus Torvalds
6760561324 Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
* '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-08-01 11:33:19 -07:00
Jean Delvare
5f44759470 hwmon: (lm85) Simplify device initialization function
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-31 23:44:03 -04:00
Jean Delvare
e89e22b23b hwmon: (lm85) Misc cleanups
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-31 23:44:03 -04:00
Jean Delvare
7133e56f29 hwmon: (lm85) Don't write back cached values
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-31 23:44:03 -04:00
Jean Delvare
dd1ac5384a hwmon: (lm85) Drop dead code
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-31 23:44:03 -04:00
Jean Delvare
1f44809ac3 hwmon: (lm85) Coding-style cleanups
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-31 23:44:03 -04:00
David Brownell
9ebd3d822e hwmon: (lm75) add new-style driver binding
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-31 23:44:02 -04:00
David Brownell
01a52397e9 hwmon: (lm75) cleanup/reorg
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-31 23:44:02 -04:00
Mark M. Hoffman
321c413857 hwmon: (adt7473) clarify an awkward bit of code
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2008-07-31 23:44:02 -04:00
Jean Delvare
9d3e19afd3 hwmon: (adt7473) Remove unused defines
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-31 23:44:02 -04:00
Juerg Haefliger
f994fb23d3 hwmon: (dme1737) fix voltage scaling
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-31 23:44:02 -04:00
Juerg Haefliger
92430b6feb hwmon: (dme1737) probe all addresses
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-31 23:44:02 -04:00
Juerg Haefliger
9b257714a3 hwmon: (dme1737) demacrofy for readability
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-31 23:44:01 -04:00
Greg Kroah-Hartman
2871f55237 device create: hwmon: convert device_create to device_create_drvdata
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-21 21:54:42 -07:00
Dmitry Torokhov
908cf4b925 Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
Jean Delvare
33468e7637 hwmon: (w83l786ng) Convert to a new-style i2c driver
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-16 19:30:18 +02:00
Jean Delvare
dc18a4184d hwmon: (w83l785ts) Convert to a new-style i2c driver
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-16 19:30:18 +02:00
Jean Delvare
a7f13a6ec4 hwmon: (w83793) Convert to a new-style i2c driver
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-16 19:30:17 +02:00
Jean Delvare
31d5d275a1 hwmon: (w83792d) Convert to a new-style i2c driver
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-16 19:30:17 +02:00
Jean Delvare
cb0c1af379 hwmon: (w83791d) Convert to a new-style i2c driver
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-16 19:30:17 +02:00
Jean Delvare
ccf3748832 hwmon: (thmc50) Convert to a new-style i2c driver
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-16 19:30:16 +02:00
Jean Delvare
8fb597bb6e hwmon: (smsc47m192) Convert to a new-style i2c driver
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-16 19:30:16 +02:00
Jean Delvare
0d57abd5b8 hwmon: (max6650) Convert to a new-style i2c driver
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-16 19:30:16 +02:00
Jean Delvare
c6d3f6fa1b hwmon: (max1619) Convert to a new-style i2c driver
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>
2008-07-16 19:30:15 +02:00
Jean Delvare
70b724063f hwmon: (lm93) Convert to a new-style i2c driver
The new-style lm93 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: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Eric J. Bowersox <ericb@aspsys.com>
Cc: Carsten Emde <cbe@osadl.org>
Cc: Hans J. Koch <hjk@linutronix.de>
2008-07-16 19:30:15 +02:00
Jean Delvare
910e8dcf16 hwmon: (lm92) Convert to a new-style i2c driver
The new-style lm92 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-16 19:30:15 +02:00
Jean Delvare
9b0e852692 hwmon: (lm90) Convert to a new-style i2c driver
The new-style lm90 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-16 19:30:15 +02:00
Jean Delvare
a888420af0 hwmon: (lm87) Convert to a new-style i2c driver
The new-style lm87 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: Ben Hutchings <bhutchings@solarflare.com>
2008-07-16 19:30:14 +02:00
Jean Delvare
b6aacdcefa hwmon: (lm83) Convert to a new-style i2c driver
The new-style lm83 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-16 19:30:14 +02:00
Jean Delvare
8c8bacc883 hwmon: (lm80) Convert to a new-style i2c driver
The new-style lm80 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-16 19:30:14 +02:00
Jean Delvare
a189dd62d3 hwmon: (lm77) Convert to a new-style i2c driver
The new-style lm77 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: Andras Bali <drewie@freemail.hu>
2008-07-16 19:30:13 +02:00
Jean Delvare
d5957be2f1 hwmon: (lm63) Convert to a new-style i2c driver
The new-style lm63 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-16 19:30:13 +02:00
Jean Delvare
a23a9fe1d4 hwmon: (gl520sm) Convert to a new-style i2c driver
The new-style gl520sm 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: Maarten Deprez <maartendeprez@users.sourceforge.net>
2008-07-16 19:30:13 +02:00
Jean Delvare
95d80e7c83 hwmon: (gl518sm) Convert to a new-style i2c driver
The new-style gl518sm 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-16 19:30:13 +02:00
Jean Delvare
b9e39b1b1b hwmon: (fscpos) Convert to a new-style i2c driver
The new-style fscpos 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-16 19:30:12 +02:00
Jean Delvare
40ac1994bf hwmon: (fschmd) Convert to a new-style i2c driver
The new-style fschmd 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 de Goede <j.w.r.degoede@hhs.nl>
2008-07-16 19:30:12 +02:00