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

1276 Commits

Author SHA1 Message Date
Hans de Goede d9ebaa4547 hwmon/f71882fg: Set platform drvdata to NULL later
This avoids a possible race leading to trying to dereference NULL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-13 07:42:52 -07:00
Hans de Goede 14a4019de8 hwmon/f71882fg: Fix a typo in a comment
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-13 07:40:41 -07:00
axel lin a7254d68b6 hwmon: (adt7411) add MODULE_DEVICE_TABLE
The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-26 08:59:32 -08:00
axel lin 6407deb594 hwmon: (ad7414) add MODULE_DEVICE_TABLE
The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-26 08:59:32 -08:00
Jan Beulich f065a93e16 hwmon: (lm85) extend to support EMC6D103 chips
The interface is identical EMC6D102, so all that needs to be added are
some definitions and their uses.

Registers apparently missing in EMC6D103S/EMC6D103:A2 compared to EMC6D103:A0,
EMC6D103:A1, and EMC6D102 (according to the data sheets), but used
unconditionally in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. For that
reason, EMC6D103S chips don't get enabled for the time being.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
(Guenter Roeck: Replaced EMC6D103_A2 with EMC6D103S per EMC6D103S datasheet)
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@kernel.org
2011-02-18 17:43:36 -08:00
Clemens Ladisch aa4790a628 hwmon: (k10temp) add support for AMD Family 12h/14h CPUs
Add the PCI ID to support the internal temperature sensor of the
AMD "Llano" and "Brazos" processor families.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org # ca86828: x86, AMD, PCI: Add AMD northbridge PCI device
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-18 06:14:24 -08:00
Clemens Ladisch 2c6315da6a hwmon: (jc42) do not allow writing to locked registers
On systems where the temperature sensor is actually used, the BIOS is
likely to have locked the alarm registers.  In that case, all writes
through the corresponding sysfs files would be silently ignored.

To prevent this, detect the locks and make the affected sysfs files
read-only.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-16 08:18:33 -08:00
Clemens Ladisch d5622f5b6c hwmon: (jc42) more helpful documentation
The documentation lists standard numbers and chip names in excruciating
detail, but that's all it does.  To help mere mortals in deciding
whether to enable this driver, mention what this sensor is for and in
which systems it might be found.

Also add a link to the actual JC 42.4 specification.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-16 08:18:32 -08:00
Clemens Ladisch e866729605 hwmon: (jc42) fix type mismatch
In set_temp_crit_hyst(), make the variable 'val' have the correct
type for strict_strtoul().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-02-16 08:18:31 -08:00
Guenter Roeck bcf721d14d hwmon: (emc1403) Fix I2C address range
I2C address range included 0x2a, which the chips do not support.
Replace with 0x29 which is supported but was missing.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-02-09 13:45:52 -08:00
Dirk Eibach 2778fb13ba hwmon: (lm63) Consider LM64 temperature offset
LM64 has 16 degrees Celsius temperature offset on all
remote sensor registers.
This was not considered When LM64 support was added to lm63.c.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@kernel.org
2011-02-09 13:45:42 -08:00
Kalhan Trisal a20f0bc10c hwmon: (lis3) turn down the no IRQ message
Turn down the no IRQ message - on some platforms that's a normal state of
affairs.

Signed-off-by: Kalhan Trisal <kalhan.trisal@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-25 09:10:50 -08:00
Luca Tettamanti 86ca33e825 hwmon: (asus_atk0110) Override interface detection on Sabertooth X58
ASUS Sabertooth X58 has a bug in ACPI that prevents the reading of MCH
temperature when the "old" ATK0110 interface is used. Add a DMI entry
to override the detection heuristic and force the use of the "new"
interface on this board.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Joris Creyghton <jorisctn@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-23 09:30:08 -08:00
Henrik Rydberg 9d1f8a40dd hwmon: (applesmc) Properly initialize lockdep attributes
The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.

Reported-and-tested-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-23 09:28:50 -08:00
Guenter Roeck c7bf71c517 hwmon: (lm93) Add support for LM94
This patch adds basic support for LM94 to the LM93 driver. LM94 specific
sensors and features are not supported.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-01-18 12:22:54 -08:00
Juerg Haefliger 06f3d9fb4a hwmon: (dme1737) Minor cleanups
Minor cleanups. Mostly removing assignments in if statements to get
rid of checkpatch errors.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:13 +01:00
Juerg Haefliger d4b94e1fa6 hwmon: (dme1737) Add support for in7 for SCH5127
Add support for the 1.5V voltage monitoring input (in7) of the
SMSC SCH5127 chip.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:13 +01:00
Jekyll Lai 7a1b76f2a4 hwmon: (emc1403) Add EMC1423 support
EMC1423 uses the similar register and adds a hardware shutdown pin to
protect exceed temperature. This function is set by resistor; it's not
necessary to do anything in the driver except add the emc1423 pid of 0x23.

Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com>
[Updated Kconfig/comments and minor further changes asked for by the hwmon
 maintainers]
Signed-off-by: Alan Cox <alan@linux.intel.com>
[Fixed checkpatch warning]
Signed-of--by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:12 +01:00
Jean Delvare 36c7fe133e hwmon: (w83793) Drop useless mutex
This is the same case as fschmd, from which the code was copied as far
as I can see. So the same clean-up applies:

The WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a
static variable. There is no good reason to keep this variable static,
so let's just make it non-static and drop the now useless mutex
altogether.

See the discussion at:
http://marc.info/?l=lm-sensors&m=125563869402323&w=2

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-01-12 21:55:11 +01:00
Jean Delvare 1b7243e8f5 hwmon: (fschmd) Drop useless mutex
As discussed one year ago, the WDIOC_GETSUPPORT ioctl only needs a
mutex because it operates on a static variable. There is no good
reason to keep this variable static, so let's just make it non-static
and drop the now useless mutex altogether.

See the discussion at:
http://marc.info/?l=lm-sensors&m=125563869402323&w=2

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-01-12 21:55:11 +01:00
Joe Perches 1ca28218eb hwmon: (w83781d) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

[JD: Optimize repeated debug messages]

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:11 +01:00
Joe Perches 5e24e0c365 hwmon: (pc87427) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:11 +01:00
Joe Perches 9e991c6fad hwmon: (pc87360) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

[JD: Also convert debug messages]

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:11 +01:00
Joe Perches ce47da742d hwmon: (lm78) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:10 +01:00
Joe Perches a8ca103793 hwmon: (it87) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:10 +01:00
Jean Delvare a516dc3e9b hwmon: (w83793) Implement the standard intrusion detection interface
We have a standard intrusion detection interface now, drivers should
implement it. I've left the old interface in place for the time being,
with a deprecation warning, it will be removed later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12 21:55:10 +01:00
Jean Delvare c32301b595 hwmon: (w83792d) Implement the standard intrusion detection interface
We have a standard intrusion detection interface now, drivers should
implement it. I've left the old interface in place for the time being,
with a deprecation warning, it will be removed later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12 21:55:09 +01:00
Jean Delvare 0de2b24480 hwmon: (adm9240) Implement the standard intrusion detection interface
We have a standard intrusion detection interface now, drivers should
implement it. I've left the old interface in place for the time being,
with a deprecation warning, it will be removed later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12 21:55:09 +01:00
Jean Delvare f790674d3f hwmon: (via686a) Initialize fan_div values
Functions set_fan_min() and set_fan_div() assume that the fan_div
values have already been read from the register. The driver currently
doesn't initialize them at load time, they are only set when function
via686a_update_device() is called. This means that set_fan_min() and
set_fan_div() misbehave if, for example, "sensors -s" is called
before any monitoring application (e.g. "sensors") is has been run.

Fix the problem by always initializing the fan_div values at device
bind time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12 21:55:09 +01:00
Jean Delvare 014bcd28a0 hwmon: (w83795) Silent false warning from gcc
The code triggers a false warning with older versions of gcc:
w83795.c: In function 'w83795_update_device':
w83795.c:475: warning: 'lsb' may be used uninitialized in this function

I admit that the code is a little tricky, but I see no way to write it
differently without hurting performance. So let's just silent the
warning with a needless initialization.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12 21:55:09 +01:00
Steven Hardy 5d84291da3 hwmon: (ads7828) Update email contact details
Trivial patch updating my email contact details due to change of
employer, and because I no longer have access to the previously used
domain.

Unfortunately I also no longer have access to any ads7828 hardware, but
am happy to support/maintain the driver if others are able to test
changes.

Signed-off-by: Steve Hardy <shardy@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-12 21:55:08 +01:00
Roland Stigge 6099469805 hwmon: Support for Dallas Semiconductor DS620
Driver for Dallas Semiconductor DS620 temperature sensor and thermostat

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-09 09:10:10 -08:00
Urs Fleisch 430400b863 hwmon: driver for Sensirion SHT21 humidity and temperature sensor
Signed-off-by: Urs Fleisch <urs.fleisch@sensirion.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:56:28 -08:00
Jan Beulich ae9e0ce73e hwmon: (via-cputemp) sync hotplug handling with coretemp/pkgtemp
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:48 -08:00
Davide Rizzo 0f1deb4b82 hwmon: (lm95241) Rewrite to avoid using macros
Signed-off-by: Davide Rizzo <elpa.rizzo@gmail.com>
[guenter.roeck@ericsson.com: Formatting changes]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:47 -08:00
Guenter Roeck 2bfe814826 hwmon: (applesmc) Fix checkpatch errors and fix value range checks
This patch fixes all checkpatch errors and most of the checkpatch warnings.
It also fixes the range check in applesmc_store_fan_speed().

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
2011-01-08 10:55:46 -08:00
Henrik Rydberg 41e71f9717 hwmon: (applesmc) Update copyright information
With the preceding patches, git blame assigns about half of
the file to the present author. Add a line to the copyright
to reflect this.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:45 -08:00
Henrik Rydberg 0b8ad5a57b hwmon: (applesmc) Silence driver
Make the driver report a single line on success.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:44 -08:00
Henrik Rydberg 0b0b5dff89 hwmon: (applesmc) Simplify feature sysfs handling
Given the dynamic node construction method, the setup of the
accelerometer, light sensor and keyboard backlight sysfs nodes
can be simplified. This patch does not contain any logic changes.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:43 -08:00
Henrik Rydberg 3eba2bf7c5 hwmon: (applesmc) Dynamic creation of fan files
With the dynamic temperature group in place, the setup of fans
can be simplified. This patch sets up the fans dynamically, removing
a hundred lines of code.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:42 -08:00
Henrik Rydberg 40ef06f112 hwmon: (applesmc) Extract all features generically
With temperature keys being determined automatically, the dmi match
data is only used to assign features that can easily be detected from
the smc. This patch removes the dmi match data altogether, and reduces
the match table to the main machine models.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:41 -08:00
Henrik Rydberg dcdea2614a hwmon: (applesmc) Handle new temperature format
The recent Macbooks have temperature registers of a new type.
This patch adds the logic to handle them.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:40 -08:00
Henrik Rydberg 9792dadfce hwmon: (applesmc) Dynamic creation of temperature files
The current driver creates temperature files based on a list
of temperature keys given per device. Apart from slow adaption
to new machine models, the number of sensors also depends on
the number of processors. This patch looks up the temperature
keys dynamically, thereby supporting all models.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:39 -08:00
Henrik Rydberg 5874583d56 hwmon: (applesmc) Introduce a register lookup table
One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.

This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
[guenter.roeck@ericsson.com: Added value range check to key_at_index_store()]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:38 -08:00
Joe Perches 1ee7c71bd1 hwmon: (applesmc) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:37 -08:00
Henrik Rydberg 2344cd0c2e hwmon: (applesmc) Relax the severity of device init failure
The device init is used to reset the accelerometer. Failure to reset
is not severe enough to stop loading the module or to resume from
hibernation.  This patch relaxes failure to a warning and drops
output in case of success.

Cc: stable@kernel.org
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:35 -08:00
Edgar Hucek 132af03233 hwmon: (applesmc) Add MacBookAir3,1(3,2) support
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the
applesmc driver.

[rydberg@euromail.se: minor cleanup]
Cc: stable@kernel.org
Signed-off-by: Edgar Hucek <gimli@dark-green.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:34 -08:00
Joe Perches 18de030f1d hwmon: (w83627hf) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:33 -08:00
Joe Perches abdc6fd189 hwmon: (w83627ehf) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:32 -08:00
Joe Perches 9d72be0da1 hwmon: (vt8231) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08 10:55:31 -08:00