Archived
14
0
Fork 0
Commit graph

1475 commits

Author SHA1 Message Date
Vivien Didelot
e9b6e9f3d4 hwmon: (sht15) Correct a comment mistake
sht15_store_heater() is called on _write_ access to heater_enable.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-25 21:46:10 +02:00
Jean Delvare
d737c09cfb hwmon: (max1111) Avoid extra memory allocations
We can allocate the tx and rx buffers as part of our data structure.
Doing so is faster and spares memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Stanislav Brabec <utx@penguin.cz>
2011-07-25 21:46:10 +02:00
Jean Delvare
3d30f9e69f hwmon: (it87) Add chassis intrusion detection support
Add chassis intrusion detection support for all supported devices,
using the standard interface.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-25 21:46:10 +02:00
Jean Delvare
764e043bb4 hwmon: (via-cputemp) Add VID reporting support
At least VIA family 6 model D CPU report the VID settings in a MSR,
so expose the value to user-space. Not sure about model A.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
2011-07-25 21:46:10 +02:00
Jean Delvare
0a88f4b557 hwmon-vid: Add support for VIA family 6 model D CPU
The VIA family 6 model D CPU (C7-D, Eden 90 nm) can use two different
VID tables, we have to check the value of a MSR to decide which one to
use.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
2011-07-25 21:46:10 +02:00
Hans de Goede
0772a64079 hwmon: New driver sch5636
This patch adds a new driver for SMSC SCH5636 Super I/O chips.
The chips include an embedded microcontroller for hardware monitoring
solutions, allowing motherboard manufacturers to create their own
custom hwmon solution based upon the SCH5636.

Currently the sch5636 driver only supports the Fujitsu Theseus SCH5636
based hwmon solution. The sch5636 driver runs a sanity check on
loading to ensure it is dealing with a Fujitsu Theseus and not with
another custom SCH5636 based hwmon solution.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-25 21:46:09 +02:00
Hans de Goede
28ff2f7a74 hwmon: (sch5627) Factor out some code shared with sch5636 driver
This patch adds a new sch56xx-common.ko which contains code which will also
be used in the new sch5636 driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-25 21:46:09 +02:00
Phil Carmody
497888cf69 treewide: fix potentially dangerous trailing ';' in #defined values/expressions
All these are instances of
  #define NAME value;
or
  #define NAME(params_opt) value;

These of course fail to build when used in contexts like
  if(foo $OP NAME)
  while(bar $OP NAME)
and may silently generate the wrong code in contexts such as
  foo = NAME + 1;    /* foo = value; + 1; */
  bar = NAME - 1;    /* bar = value; - 1; */
  baz = NAME & quux; /* baz = value; & quux; */

Reported on comp.lang.c,
Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
Initial analysis of the dangers provided by Keith Thompson in that thread.

There are many more instances of more complicated macros having unnecessary
trailing semicolons, but this pile seems to be all of the cases of simple
values suffering from the problem. (Thus things that are likely to be found
in one of the contexts above, more complicated ones aren't.)

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-21 14:10:00 +02:00
Pavel Herrmann
d3f684f282 hwmon: (max1111) Fix race condition causing NULL pointer exception
spi_sync call uses its spi_message parameter to keep completion information,
using a drvdata structure is not thread-safe. Use a mutex to prevent
multiple access to shared driver data.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Cyril Hrubis <metan@ucw.cz>
Tested-by: Stanislav Brabec <utx@penguin.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
2011-07-17 18:39:19 +02:00
Jean Delvare
fa8b69758e hwmon: (it87) Fix label group removal
A copy-and-paste error caused it87_attributes_vid to be referenced
where it87_attributes_label should be. Thankfully the group is only
used for attribute removal, not attribute creation, so the effects of
this bug are limited, but let's fix it still.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-07-17 18:39:19 +02:00
Luca Tettamanti
0b8e77f12c hwmon: (asus_atk0110) Fix memory leak
The object returned by atk_gitm is dynamically allocated and must be
freed.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
2011-07-17 18:39:18 +02:00
Guenter Roeck
7e97bbba62 hwmon: (adm1275) Fix coefficients per datasheet revision B
Coefficients to convert chip register values to voltage/current have been
slightly changed in revision B of the chip datasheet. Update driver coefficients
to match the coefficients in the datasheet.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-07-15 08:09:40 -07:00
Guenter Roeck
f450c1504d hwmon: (pmbus) Use long variables for register to data conversions
Using integer variable types for register to data conversions can cause
overflows especially for power calculations, which are in microwatt.
Use long variables instead.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.39+
2011-07-12 06:45:45 -07:00
Guenter Roeck
22e6b2312d hwmon: (pmbus) Improve auto-detection of temperature status register
It is possible that a PMBus device supports the READ_TEMPERATURE2 and/or
READ_TEMPERATURE3 registers but does not support READ_TEMPERATURE1.
Improve temperature status register detection to address this condition.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.39+
2011-07-10 08:54:29 -07:00
Guenter Roeck
0c2a40e2fe hwmon: (lm95241) Fix negative temperature results
Negative temperatures were returned in degrees C instead of milli-Degrees C.
Also, negative temperatures were reported for remote temperature sensors even
if the chip was configured for positive-only results.

Fix by detecting temperature modes, and by treating negative temperatures
similar to positive temperatures, with appropriate sign extension.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.30+
2011-07-10 08:54:15 -07:00
Guenter Roeck
27739e694a hwmon: (lm95241) Fix chip detection code
The LM95241 driver accepts every chip ID equal to or larger than 0xA4 as its
own, and other chips such as LM95245 use chip IDs in the accepted ID range.
This results in false chip detection.

Fix problem by accepting only the known LM95241 chip ID.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.30+
2011-07-08 17:52:59 -07:00
Linus Torvalds
b775c38925 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: (k10temp) Update documentation for Fam12h
  hwmon-vid: Fix typo in VIA CPU name
  hwmon: (f71882fg) Add support for the F71869A
  hwmon: Use <> rather than () around my e-mail address
  hwmon: (emc6w201) Properly handle all errors
2011-07-03 11:12:06 -07:00
Jean Delvare
014ab488e2 hwmon-vid: Fix typo in VIA CPU name
It's Nehemiah, not Nemiah.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-07-03 13:32:54 +02:00
Hans de Goede
5da556e33f hwmon: (f71882fg) Add support for the F71869A
The F71869A is almost the same as the F71869F/E, except that it has
the normal number of temp and pwm zones for a F71882FG derived chip,
rather then the limited number of the F71869F/E.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Max Baldwin <archerseven@gmail.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-03 13:32:53 +02:00
Hans de Goede
7958e3b45d hwmon: Use <> rather than () around my e-mail address
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-03 13:32:53 +02:00
Jean Delvare
b6b2a1e806 hwmon: (emc6w201) Properly handle all errors
Handle errors on 8-bit register reads and writes too. Also use likely
and unlikely to make the functions faster on success.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-07-03 13:32:53 +02:00
Guenter Roeck
0e502ec889 hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributes
Additional temperature attribute support is easy to detect, so do it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Cc: stable.kernel.org # 2.6.39
2011-07-01 15:56:07 -07:00
Guenter Roeck
81ae68142a hwmon: (pmbus) Improve fan detection
Some PMBus devices return no error when reading fan speed registers, but don't
really support fans. Strengthen fan detection by also checking if fan
configuration registers exist.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Cc: stable.kernel.org # 2.6.39
2011-07-01 15:56:06 -07:00
Guenter Roeck
3b33ca4122 hwmon: (adm1275) Free allocated memory if probe function fails
Probe function did not free allocated memory if it failed. Fix it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
2011-07-01 15:56:06 -07:00
Guenter Roeck
7f2c0662e5 hwmon: (pmbus) Drop check for PMBus revision register in probe function
Some PMBus devices do not support the PMBus revision register, so don't check
if it exists.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Cc: stable.kernel.org # 2.6.39
2011-07-01 15:56:05 -07:00
Guenter Roeck
b1e698db09 hwmon: (s3c) Initialize sysfs attributes
Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
2011-06-17 23:22:27 -07:00
Guenter Roeck
fb794e0f71 hwmon: (ibmpex) Initialize sysfs attributes
Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
2011-06-17 23:22:27 -07:00
Guenter Roeck
3cdb2052a6 hwmon: (ibmaem) Initialize sysfs attributes
Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
2011-06-17 23:22:26 -07:00
Guenter Roeck
9a2d55be11 hwmon: (asus_atk0110) Consolidate sysfs attribute initialization
Call sysfs_attr_init() from atk_init_attribute() to handle sysfs attribute
initialization in a single function.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-06-17 23:22:26 -07:00
Jean Delvare
808b4e639e hwmon: (coretemp) Drop unused struct members
pdev_entry.cpu and pdev_entry.cpu_core_id aren't used anywhere in the
driver code so we can drop these struct members.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-06-17 23:22:26 -07:00
Per Dalén
942c1a927b hwmon: (max6642): Better chip detection schema
Improve detection of MAX6642 by reading non existing registers (0x04, 0x06
and 0xff). Reading those registers returns the previously read value.

Signed-off-by: Per Dalen <per.dalen@appeartv.com>
[guenter.roeck@ericsson.com: added second set of register reads]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-06-04 10:34:28 -07:00
Guenter Roeck
bb9973e4e7 hwmon: (coretemp) Further relax temperature range checks
Further relax temperature range checks after reading the IA32_TEMPERATURE_TARGET
register. If the register returns a value other than 0 in bits 16..32, assume
that the returned value is correct.

This change applies to both packet and core temperature limits.

Cc: Carsten Emde <C.Emde@osadl.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
2011-06-01 20:10:40 -07:00
Guenter Roeck
4f5f71a7ab hwmon: (coretemp) Fix TjMax detection for older CPUs
Commit a321cedb12 excludes CPU models 0xe, 0xf,
0x16, and 0x1a from TjMax temperature adjustment, even though several of those
CPUs are known to have TiMax other than 100 degrees C, and even though the code
in adjust_tjmax() explicitly handles those CPUs and points to a Web document
listing several of the affected CPU IDs.

Reinstate original TjMax adjustment if TjMax can not be determined using the
IA32_TEMPERATURE_TARGET register.

https://bugzilla.kernel.org/show_bug.cgi?id=32582

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Tested-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
Cc: <stable@kernel.org> # .35.x .36.x .37.x .38.x .39.x
2011-06-01 20:10:31 -07:00
Jean Delvare
4c6e0f8101 hwmon: (coretemp) Relax target temperature range check
The current temperature range check of MSR_IA32_TEMPERATURE_TARGET
seems too strict to me, some TjMax values documented in
Documentation/hwmon/coretemp wouldn't pass. Relax the check so that
all the documented values pass.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-06-01 11:11:28 -07:00
Per Dalen
614198bbf8 hwmon: (max6642) Rename temp_fault sysfs attribute to temp2_fault
The temp_fault sysfs attribute is wrong, it should be temp2_fault instead.

Reported-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Per Dalen <per.dalen@appeartv.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-06-01 11:11:27 -07:00
Jean Delvare
582e1b270f hwmon: (coretemp) Fix section mismatch
chk_ucode_version() is only called from coretemp_probe() which is
__devinit, so it can be marked __devinit too.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-27 02:24:54 -07:00
Guenter Roeck
eec752b2b9 hwmon: (pmbus) Initialize sysfs attributes
Initialize sysfs attrs before device_create_file() call to suppress
lockdep_init_map() warning:

WARNING: at kernel/lockdep.c:2701 lockdep_init_map+0x12d/0x140()

Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@kernel.org # .39.x
2011-05-27 02:24:54 -07:00
Guenter Roeck
6777b9e47e hwmon: (coretemp) Update comments describing the handling of HT CPUs
Update comments describing the handling of HT CPUs based on review feedback.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-05-27 02:24:53 -07:00
Sergey Senozhatsky
4258781ac7 hwmon: (coretemp) Initialize sysfs attributes
Initialize sysfs attrs before device_create_file() call to suppress lockdep_init_map()
warning:

[    3.653628] WARNING: at kernel/lockdep.c:2885 lockdep_init_map+0xea/0x43c()
[    3.653698] Modules linked in:
[    3.654835] Pid: 1, comm: swapper Not tainted 2.6.39-dbg-git8-05624-g46187f8 #576
[    3.656014] Call Trace:
[    3.657139]  [<ffffffff8103e4b4>] warn_slowpath_common+0x7e/0x96
[    3.658298]  [<ffffffff8103e4e1>] warn_slowpath_null+0x15/0x17
[    3.659460]  [<ffffffff8106d7b9>] lockdep_init_map+0xea/0x43c
[    3.660616]  [<ffffffff81163c1a>] sysfs_add_file_mode+0x5d/0xa8
[    3.661785]  [<ffffffff81163c71>] sysfs_add_file+0xc/0xe
[    3.662929]  [<ffffffff81163d26>] sysfs_create_file+0x23/0x25
[    3.664045]  [<ffffffff813724d1>] device_create_file+0x14/0x16
[    3.665172]  [<ffffffff81460ed4>] coretemp_probe+0xf9/0x185
[    3.666306]  [<ffffffff8137638e>] platform_drv_probe+0x12/0x14
[    3.667420]  [<ffffffff81375321>] driver_probe_device+0xb0/0x14b
[    3.668542]  [<ffffffff8137546d>] __device_attach+0x35/0x3a
[    3.669710]  [<ffffffff81375438>] ? __driver_attach+0x7c/0x7c
[    3.670816]  [<ffffffff8137426b>] bus_for_each_drv+0x54/0x88
[    3.671921]  [<ffffffff81375231>] device_attach+0x77/0x9b
[    3.673027]  [<ffffffff81374aef>] bus_probe_device+0x22/0x39
[    3.674137]  [<ffffffff81373235>] device_add+0x3c1/0x550
[    3.675249]  [<ffffffff81371ed9>] ? dev_set_name+0x3c/0x3e
[    3.676371]  [<ffffffff813769f3>] platform_device_add+0x10c/0x156
[    3.677491]  [<ffffffff8146af9c>] get_core_online+0xab/0x16e
[    3.678608]  [<ffffffff81ad8070>] coretemp_init+0x4b/0x80
[    3.679724]  [<ffffffff81ad8025>] ? hwmon_init+0xee/0xee
[    3.680853]  [<ffffffff8100020a>] do_one_initcall+0x7a/0x13c
[    3.681975]  [<ffffffff81aaac74>] kernel_init+0xe1/0x15b
[    3.683081]  [<ffffffff8147e4e4>] kernel_thread_helper+0x4/0x10
[    3.684174]  [<ffffffff8102d48c>] ? finish_task_switch+0x76/0xf0
[    3.685266]  [<ffffffff81477918>] ? retint_restore_args+0x13/0x13
[    3.686356]  [<ffffffff81aaab93>] ? start_kernel+0x3ee/0x3ee
[    3.687425]  [<ffffffff8147e4e0>] ? gs_change+0x13/0x13
[    3.688489] ---[ end trace 7392ad3e6a92ae39 ]---

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-27 02:24:53 -07:00
Jean Delvare
b0b349a85d hwmon: New driver for the SMSC EMC6W201
This is a new driver for the SMSC EMC6W201 hardware monitoring device.
The device is functionally close to the EMC6D100 series, but is
register-incompatible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Harry G McGavran Jr <w5pny@arrl.net>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:33 +02:00
Jean Delvare
ec693fe528 hwmon: (abituguru) Depend on DMI
The abituguru drivers are only built on X86, where DMI support is now
enabled by default. So let these drivers depend on DMI, for the
following gains:
* Robustness and safety. Detection of these devices is weak and uses
  non-standard methods, it should really be limited to Abit boards
  unless the user explicitly asks otherwise.
* Code simplicity. The code is easier to read without ifdefs.
* Better build testing coverage. Now there's only one way to build the
  drivers, so no risk of build failure on exotic systems.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Alistair John Strachan <alistair@devzero.co.uk>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2011-05-25 20:43:33 +02:00
Nat Gurumoorthy
5b0380c94a hwmon: (it87) Use request_muxed_region
Serialize access to the hardware by using "request_muxed_region" macro
defined by Alan Cox. Call to this macro will hold off the requestor if
the resource is currently busy. "superio_enter" will return an error
if call to "request_muxed_region" fails. Rest of the code change is to
ripple an error return from superio_enter to the top level.

Signed-off-by: Nat Gurumoorthy <natg@google.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:33 +02:00
Hans de Goede
357b9dc6c2 hwmon: (sch5627) Trigger Vbat measurements
The sch5627 needs to be explicitly told to start an adc conversion
for Vbat, once in a while. Without this Vbat may read 0, and will never
get updated.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:33 +02:00
Hans de Goede
709046a622 hwmon: (sch5627) Add sch5627_send_cmd function
This patch generalizes sch5627_read_virtual_reg so that it can
be used to write virtual regs too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Sigend-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:33 +02:00
Jean Delvare
9c084dae5d hwmon: (max6650) Properly support the MAX6650
The MAX6650 has only one fan input.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: "Hans J. Koch" <hjk@hansjkoch.de>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:32 +02:00
Jean Delvare
67b670ff04 hwmon: (max6650) Drop device detection
MAX6650 device detection is unreliable, we got reports of false
positives. We now have many ways to let users instantiate the devices
explicitly, so unreliable detection should be dropped.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: "Hans J. Koch" <hjk@hansjkoch.de>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:32 +02:00
Jean Delvare
7d03336538 Move ACPI power meter driver to hwmon
As discussed earlier, the ACPI power meter driver would better live
in drivers/hwmon, as its only purpose is to create hwmon-style
interfaces for ACPI 4.0 power meter devices. Users are more likely to
look for it there, and less likely to accidentally hide it by
unselecting its dependencies.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: "Darrick J. Wong" <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Len Brown <lenb@kernel.org>
2011-05-25 20:43:32 +02:00
Hans de Goede
629c58bac0 hwmon: (f71882fg) Add support for F71808A
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:32 +02:00
Hans de Goede
4d53811a28 hwmon: (f71882fg) Split has_beep in fan_has_beep and temp_has_beep
Needed for upcoming support of the F71808A.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:32 +02:00
Jean Delvare
9854f971f2 hwmon: (asc7621) Drop duplicate dependency
The config SENSORS_ASC7621 entry is inside an if HWMON / endif block,
so it already depends on HWMON.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:32 +02:00
Jean Delvare
774466add7 hwmon: (jc42) Change detection class
While the JC42-compatible chips are temperature sensors, I2C_CLASS_SPD
makes more sense because these chips always live on memory modules.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:32 +02:00
Andreas Herrmann
512d1027a6 hwmon: Add driver for AMD family 15h processor power information
This CPU family provides NB register values to gather following
TDP information

* ProcessorPwrWatts: Specifies in Watts the maximum amount of power
  the processor can support.
* CurrPwrWatts: Specifies in Watts the current amount of power being
  consumed by the processor.

This driver provides

* power1_crit (ProcessorPwrWatts)
* power1_input (CurrPwrWatts)

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:31 +02:00
Andre Przywara
9e58131112 hwmon: (k10temp) Add support for Fam15h (Bulldozer)
AMDs upcoming CPUs use the same mechanism for the internal
temperature reporting as the Fam10h CPUs, so we just needed to add
the appropriate PCI-ID to the list.
This allows to use the k10temp driver on those CPUs.
While at it change the Kconfig entry to be more generic.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25 20:43:31 +02:00
Jean Delvare
95de3b2575 hwmon: Use helper functions to set and get driver data
Use helper functions to set and get driver data. This is more elegant.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25 20:43:31 +02:00
Guenter Roeck
f4e0bcf06b hwmon: (coretemp) Add comments describing the handling of HT CPUs
The coretemp driver provides a single set of device attributes for each
physical core of a HT CPU to avoid duplicate sensors.  This
functionality was introduced with commit d883b9f097 ("hwmon:
(coretemp) Skip duplicate CPU entries").

Commit e40cc4bdfd ("x86/hwmon: register alternate sibling upon CPU
removal") extends this functionality to register the HT sibling of a CPU
which is taken offline, to ensure that sensor attributes are provided if
at least one HT sibling of a core is online.

Add comments into the code describing the functionality in some more
detail.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23 21:11:14 -07:00
Guenter Roeck
bb74e8ca35 hwmon: (coretemp) Fix compile error if CONFIG_SMP is not defined
cpu_sibling_mask() is not defined unless CONFIG_SMP is defined, so it
must not be used directly in the code without ifdef protection.

To solve the problem and avoid ifdefs in the code, define
for_each_sibling() and use it instead.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23 11:59:08 -07:00
Guenter Roeck
4cc452758f hwmon: (coretemp) Fix checkpatch errors
Fix remaining checkpatch errors in the coretemp driver.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-05-21 07:29:17 -07:00
Guenter Roeck
5e99c2f1e0 hwmon: Remove pkgtemp driver
After the merge of pkgtemp functionality into the coretemp driver,
the pkgtemp driver is no longer necessary. Remove it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2011-05-21 07:22:10 -07:00
Durgadoss R
199e0de7f5 hwmon: (coretemp) Merge pkgtemp with coretemp
This patch merges the pkgtemp with coretemp driver.
The sysfs interfaces for all cores in the same pkg
are shown under one directory, in hwmon. It also
supports CONFIG_HOTPLUG_CPU. So, the sysfs interfaces
are created when each core comes online and are
removed when it goes offline.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
[guenter.roeck@ericsson.com: Fixed section reference errors]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-20 07:04:49 -07:00
Guenter Roeck
83f7649c52 hwmon: (pmbus) Add support for Analog Devices ADM1275
Add support for Analog Devices ADM1275 Hot-Swap Controller and Digital Power
Monitor

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:41 -07:00
Guenter Roeck
0c0a061516 hwmon: (pmbus) Support for TI UCD90xxx series Sequencer and System Health Controllers
Hardware monitoring support for TI UCD90120, UCD90124, UCD9090, and UCD90910
Sequencer and System Health Controllers.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:40 -07:00
Guenter Roeck
84fc4585c1 hwmon: (pmbus) Add support for TI UCD9200 series of PWM System Controllers
This patch adds hardware monitoring support for TI UCD9220, UCD9222, UCD9224,
UCD9240, UCD9244, UCD9246, and UCD9248 Digital PWM System Controllers.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:39 -07:00
Guenter Roeck
6586b14c7b hwmon: (pmbus) Use device specific function to read fan configuration
Fan control implementation tends to be device specific, so start using
the device specific function call to read fan configuration registers.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:39 -07:00
Guenter Roeck
2cfa6aedb3 hwmon: (pmbus) Expand scope of device specific get_status function
Some devices use non-standard registers to access various functionality.
This does not only affect status registers, but other registers as well.
Rename local get_status function to get_byte_data to reflect this requirement.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:38 -07:00
Guenter Roeck
b4ce237b7f hwmon: (pmbus) Introduce infrastructure to detect sensors and limit registers
This commit replaces hard-coded sensor and limit register detection code
with table based sensor detection. This change eliminates code block repetition
and reduces code size.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-05-19 08:19:37 -07:00
Guenter Roeck
f5bae2642e hwmon: Driver for MAX16065 System Manager and compatibles
This patch adds hardware monitoring support for Maxim MAX16065, MAX16066,
MAX16067, MAX16068, MAX16070, and MAX16071 flash-configurable system managers
with nonvolatile fault registers.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
2011-05-19 08:19:36 -07:00
Jerome Oufella
82c7465b4d hwmon: (sht15) add support for CRC validation
The sht15 sensor allows validating exchanges to and from the device
using a crc8 function. An utility function to reverse a byte has also
been added.

Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-19 08:19:36 -07:00
Vivien Didelot
cc15c7ebb4 hwmon: (sht15) add support for the status register
* Add support for:
  - Heater.
  - End of battery notice.
  - Ability not to reload from OTP.
  - Low resolution (12bit temp, 8bit humidity).
* Add an utility function to read individual bytes from the device.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-19 08:19:35 -07:00
Vivien Didelot
181148ae68 hwmon: (sht15) clean-up the probe function
* Move the creation of sysfs attributes after the end of the
  initialization, and remove them in the error path.
* Release regulator in the error path.
* Add a soft reset command (need to wait 11ms before next command).

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-19 08:19:34 -07:00
Vivien Didelot
99a0378de9 hwmon: (sht15) general code clean-up
* Add a documentation file for the device.
* Respect a bit more the kernel-doc syntax.
* Rename some variables for clarity.
* Use bool type for flags.
* Use an enum for states (actions being done).

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-19 08:19:33 -07:00
Per Dalén
83bffbce74 hwmon: Add support for MAX6642
MAX6642 is a SMBus-Compatible Remote/Local Temperature Sensor with
Overtemperature Alarm from Maxim.

Signed-off-by: Per Dalen <per.dalen@appeartv.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-19 08:19:32 -07:00
Axel Lin
c30aa39c23 hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails
The driver did not return an error if the call to hwmon_device_register failed.
Fix by returning the error reported from hwmon_device_register.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-01 09:06:35 -07:00
Jean Delvare
bc4d45f190 hwmon: (lm85) Fix error paths in probe function
We must remove all files we created, even in error cases.

Fixes second part of kernel bug #34072:
https://bugzilla.kernel.org/show_bug.cgi?id=34072

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-04-29 16:33:36 +02:00
Jean Delvare
5f441e2256 hwmon: (lm85) Add missing list terminators
Fixes kernel bug #34072:
https://bugzilla.kernel.org/show_bug.cgi?id=34072

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-04-29 16:33:36 +02:00
Jean Delvare
d7ce0335b5 hwmon: (adm1021) Clarify documentation regarding Xeon processors
Recent Xeon processor thermal sensors are supported by the coretemp
driver and not the adm1021 driver. Only one old generation of Xeon
processors (the first Netburst ones) are supported by the adm1021
driver.

Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-04-29 16:33:36 +02:00
Guenter Roeck
5a4e5e6a70 hwmon: (lm90) Add support for ADT7461A and NCT1008
This patch adds support for ADT7461A and NCT1008 to the lm90 driver.
Both chips have identical functionality and report the same manufacturing ID
and device ID values.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-04-29 16:33:35 +02:00
Guenter Roeck
3b17857dfb hwmon: (pmbus) Removed unused variable from struct pmbus_data
struct pmbus_data included an unused variable named status_bits.
Remove it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
2011-04-19 08:49:56 -07:00
Linus Torvalds
42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Lucas De Marchi
25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Axel Lin
c4757ee58a hwmon: twl4030-madc-hwmon: add "platform:" prefix for platform modalias
Since 43cc71eed1 (platform: prefix MODALIAS
with "platform:"), the platform modalias is prefixed with "platform:".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-29 17:26:18 -07:00
Thomas Gleixner
dced35aeb0 drivers: Final irq namespace conversion
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:19 +02:00
Linus Torvalds
4329510c22 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (pmbus) Fix temperature limit register access
2011-03-27 20:03:39 -07:00
Guenter Roeck
3506999e2f hwmon: (pmbus) Fix temperature limit register access
Commit 8677011 added auto-update to temperature limit registers.
Unfortunately, the update flag is also used to determine if an attribute
is writable, which results in read-only temperature limit registers.
To fix the problem, pass 'readonly' as separate flag to the function used
to add sensor attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-26 09:53:56 -07:00
Hans de Goede
a66c10887a hwmon: (f71882fg) Add support for the F71889A
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-26 10:45:02 +01:00
Jean Delvare
383586b12d hwmon: (f71882fg) Add support for the F81865F
Add support for the Fintek F81865F. It's essentially compatible with
the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan
inputs only.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-26 10:45:02 +01:00
Jean Delvare
5d7f77bf66 hwmon: (f71882fg) Document all supported devices
The list of supported devices was not always well documented in all
places. Clarify and list all devices in documentation, Kconfig and
the driver itself.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-26 10:45:02 +01:00
Jean Delvare
f27def07bf hwmon: (f71882fg) Per-chip fan/temperature input count tables
Use tables to list the count of fan and temperature inputs for all
supported chips, almost similar to (but more simple than) what is
already done for voltage inputs. This avoids repeating the same tests
in different functions, and will make it easier to add support for
chips with a different count of fan or temperature inputs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-26 10:45:01 +01:00
Jean Delvare
2740c60c4a hwmon: (f71882fg) Secure chip property definition arrays
Using C99-style array initialization will ensure definitions won't
drift if the chips enum gets new values added.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-26 10:45:01 +01:00
Andres Salomon
e9300066bb jz4740: silence warnings related to mfd_get_cell changes
mfd_get_cell returns a const, so change the jz4740 clients to store
a const mfd cell.  This silences type mismatch warnings.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:02 +01:00
Keerthy
0070bddfe7 hwmon: twl4030: Hwmon Driver for TWL4030 MADC
This driver exposes the sysfs nodes of the TWL4030 MADC module.
All the voltage channel values are expressed in terms of mV. Channel 13
and channel 14 are reserved. There are channels which represent
temperature and current the output is represented by celcius
and mA respectively.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:00 +01:00
Andres Salomon
6a54ac2149 mfd: mfd_cell is now implicitly available to jz4740 drivers
No need to explicitly set the cell's platform_data/data_size.

Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:50 +01:00
Dirk Eibach
c0046867f3 hwmon: (ads1015) Make gain and datarate configurable
Configuration for ads1015 gain and datarate is possible via
devicetree or platform data.

This is a followup patch to previous ads1015 patches on Jean Delvares
tree.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-21 17:59:37 +01:00
Jean Delvare
fdf241a8ed hwmon: (ads1015) Drop dynamic attribute group
It is cheaper to handle attributes individually.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Dirk Eibach <eibach@gdsys.de>
2011-03-21 17:59:37 +01:00
Dirk Eibach
8c22a8f575 hwmon: Add support for Texas Instruments ADS1015
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-21 17:59:36 +01:00
Hans de Goede
a98d506c08 hwmon: New driver for SMSC SCH5627
SMSC SCH5627 Super I/O chips include complete hardware monitoring
capabilities. They can monitor up to 5 voltages, 4 fans and 8
temperatures.

The hardware monitoring part of the SMSC SCH5627 is accessed by talking
through an embedded microcontroller. An application note describing the
protocol for communicating with the microcontroller is available upon
request. Please mail me if you want a copy.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-21 17:59:36 +01:00
Hans de Goede
93d0cc5883 hwmon: (abituguru*) Update my email address
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-21 17:59:36 +01:00
Jean Delvare
e76f67b5ba hwmon: (lm75) Speed up detection
Make the LM75/LM75A device detection faster:

* Don't read the current temperature value when we don't use it.
* Check for unused bits in the configuration register as soon as we
  have read its value.
* Don't use word reads, not all devices support this, and some which
  don't misbehave when you try.
* Check for cycling register values every 40 register addresses
  instead of every 8, it's 5 times faster and just as efficient.

Some of these improvements come straight from the user-space
sensors-detect script, so both detection routines are in line now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-21 17:59:36 +01:00
Len Sorensen
05e82fe40f hwmon: (lm75) Add detection of the National Semiconductor LM75A
Add support for detection of the National Semiconductor LM75A using the ID
register value.

Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-03-21 17:59:36 +01:00
Jean Delvare
ff606677f6 Move lis3lv02d drivers to drivers/misc
The lis3lv02d drivers aren't hardware monitoring drivers, so the don't
belong to drivers/hwmon. Move them to drivers/misc, short of a better
home.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Eric Piel <eric.piel@tremplin-utc.net>
Tested-by: Takashi Iwai <tiwai@suse.de>
2011-03-21 17:59:36 +01:00
Jean Delvare
efcfed9bad Move hp_accel to drivers/platform/x86
The hp_accel driver isn't a hardware monitoring driver, so it doesn't
belong to drivers/hwmon. Move it to drivers/platform/x86, assuming HP
doesn't ship non-x86 laptops.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Eric Piel <eric.piel@tremplin-utc.net>
Tested-by: Takashi Iwai <tiwai@suse.de>
2011-03-21 17:59:36 +01:00