Commit Graph

222 Commits

Author SHA1 Message Date
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