dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

861 Commits

Author SHA1 Message Date
Jean Delvare 84d2a314bb hwmon: (adt7475) Fix sysfs file names
The adt7475 driver creates pwm#_auto_channel_temp attributes instead
of the standard pwm#_auto_channels_temp. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16 12:45:40 +01:00
Jean Delvare 56e35eeebe hwmon: (adt7475) Cache limits for 60 seconds
The comment says that limits are cached for 60 seconds but the code
actually caches them for only 2 seconds. Align the code on the
comment, as 60 seconds makes more sense.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16 12:45:40 +01:00
Jean Delvare cf312e0776 hwmon: (adt7475) Fix temperature fault flags
The logic of temperature fault flags is wrong, it shows faults when
there are none and vice versa. Fix it.

I can't believe this has been broken since the driver was added, 8
months ago, basically breaking temp1 and temp3, and nobody ever
complained.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
2009-11-16 12:45:39 +01:00
Ben Dooks be4c23c93c hwmon: (s3c-hwmon) Ignore invalid divider settings
Avoid registering channels that have zero divider settings in them, as this
will only lead to kernel OOPS from divide-by-zero when the sysfs entry is
read.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-11-16 12:45:39 +01:00
Linus Torvalds e281e315f4 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (it87) Fix VID reading on IT8718F/IT8720F
  hwmon: (dme1737) No vid attributes for SCH311x
  hwmon: (fschmd) Fix check on unsigned in watchdog_write()
  hwmon: (coretemp) Maintainer update
2009-10-29 08:14:58 -07:00
Ian E. Morgan 2545f038f4 lis3: add support for the HP HDX 18
I have an HP HDX 18 laptop, and noted that the configuration of the
accelerometer needs to be x_inverted.

Signed-off-by: Ian E. Morgan <penguin.wrangler@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Éric Piel af19611c4d lis3: add support for the HP EliteBook 8530w
Correct orientation for  HP EliteBook 8530w.

Reported-by: Jörgen Jonssson <jorgen.jonsson@saitek.se>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Pavel Herrmann a03018ff71 lis3: better support for hp 6730x
I have learned that the 6730b and 6730s have different accelerometer
orientation, and have modified the driver accordingly (diff attached),
while dropping the wild guess for AMD based 6735 having the same
orientation as Intel based 6730 (this is not true for any other related
series/family, thus is not probable for 673x).

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-29 07:39:32 -07:00
Jean Delvare 371dc4a6d8 hwmon: (it87) Fix VID reading on IT8718F/IT8720F
Comparing apples to bananas doesn't seem right. Consistently use the
chips enum for chip type comparisons, to avoid such bugs in the
future.

The bug has been there since support for the IT8718F was added, so
VID never worked for this chip nor for the similar IT8720F.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-24 13:28:47 +02:00
Jean Delvare 9d0914468f hwmon: (dme1737) No vid attributes for SCH311x
The SCH311x chips do not have VID inputs, so the cpu0_vid and vrm
attributes shouldn't be created for them.

This fixes lm-sensors ticket #2353:
http://www.lm-sensors.org/ticket/2353

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Udo van den Heuvel <udovdh@xs4all.nl>
Cc: Juerg Haefliger <juergh@gmail.com>
2009-10-24 13:28:46 +02:00
Roel Kluin c7702c3134 hwmon: (fschmd) Fix check on unsigned in watchdog_write()
If unsigned the watchdog_trigger() return value will not be
checked correctly.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-24 13:28:45 +02:00
Linus Torvalds 4c274fff4f Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (s3c-hwmon) Disable build for S3C64xx
  MAINTAINERS: Fix Riku Voipio's address
  hwmon: (asus_atk0110) Enable the EC
  hwmon: (asus_atk0110) Refactor the code
  hwmon: (sht15) Fix spurious section mismatch warning
2009-10-11 11:23:33 -07:00
Alexey Dobriyan d43c36dc6b headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-11 11:20:58 -07:00
Mark Brown 384e724b6b hwmon: (s3c-hwmon) Disable build for S3C64xx
The s3c-hwmon driver depends on the arch/arm implementation of the core
ADC support for the chip.  Since the S3C64xx version has not yet been
merged disable building of the driver on S3C64xx for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09 20:35:21 +02:00
Luca Tettamanti 9e6eba610c hwmon: (asus_atk0110) Enable the EC
On newer ASUS boards (e.g. P7P55D) the EC (that - among other things - is
responsible for updating the readings from the hwmon sensors) is disabled
by default since ASUS detected conflict with some tools under Windows.
The following patch checks the state of the EC and enable it if needed;
under Linux, native drivers are locked out from ACPI owned resources so
there's no risk of conflict.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Robert Hancock <hancockrwd@gmail.com>
Tested-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09 20:35:18 +02:00
Luca Tettamanti 18e2555585 hwmon: (asus_atk0110) Refactor the code
Refactor the code of the new style interface around GGRP (enumeration) and
GITM (read) helpers to mimic ASL code. Also switch the read path to use
dynamic buffers (handled by ACPI core) since ASUS expanded the return buffer
(ASBF) in newer boards (e.g. P7P55D).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Robert Hancock <hancockrwd@gmail.com>
Tested-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09 20:35:18 +02:00
Rakib Mullick cb0f1a1e77 hwmon: (sht15) Fix spurious section mismatch warning
Fix spurious section mismatch warnings, caused due to reference from
variable sht_drivers to
 __devinit/__devexit functions sht15_probe()/remove().

 We were warned by the following warnings:

  LD      drivers/hwmon/built-in.o
WARNING: drivers/hwmon/built-in.o(.data+0x264a0): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264a4): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264f0): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x264f4): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26540): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26544): Section mismatch in
reference from the variable sht_drivers to the function
.devexit.text:sht15_remove()
The variable sht_drivers references
the function __devexit sht15_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/hwmon/built-in.o(.data+0x26590): Section mismatch in
reference from the variable sht_drivers to the function
.devinit.text:sht15_probe()
The variable sht_drivers references
the function __devinit sht15_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-09 20:35:17 +02:00
Samu Onkalo d82e23dcae lis3lv02d_spi: module unload didn't remove sysfs entry
In module unload, lis3lv02d core driver sysfs clean up was not called.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Cc: "Trisal, Kalhan" <kalhan.trisal@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-08 07:36:40 -07:00
Jean Delvare 2d2a7cff1b ltc4215/ltc4245: Discard obsolete detect methods
There is no point in implementing a detect callback for the LTC4215
and LTC4245, as these devices can't be detected. It was there solely
to handle "force" module parameters to instantiate devices, but now
we have a better sysfs interface that can do the same.

So we can get rid of the ugly module parameters and the detect
callbacks. This shrinks the binary module sizes by 36% and 46%,
respectively.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
2009-10-04 22:53:42 +02:00
Alexey Dobriyan 828c09509b const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:11 -07:00
Linus Torvalds 3e56d49390 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (ltc4245) Clear faults at startup
  hwmon: (ltc4215) Clear faults at startup
  hwmon: (coretemp) Add Lynnfield CPU
  hwmon: (coretemp) Add support for Penryn mobile CPUs
  hwmon: (coretemp) Fix Atom CPUs support
  hwmon: Delete deprecated FSC drivers
  hwmon: (adm1031) Add sysfs files for temperature offsets
2009-09-23 15:20:16 -07:00
Ira W. Snyder 58f055e531 hwmon: (ltc4245) Clear faults at startup
When power is applied to the ltc4245 chip it sometimes reports spurious
faults, which are exposed as alarms in the hwmon output. Clear the fault
register when the driver is installed to clear the alarms.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:44 +02:00
Ira W. Snyder b6b9d69602 hwmon: (ltc4215) Clear faults at startup
When power is applied to the ltc4215 chip it sometimes reports spurious
faults. The faults are not yet exposed via sysfs, however it may be useful
for userspace to read the fault register directly with the i2cget command.
Clear the fault register when the driver is installed so userspace doesn't
have to worry about spurious fault indications.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:43 +02:00
Huaxu Wan fa08acd7d1 hwmon: (coretemp) Add Lynnfield CPU
Add Lynnfield processor support. Lynnfield is a quad-core Nehalem
based microprocessor for Desktop market, which is introduced in
September 2009.

Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
Signed-off-by: Kent Liu <kent.liu@linux.intel.com>
Acked-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:43 +02:00
Rudolf Marek eccfed4221 hwmon: (coretemp) Add support for Penryn mobile CPUs
Following patch adds support for mobile Penryn CPUs. Intel documents this
poorly. I asked the Coretemp author for some help. This is totally untested and
may not work. Please test!

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Cc: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: Kent Liu <kent.liu@linux.intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:42 +02:00
Rudolf Marek 708a62bcd5 hwmon: (coretemp) Fix Atom CPUs support
Fix Atom CPUs support. Intel documents TjMax at 90 degrees C but
some Atoms may have 125 degrees C (this is undocumented speculation).

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Cc: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: Kent Liu <kent.liu@linux.intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:42 +02:00
Jean Delvare 91f17e02a2 hwmon: Delete deprecated FSC drivers
The legacy fscpos and fscher drivers have been replaced by the unified
fschmd driver. The transition period is over now, we can delete them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2009-09-23 22:59:42 +02:00
Ira Snyder 49dc9efed0 hwmon: (adm1031) Add sysfs files for temperature offsets
The ADM1030/ADM1031 chips have temperature offset registers, for both the
local and remote temperature sensors. Following the example set forth in
the LM90/ADM1032 driver, expose the offset registers to userspace.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-23 22:59:41 +02:00
Anton Vorontsov e0626e3844 spi: prefix modalias with "spi:"
This makes it consistent with other buses (platform, i2c, vio, ...).  I'm
not sure why we use the prefixes, but there must be a reason.

This was easy enough to do it, and I did it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Samuel Ortiz <sameo@openedhand.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:43 -07:00
Anton Vorontsov 8cec03eee4 hwmon: lm70: convert to device table matching
Make the code a little bit nicer, and shorter.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kaiwan N Billimoria <kaiwan@designergraphix.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:43 -07:00
Anton Vorontsov d2a5c10f80 hwmon: adxx: convert to device table matching
Make the code a little bit nicer, and shorter.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Marc Pignat <marc.pignat@hevs.ch>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:43 -07:00
Roel Kluin 912e837aef dme1737: Keep index within pwm_config[]
The static code scanner "Parfait" reported this because pwm_config is
only 3 bytes - pwm_config[3] is out of range.

Since this code path is never called with ix == 3 (the device has no PWM4
output) this doesn't change anything in practice.  But to encourage
testing with Parfait, lets make the warning go away...

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:28 -07:00
Henrik Rydberg a976f150a6 hwmon: applesmc: restore accelerometer and keyboard backlight on resume
On resume from suspend, the driver currently resets the logical state as
if it was brought up from halt.  This patch uses the
dev_pm_ops.resume/restore methods to synchronize the hardware with the
memorized logical state, in effect bringing back the accelerometer and
backlight to the state prior to suspend.  Works for both suspend to ram
and hibernation.  The patch has zero effect on the running state.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Roel Kluin 560a64a2b5 hwmon: fix freeing of gpio_data and irq
If already requested, gpio_data and irq should be freed in the case of an
error.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Michael Abbott 905ffdc35e drivers/hwmon/adm1021.c: add low_power support for adm1021 driver
Occasionally it is helpful to be able to turn a temperature sensor off
(for example if it's making unwanted electrical noise).  This patch
adds a sysfs node to put any adm1021 compatible device into low power mode.

Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Michael Abbott f266889517 drivers/hwmon/adm1021.c: support high precision ADM1023 remote sensor
The ADM1023 temperature sensor supports higher resolution for its external
sensor (sensitivity of 1/8 deg C).  This patch makes this higher
resolution available through the appropriate temperature sysfs nodes.

Curiously, this functionality was available in the 2.4 kernel driver (but
formatted in a less helpful manner).

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Daniel Mack dc791f8aee lis3_spi: code cleanups
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Daniel Mack 2cd9645e2f lis3: add power management functions
This enabled power management functions for the SPI transport layer of the
lis3 devices.  The device's suspend mode is only entered in case no wakeup
threshold has been given.  In this case, the device is supposed to wake up
the system and must thus not be put to deep sleep.

[randy.dunlap@oracle.com: fix lis3-spi for CONFIG_PM=n]
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:49 -07:00
Daniel Mack 8873c33483 lis3: add free-fall/wakeup function via platform_data
This offers a way for platforms to define flags and thresholds for the
free-fall/wakeup functions of the lis302d chips.

More registers needed to be seperated as they are specific to the

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:48 -07:00
Michael Riepe 0bf41d9f41 drivers/hwmon/coretemp.c: enable the Intel Atom
Enable the coretemp driver on an Intel Atom.

I'm not sure if the readings are correct, however - on my 330, the driver
reports values between 27 and 41 °C (with core1 being about 8°C hotter
than core0, given the same load).  Maybe the maximum temperature of 100 °C
is wrong for Atom CPUs.

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:48 -07:00
Linus Torvalds 6f130478e2 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (55 commits)
  regulator: Voltage count for AB3100
  mfd: Convert WM8350 to use request_threaded_irq()
  mfd: Update MAINTAINERS patterns for WM831x
  mfd: Fix twl4030-power warnings
  regulator: AB3100 support
  rtc: AB3100 RTC support
  mfd: Fix ab3100-otp build failure
  mfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board
  mfd: Print warning for twl4030 out-of-order script loading
  mfd: Add support for TWL4030/5030 dynamic power switching
  mfd: AB3100 OTP readout
  regulator: Add Freescale MC13783 driver
  mfd: Add Freescale MC13783 driver
  mfd: AB3100 disable irq nosync
  mfd: AB3100 alter default setting
  mfd: AB3100 propagate error
  mfd: AB3100 accessor function cleanups
  rtc: Add support for RTCs on Wolfson WM831x devices
  regulator: get pcap data from the parent device
  input: PCAP2 misc input driver
  ...
2009-09-18 09:22:36 -07:00
Mark Brown 08bad5a821 hwmon: WM831x PMIC hardware monitoring driver
This driver adds support for the hardware monitoring features of
the WM831x PMICs to the hwmon API. Monitoring is provided for
the system voltages supported natively by the WM831x, the chip
temperature, the battery temperature and the auxiliary inputs
of the WM831x.

Currently no alarms are supported, though digital comparators on
the WM831x devices would allow these to be provided.

Since the auxiliary and battery temperature input scaling depends
on the system configuration the value is reported as a voltage to
userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17 09:47:02 +02:00
Mark Brown fb6c023a2b hwmon: Add WM835x PMIC hardware monitoring driver
This driver provides reporting of the status supply voltage rails
of the WM835x series of PMICs via the hwmon API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17 09:46:51 +02:00
Jean Delvare 5cfaf33813 hwmon: (lm85) Don't bind to Winbond/Nuvoton WPCD377I
The Winbond/Nuvoton WPCD377I is the reduced version of a Super-I/O
which emulates the National Semiconductor LM96000 hardware monitoring
chips, but without the hardware monitoring part. Instead of plain
disabling the emulation, the vendor left the emulated chip visible,
but all monitored values are always zero. This is rather confusing for
the users. So detect this case and refuse to bind to such fake chips.

This fixes lm-sensors ticket #2182:
http://www.lm-sensors.org/ticket/2182

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15 17:18:14 +02:00
Jean Delvare 61cba5c244 hwmon: Clearly mark ACPI drivers as such
Now that we have ACPI-based hardware monitoring drivers, and we will
start telling users to use them instead of native drivers when I/O
resources conflict, I think it would be good to clearly mark ACPI
drivers as such in Kconfig.

Also, in the case of monolithic kernels, I think the ACPI drivers
should take precedence over native drivers, so they should be listed
first in Makefile.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Luca Tettamanti <kronos.it@gmail.com>
2009-09-15 17:18:13 +02:00
Julia Lawall 86855b0c1f hwmon: Use resource_size
Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15 17:18:13 +02:00
H Hartley Sweeten 6055fae8ac hwmon: Include <linux/io.h> instead of <asm/io.h>
Drivers should be including <linux/io.h> instead of <asm/io.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Cc: Juerg Haefliger <juergh@gmail.com>
Cc: Frank Seidel <frank@f-seidel.de>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15 17:18:13 +02:00
Andre Prendel 9410700b88 hwmon: Add driver for Texas Instruments TMP421/422/423 sensor chips
Add support for Texas Instruments TMP421/422/423 temperature sensor IC.

TI's TMP421/422/423 are I2C temperature sensor chips. These chips are
similar to TI's TMP401/411 chips, but with reduced functionality (only
temperature measurement). The chips have one local sensor and up to
three (TMP423) remote sensors.

Signed-off-by: Andre Prendel <andre.prendel@gmx.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15 17:18:11 +02:00
Jean Delvare 5bed13f580 hwmon-vid: Ignore 6th VID pin of AMD family 0Fh processors
We had a report about a mainboard for AMD family 0Fh processors not
routing the 6th VID pin from the CPU to the hardware monitoring chip.

While the vendor should have wired the pin (or, failing that, should
have hardwired it to level high rather than low), the fact is that
none of these processors are currently known to operate at the lower
voltage levels which require the 6th VID pin. So, as a practical
workaround, I propose to ignore the 6th VID pin for these CPUs.

If this decision ever causes problems, we'll reconsider.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Frank Myhr <fmyhr@fhmtech.com>
Tested-by: Hleb Valoshka <375gnu@gmail.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
2009-09-15 17:18:11 +02:00
Alistair John Strachan bbe5939ab1 hwmon: (abituguru3) Support multiple DMI strings per chip ID
Most known Abit motherboards have unique uguru chip IDs. However,
some "refresh" boards keep the same chip ID but have a different
DMI string. As our DMI board string matching is (necessarily)
strict, some boards were failing DMI detection, and as the old
probe method was also failing, the driver would not load.

The only known boards affected by this problem are the IP35 Pro XE
(vs IP35 Pro) and the AB9 Pro (vs AB9). Is it not sufficient to
relax the match criteria, as some boards (e.g. the AB9 Quad GT)
have different uguru chip IDs.

This patch replaces the dmi_name string with a NULL terminated
array of strings to be matched per uguru chip ID. It has been
compile and runtime tested (thanks Rune).

References: https://bugs.launchpad.net/bugs/298798

Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Rune Svendsen <runesvend@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-09-15 17:18:10 +02:00