Commit Graph

289 Commits

Author SHA1 Message Date
Jean Delvare 247dde4cdd hwmon/lm78: Use dynamic sysfs callbacks
This lets us get rid of macro-generated functions and shrinks the
driver size significantly (about 10%).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:01 +02:00
Jean Delvare c59cc301ee hwmon/lm78: Be less i2c_client-centric
Use the driver data structure as the main device reference, instead of
the i2c client. It makes the driver a bit smaller, and makes more sense
as this is an hybrid driver, supporting both I2C and ISA devices.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:01 +02:00
Jean Delvare c40769fee1 hwmon/lm78: No longer use i2c-isa
Reimplement the ISA device support as a platform driver, so that we no
longer rely on i2c-isa.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Hans-Juergen Koch d20620de0c hwmon: New max6650 driver
This driver supports the Maxim MAX6650 and MAX6651 fan speed
monitoring and control chips.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Jean Delvare e84cfbcbe8 hwmon/smsc47m1: Use dynamic sysfs callbacks
This lets us get rid of macro-generated functions and shrinks the
driver size by about 7%.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Jean Delvare 620100cf97 hwmon/smsc47m1: Use DRVNAME consistently
Also use pr_info instead of printk.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Jean Delvare 51f2cca1f7 hwmon/smsc47m1: Convert to a platform driver
Convert the smsc47m1 driver from the nonsensical i2c-isa hack to a
regular platform driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Jean Delvare 787c72b107 hwmon/w83627hf: Convert to a platform driver
Convert the w83627hf driver from the nonsensical i2c-isa hack to a
regular platform driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:22:00 +02:00
Jean Delvare d27c37c0be hwmon/w83627hf: Preliminary cleanups
Some preliminary cleanups to the w83627hf hardware monitoring driver,
to make its conversion to a platform driver easier:

* Add missing include ioport.h
* Drop unused enum value any_chip
* Group module parameters
* Define and use DRVNAME
* Drop unused struct member lm75
* Move the handling of force_addr and device activation to
  w83627hf_find
* Consistently use local type in w83627hf_init_client

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:21:59 +02:00
Rudolf Marek e46751bfd6 hwmon-vid: Add support for VIA Esther
Update the VID type for certain VIA processors and remove
the Itanium entries.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:21:59 +02:00
Jean Delvare 8a665a0552 hwmon: Only call vid_which_vrm() when needed
Some hardware monitoring drivers create the VID/VRM interface files
conditionally depending on the chip model or configuration. We should
only call vid_which_vrm() when we are actually going to create the
files. Not only it is more logical and efficient that way, but it also
prevents printing unnecessary warnings such as the one reported here:
http://lists.lm-sensors.org/pipermail/lm-sensors/2007-February/018954.html

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:21:59 +02:00
Jean Delvare 94e183fd04 hwmon/smsc47m1: Get rid of a useless mutex
The smsc47m1 driver uses a mutex to protect the accesses to the
hardware registers. It really doesn't need any protection, as the
register space is flat. Get rid of that mutex for a smaller and
faster driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:21:59 +02:00
Jean Delvare 8eccbb6fb9 hwmon/smsc47m1: Add support for the LPC47M292
The new SMSC LPC47M292 Super-I/O chip is a bit different from the
previous ones, it supports a 3rd fan, but unfortunately the pin
configuration registers are different.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08 17:21:59 +02:00
Jean Delvare ce7ee4e80a hwmon: Request the I/O regions in platform drivers
My understanding of the resource management in the Linux 2.6 device
driver model is that the devices should declare their resources, and
then when a driver attaches to a device, it should request the
resources it will be using, so as to mark them busy. This is how the
PCI and PNP subsystems work, you can clearly see the two levels of
resources (declaration and request) in /proc/ioports for these
devices.

So I believe that our platform hardware monitoring drivers should
follow the same logic. At the moment, we only declare the resources
but we do not request them. This patch adds the I/O region request
and release calls.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh@gmail.com>
2007-05-08 17:21:59 +02:00
Jean Delvare 00cb473905 hwmon/smsc47m192: Document the LPC47M292 as supported
The new SMSC LPC47M292 Super-I/O chip includes a hardware monitoring
block which is compatible with those of the LPC47M192.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hartmut Rick <linux@rick.claranet.de>
2007-05-08 17:21:59 +02:00
Stephen Rothwell 55b61fec22 [POWERPC] Rename device_is_compatible to of_device_is_compatible
for consistency with other Open Firmware interfaces (and Sparc).

This is just a straight replacement.

This leaves the compatibility define in place.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07 20:31:14 +10:00
Stephen Rothwell 40cd3a4564 [POWERPC] Rename get_property to of_get_property: drivers
These are all the remaining instances of get_property.  Simple rename of
get_property to of_get_property.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02 20:04:32 +10:00
Paul Mackerras 49e1900d4c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
Paul Mackerras a48141db68 Revert "[POWERPC] Rename get_property to of_get_property: drivers"
This reverts commit d05c7a80cf,
which included changes which should go via other subsystem
maintainers.
2007-04-26 22:24:31 +10:00
Jean Delvare 1a641fceb6 hwmon/w83627ehf: Don't redefine REGION_OFFSET
On ia64, kernel headers define REGION_OFFSET so we can't use that.
Reported by Andrew Morton.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:08 -07:00
Jean Delvare 33725ad36d hwmon/w83627ehf: Fix the fan5 clock divider write
Users have been complaining about the w83627ehf driver flooding their logs
with debug messages like:

w83627ehf 9191-0a10: Increasing fan 4 clock divider from 64 to 128

or:

w83627ehf 9191-0290: Increasing fan 4 clock divider from 4 to 8

The reason is that we failed to actually write the LSB of the encoded clock
divider value for that fan, causing the next read to report the same old value
again and again.

Additionally, the fan number was improperly reported, making the bug harder to
find.

Signed-off-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>
2007-04-17 16:36:27 -07:00
Stephen Rothwell d05c7a80cf [POWERPC] Rename get_property to of_get_property: drivers
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:19 +10:00
Stephen Rothwell a7edd0e676 [POWERPC] get_property returns const
This just tidies up some of the remains.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:17 +10:00
Stefano Brivio 7a5e6bc29a [PATCH] hwmon: Build fix for SENSORS_W83793
We need vid_which_vrm and vid_from_reg in the w83793 module.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-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>
2007-03-16 19:25:06 -07:00
Juerg Haefliger 2219cd81a6 hwmon/vt1211: Add probing of alternate config index port
The configuration index port of the vt1211 can be accessed at two
different addresses 0x2e or 0x4e, depending on pin strappings. This
patch adds support to scan both addresses during module
initialization.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:05 +01:00
Jean Delvare a117dddf6b hwmon/f71805f: Fix a race condition
I think I introduced a potential race condition bug with commit
51c997d80e. I didn't realize it
back then, but platform_device_put and platform_device_release
both appear to free the platform data associated with the device.
This makes an explicit kfree redundant at best, and maybe even
racy, as it might occur while someone still holds a reference
to the platform device.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:05 +01:00
Hans de Goede bc8f0a2685 hwmon/abituguru: Fix unchecked return status
Fix an unused return value warning for the abituguru driver.
Also make sure the sysfs files are created before we register with
the hwmon class, and delete the sysfs files on driver removal.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:05 +01:00
Corentin Labbe cae2caae78 hwmon: New driver for the Analog Devices ADM1029
Signed-off-by: Corentin Labbe <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:04 +01:00
David Hubbard 657c93b10f hwmon/w83627ehf: Add support for the W83627DHG chip
Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:04 +01:00
David Brownell 37f54ee546 hwmon: Use subsys_initcall
Subsystem infrastructure should normally register with "subsys_initcall",
so that it's available to drivers that may need to initialize early.

This patch updates "hwmon" to do so.  It's common for embedded systems to
have multifunction chips with hardware monitoring interfaces, and to have
those chips be used during system bringup ... before a normal "module_init"
would kick, or maybe just linked so they'd init before hwmon.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:04 +01:00
Ralf Baechle 41be722b61 hwmon/lm70: Make lm70_remove a __devexit function
This fixes a potential broken reference.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:04 +01:00
Jean Delvare ed6bafbf60 hwmon: Cleanup a bogus legacy comment
Cleanup a bogus legacy comment that has been replicated to many
hardware monitoring drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:03 +01:00
Jean Delvare 7f999aa726 hwmon: Simplify the locking model of two drivers
Many hardware monitoring drivers use two different mutexes, one to
protect their per-device data structure, and one to protect the
access to the device registers. These mutexes are essentially
redundant, as the drivers are transfering values between the device
registers and the data cache, so they almost always end up holding
both mutexes at the same time. Using a single mutex will make the
code more simple and faster.

I am changing only two of the affected drivers here, the authors
of the other affected drivers are welcome to submit similar patches
if they want.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:03 +01:00
Jean Delvare 6a0b1013c6 hwmon: Drop unused mutexes in two drivers
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:03 +01:00
Jean Delvare f8d0c19a93 hwmon/it87: Add PWM base frequency control
Let the user select the base PWM frequency when using the it87
hardware monitoring driver. Different frequencies can give better
control on some fans.

Also update the documentation to mention the PWM frequency control
files, with misc cleanups to the PWM section.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:02 +01:00
David Brownell bbeaeef73a i2c/vt8231: Remove superfluous initialization
Remove a superfluous initialization from the vt8231 hwmon driver; the
i2c core does this, and the source field will be vanishing soon.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-13 22:08:58 +01:00
Al Viro d7bde2fe04 [PATCH] hwmon: ansify
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:06 -08:00
Gong Jun c70a8c345f hwmon/w83793: Hide invalid VID readings
Ignore the VID readings when the motherboard has not designed
the function.  

Signed-off-by: Gong Jun <jgong@winbond.com>
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-18 22:14:24 +01:00
Rudolf Marek c929431528 hwmon/w83793: Fix the fan input detection
Catch the cases when alternative pins are used to route the
fan9-12 input.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Gong Jun <jgong@winbond.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-18 22:14:24 +01:00
Gong Jun 46bed4dfe5 hwmon/w83793: Ignore disabled temperature channels
Ignore the temperature readings when its channel is disabled,
ignore AMDSI readings.

Signed-off-by: Gong Jun <jgong@winbond.com>
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-18 22:14:24 +01:00
Jean Delvare 9fab2d8b75 hwmon: Fix the VRD 11 decoding
I wonder how we came up with such a broken test in the first place.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-18 22:14:23 +01:00
Gong Jun ddca933bd5 hwmon/w83793: Remove the description of AMDSI and update the voltage formula
Fix the driver to match the information in datasheet 1.0. AMD 
SI interface is marked as reserved, computing formula for 5VDD
and 5VSB is updated.

Signed-off-by: Gong Jun <jgong@winbond.com>
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-18 22:14:23 +01:00
Stelian Pop dcb69dd010 hwmon: New AMS hardware monitoring driver
This driver adds support for the Apple Motion Sensor (AMS) as found in 2005
revisions of Apple PowerBooks and iBooks.  It implements both the PMU and
I2C variants.  The I2C driver and mouse emulation is based on code by
Stelian Pop, while the PMU driver has been developped by Michael Hanselmann.
HD parking support will be added later.

Various people contributed fixes to this driver, including
Aristeu Sergio Rozanski Filho and Jean Delvare.

Signed-off-by: Stelian Pop <stelian@popies.net>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Robert Love <rml@novell.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Rudolf Marek 6800c3d027 hwmon: New Winbond W83793 hardware monitoring driver
Add support for the W83793 hardware monitoring chip. This driver
was originally contributed by Yuan Mu of Winbond Electronics Corp.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Jean Delvare 7188cc66b4 hwmon: Update Rudolf Marek's e-mail address
The Silicon Hill club is not what it used to be.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Jean Delvare 75c990291d hwmon/f71805f: Fix the device address decoding
The lowest 3 bits are ignored, and the chip decodes all 8 addresses,
not only the 2 it needs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare c7176cb515 hwmon/f71805f: Always create all fan inputs
Fans can be hotplugged, so we should create sysfs file even for fans
which are disabled at driver load time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare 51c997d80e hwmon/f71805f: Add support for the Fintek F71872F/FG chip
Add support for the Fintek F71872F/FG Super-I/O chip. It is basically the
same as the Fintek F71805F/FG as far as hardware monitoring is concerned,
with two additional internal voltages monitored (VSB and battery), and 6
VID inputs (not yet supported.)

To make things a bit more confusing, two of the voltage input pins (in4
and in8) can be used for other functions. The driver reads the pin
configuration from the Super-I/O configuration space to decide whether
it must create interface files for these inputs or not.

Many thanks to Nikolay Derkach for testing the early iterations of this
code and reporting bugs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare ba224e2c4f hwmon: New PC87427 hardware monitoring driver
This is a new hardware monitoring driver for the National Semiconductor
PC87427 Super-I/O chip. It only supports fan speed monitoring for now,
while the chip can do much more.

Thanks to Amir Habibi at Candelis for setting up a test system, and to
Michael Kress for testing several iterations of this driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare 8e9afcbbde hwmon/it87: Remove the SMBus interface support
This interface was useless as the LPC ISA-like interface is always
available, is faster, and is more reliable. This cuts the driver
size by some 20%.

This change is also required to later convert the it87 driver to a
platform driver, so that we can get rid of i2c-isa in a near future.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Stephan Berberig 0f23e50aa5 hwmon/hdaps: Update the list of supported devices
Remove the strange DMI for the R52 (1846AQG)
and add a note to update to latest BIOS in the Kconfig
and source code.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Robert Love <rlove@rlove.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Jean Delvare 509a5e85c3 hwmon/hdaps: Move the DMI detection data to .data
Move the DMI detection data from .text to .data. We really don't want
that amount of data on the stack.

Also refactor the macros used to generate the detection data, the
vendor becomes a parameter.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Robert Love <rlove@rlove.org>
2006-12-12 18:18:28 +01:00
Jim Cromie 3d7f9a8697 hwmon/pc87360: Autodetect the VRM version
pc87360 currently hardcodes vrm = 90 (2.4 vintage).  Update it to use
newer code in hwmon-vid which reads cpuid to determine the correct vid.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Jean Delvare 315c7113b5 hwmon/f71805f: Add support for "speed mode" fan speed control
In "speed mode", the user specifies a target fan speed (in RPM) and the
chip automatically adjusts the PWM duty cycle (or DC output level) to
reach this target.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare e196783d54 hwmon/f71805f: Support DC fan speed control mode
In DC mode, the pwmN_freq files are not created.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare 6e2bc17b07 hwmon/f71805f: Let the user adjust the PWM base frequency
Different frequencies can give better results depending on the exact fan
model used.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare 95e353127d hwmon/f71805f: Add manual fan speed control
pwmN files are writable only in manual fan speed control mode.
In automatic fan speed control modes, they are read-only and
report the duty cycle chosen by the chip.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:26 +01:00
Jean Delvare 6b14a546a5 hwmon/f71805f: Store the fan control registers
So far we were only extracting the fan skip bit from the
fan control registers, but we'll soon need more bits so
better store the whole register values.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:26 +01:00
Al Viro 914e26379d [PATCH] severing fs.h, radix-tree.h -> sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:24 -05:00
Al Viro f6a570333e [PATCH] severing module.h->sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:22 -05:00
Jean Delvare bd452e6f17 hwmon: Fix debug messages in w83781d
Fix debug messages in w83781d at detection time. We can't use dev_dbg()
on an i2c client's device before calling i2c_attach_client() on that
client.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:09 -07:00
Jean Delvare e693810ce8 hwmon: Let w83781d and lm78 load again
Let the w83781d and lm78 hardware monitoring drivers load even when
no chip was detected at the ISA address. There can still be supported
chips connected to an I2C bus or SMBus.

This fixes bug #7293.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:09 -07:00
Rudolf Marek 14992c7eff w83627ehf: Fix the detection of fan5
Fix the detection of fan5 and preserve the bit between the
register writes, because the bit is write only.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:08 -07:00
Rudolf Marek 4660cb354a k8temp: Documentation update
Update the documentation for the k8temp driver.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:08 -07:00
Jean Delvare 6091780eba smsc47m1: List the SMSC LPC47M112 as supported
The SMSC LPC47M112 Super-I/O chip appears to be compatible with the
LPC47M10x and LPC47M13x as far as hardware monitoring is concerned.
The device ID is even the same, so it's really only a documentation
update.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:08 -07:00
Grant Coady 2ca7b961c3 adm9240: Update Grant Coady's email address
Replace a bouncing email that I cannot recover from Mr Google.

Signed-off-by: Grant Coady <gcoady.lk@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:08 -07:00
Jim Cromie 34fc921a25 w83791d: Fix unchecked return status
Replace all unchecked calls to device_create_file with a single group
declaration, and one call to sysfs_create_group, and check that one
return status. Also remove the files on device detach.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off by: Charles Spirakis <bezaur@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-18 13:03:08 -07:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Soos Peter 710b8b5f43 [PATCH] hdaps: support Lenovo ThinkPad T60
Support hdaps on Lenovo ThinkPad T60.  It was tested with pivot utility
from http://www.kernel.org/pub/linux/kernel/people/rml/hdaps and it seems
to be OK.

Cc: Jean Delvare <khali@linux-fr.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Robert Love <rml@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Jean Delvare 3379ceeefd hwmon: Remove Yuan Mu's address
hwmon: Remove Yuan Mu's address

Yuan Mu no longer works at Winbond.

I wish to publicly thank Yuan for his help with Winbond hardware
monitoring chips support during the past 10 months.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:19 -07:00
Jean Delvare ce8c6ce1ec hwmon: Fix unchecked return status, SMSC chips
hwmon: Fix unchecked return status, SMSC chips

Fix up 2 more hwmon drivers so that they no longer ignore return
status from device_create_file().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:19 -07:00
Jean Delvare a5ebe668ad hwmon: Fix unchecked return status, batch 6
hwmon: Fix unchecked return status, batch 6

Fix up 5 more hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:19 -07:00
Rudolf Marek f52f79da29 w83792d: Fix unchecked return status
w83792d: Fix unchecked return status

Fix the w83792d driver. Add error checking to device_create_file
and also care to destroy the files upon exit.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Rudolf Marek ccc5c30695 w83l785ts: Fix unchecked return status
w83l785ts: Fix unchecked return status

Fix the w83l785ts driver. Add error checking to device_create_file
and also care to destroy the files upon exit.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Jim Cromie 311ce2efb1 w83781d: Fix unchecked return status
w83781d: Fix unchecked return status

Add 2 attr-file groups (for base and model-specific attrs respectively),
create the base group with single call to sysfs_create_group,
check the return code on individual calls to device_create_file for each
of the model-specific attr-files.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Roger Lucas cbeeb5b7c9 vt8231: Fix unchecked return status
vt8231: Fix unchecked return status

Check the return status from device_create_file() and also use
the newer and cleaner sysfs creation functions.

Signed-off-by: Roger Lucas <roger@planbit.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Jean Delvare 87808be4f9 Fix unchecked return status, batch 5
hwmon: Fix unchecked return status, batch 5

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Jean Delvare 0e39e01c90 hwmon: Fix unchecked return status, batch 4
hwmon: Fix unchecked return status, batch 4

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Note: f71805f actually checked the status from device_create_file
already. However it did not remove the files on device destruction.
It was also an opportunity to use sysfs_create/remove_group instead
of hand-made loops. This makes the changes much more important but
I think the result is worth it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:18 -07:00
Mark M. Hoffman 681c6f7a67 hwmon: Fix unchecked return status, batch 3
hwmon: Fix unchecked return status, batch 3

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Mark M. Hoffman 0501a3816e hwmon: Fix unchecked return status, batch 2
hwmon: Fix unchecked return status, batch 2

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
David Hubbard c18beb5b92 w83627ehf: Fix unchecked return status
w83627ehf: Fix unchecked return status

Fix: check return value from device_create_file()
Fix: call device_remove_file() on error and module unload
Fix: call hwmon_device_register() after device_create_file() to eliminate race

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Jim Cromie f3722d5b6a pc87360: Check for error on sysfs files creation
pc87360: Check for error on sysfs files creation

Use sysfs_create_group() for 2 sensor-types which are chip-model
invariant, i.e. all-or-nothing attribute groups.
Other 2 groups vary too much due to configuration, etc, so we keep the
loops of device_create_file(), but now check their returns.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Jim Cromie 941c5c05cf pc87360: Delete sysfs files on device deletion
pc87360: Delete sysfs files on device deletion

Add 4 explicit attribute groups for the 5 sensor types:
voltage (in), therm, temp, and fan & pwm (together in one group).
Use sysfs_remove_group() to drop them, but keeps the existing
startup code, which calls device_create_file in loops.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Jim Cromie 44646c19b4 pc87360: Move some code around
pc87360: Move some code around

Moves code for get-set-decl tuples for 3 items: cpu0_vid, vrm, alarms_in
up, to just after the get-set-decl tuple for voltages.
These items are already 'activated' together with the rest of the 
voltage attributes, so the move tightens the grouping that's made
explicit in next patch.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Mark M. Hoffman c1685f61b0 hwmon: Fix unchecked return status, batch 1
hwmon: Fix unchecked return status, batch 1

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:17 -07:00
Juerg Haefliger ab41319eab hwmon: New driver for the VIA VT1211
hwmon: New driver for the VIA VT1211

This is a new driver for the VIA VT1211 Super-IO chip. It is a rewrite
of the existing vt1211 driver (by Mark D. Studebaker and Lars Ekman)
which has been around for a while but never made it into the main
kernel tree.

It is implemented as a platform driver and therefore requires
lm_sensors 2.10.1 to function properly.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:16 -07:00
Charles Spirakis 125751cb83 w83791d: Documentation update
w83791d: Documentation update

The alarm bits and the beep enable bits are in different positions in
the hardware. Document the problem and leave it to the user-space code
to handle the situation. When this driver is updated to the standardized
sysfs alarm/beep methodology, this won't be a problem.

This is a documentation only change.

Signed-off by: Charles Spirakis <bezaur@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:16 -07:00
Jean Delvare 2d45771e6e hwmon: Add individual alarm files to 4 drivers
hwmon: Add individual alarm files to 4 drivers

Add individual sysfs files for all f71805f, lm63, lm83 and lm90 alarm
and fault conditions. This is a requirement for the planned
chip-independent libsensors. Almost all other hwmon drivers will need
the same improvement.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:15 -07:00
Jean Delvare 51bd563393 hwmon: Make a dozen drivers no more experimental
hwmon: Make a dozen drivers no more experimental

Remove the EXPERIMENTAL tag from a dozen hardware monitoring drivers.
They are in the tree for quite a long time, so we would know by now if
they were causing trouble.

Also make it clearer that the VT8231 is a VIA chip.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:15 -07:00
Hans de Goede 360b9ab220 abituguru: Add suspend/resume support
This patch contains rudimentary suspend / resume support for the uguru,
this protects the uguru and the driver against suspend / resume cycles,
so there is no reason to unload the driver in your suspend / resume
scripts.

Only include suspend / resume functions when CONFIG_PM is set.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:14 -07:00
Jean Delvare b17ebc9402 k8temp: Enable automatic loading
Let the k8temp driver load automatically.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:14 -07:00
Rudolf Marek 29fa06c129 hwmon: New driver k8temp
Add support for the temperature sensor(s) found in AMD K8 CPUs.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:14 -07:00
Jean Delvare b19367c6f4 it87: Copyright update
it87: Copyright update

I think my contributions to the it87 driver over the past two
years qualify me as a co-author of this driver.

Also drop old comments of dubious usefulness.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare c5df9b7a7c it87: Overwrite broken default limits
it87: Overwrite broken default limits

Some IT8716F chips where seen with unreasonable defaults for low
voltage and high temperature limits. Overwrite them with sane defaults
so as to not generate meaningless alarms.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare 87673dd735 it87: Add support for the IT8718F
it87: Add support for the IT8718F

The IT8718F is a Super-I/O chip with integrated hardware monitoring
functions. It is very similar to the IT8716F, so adding support to the
it87 driver was pretty straightforward. The most significant difference
is that the IT8718F has up to 8 VID pins, instead of 6 for the older
chips.

For the IT8718F, the VID value can only be read from Super-I/O space.

Userspace support is already in lm_sensors SVN (to be soon released
as 2.10.1.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare 8ab4ec3ef4 it87: Cleanup set_fan_div
it87: Cleanup set_fan_div

We only change one fan clock divider at a time, so there is only one
fan min which needs to be saved and restored.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare 3543a53f6c it87: in8 has no limit registers
it87: in8 has no limit registers

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare b9e349f710 it87: Prevent overflow on fan clock divider write
it87: Prevent overflow on fan clock divider write

The highest possible clock divider for fan1 and fan2 is 128.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare 9060f8bdd0 it87: No sysfs files for disabled fans
it87: No sysfs files for disabled fans

Only create the fan attributes for enabled fan tachometers. Some
motherboards have a nice BIOS which only enables the fan inputs which
are wired to a fan header on the board. This makes the configuration
easier for the user.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00
Jean Delvare 17d648bf57 it87: Add support for the IT8716F
it87: Add support for the IT8716F

The IT8716F is a Super-I/O chip with integrated hardware monitoring
functions. It is very similar to the IT8712F, so adding support to the
it87 driver was pretty straightforward. The most significant change here
is that the IT8716F has 16-bit fan speed counters, so the user no more
needs to tweak the fan clock dividers to get the best readings.

Userspace support is already in lm_sensors SVN (to be soon released
as 2.10.1.)

Thanks to Stian Oksavik, Olivier Nicolas, Prakash Punnoor and
Juergen Kilb for testing the early versions of this patch.

Thanks also to ITE for providing datasheets and answering my questions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:13 -07:00