aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-27hwmon: (lm75) Add support for the Texas Instruments TMP105Shubhrajyoti Datta2-1/+4
Add support for the Texas Instruments TMP105 temperature sensor device. Signed-off-by: Shubhrajyoti Datta <shubhrajyoti@ti.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (ltc4245) Read only one GPIO pinIra W. Snyder1-13/+5
Read only one of the GPIO pins as an analog voltage. The ADC can be switched to a different GPIO pin at runtime, but this is not supported. Previously, this driver would report the analog voltage of the currently selected GPIO pin as all three GPIO voltages: in9_input, in10_input and in11_input. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
2010-05-27hwmon: (dme1737) Add SCH5127 supportJuerg Haefliger1-103/+225
Add support for the hardware monitoring capabilities of the SCH5127 chip to the dme1737 driver. Signed-off-by: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Jeff Rickman <jrickman@myamigos.us>
2010-05-27hwmon: (tmp102) Don't always stop chip at exitJean Delvare1-10/+28
Only stop the chip at driver exit if it was stopped when driver was loaded. Leave it running otherwise. Also restore the device configuration if probe failed, to not leave the system in a dangling state. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Steven King <sfking@fdwdc.com>
2010-05-27hwmon: (tmp102) Fix suspend and resume functionsJean Delvare1-4/+12
Suspend and resume functions shouldn't overwrite the configuration register. They should only alter the one bit they have to touch. Also don't assume that register reads and writes always succeed. Handle errors properly, shall they happen. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Steven King <sfking@fdwdc.com>
2010-05-27hwmon: (tmp102) Various fixesJean Delvare2-37/+35
Fixes from my driver review: http://lists.lm-sensors.org/pipermail/lm-sensors/2010-March/028051.html Only the small changes are in there, more important changes will come later separately as time permits. * Drop the remnants of the now gone detect function * The TMP102 has no known compatible chip * Include the right header files * Clarify why byte swapping of register values is needed * Strip resolution info bit from temperature register value * Set cache lifetime to 1/3 second * Don't arbitrarily reject limit values; clamp as needed * Make limit writing unconditional * Don't check for transaction types the driver doesn't use * Properly check for error when setting configuration * Report error on failed probe * Make the driver load automatically where needed * Various other minor fixes Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Steven King <sfking@fdwdc.com>
2010-05-27hwmon: Driver for TI TMP102 temperature sensorSteven King3-0/+308
Driver for the TI TMP102. The TI TMP102 is similar to the LM75. It differs from the LM75 by having a 16-bit conf register and the temp registers have a minimum resolution of 12 bits; the extended conf register can select 13-bit resolution (which this driver does) and also change the update rate (which this driver currently doesn't use). [JD: Fix tmp102_exit tag, must be __exit, not __init.] Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: EMC1403 thermal sensor supportKalhan Trisal3-0/+355
Provides support for the EMC1403 thermal sensor. Only reporting of values is supported. The various Moorestown specific extras to do with thermal alerts and the like are not in this version of the driver. Considerably edited and tidied up by Alan Cox, plus fixes and detection bits from Jean Delvare. Signed-off-by: Kalhan Trisal <kalhan.trisal@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (applesmc) Add temperature sensor labels to sysfs interfaceAlex Murray1-1/+147
The Apple SMC uses a systematic labeling scheme for the hardware temperature sensors. This scheme is currently hidden from userland. Since the sensor set, and consequently the numbering, differs between models, an extensive database of configurations is required for an application such as fan control. This patch adds the SMC labels to the hwmon sysfs interface, allowing applications to use the sensors more intelligibly. [rydberg@euromail.se: fixed error handling] Signed-off-by: Alex Murray <murray.alex@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (applesmc) Add generic support for MacBook Pro 7Henrik Rydberg1-0/+9
This patch adds generic support for the MacBook Pro 7 family based on the 7,1 model. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (applesmc) Add generic support for MacBook Pro 6Bernhard Froemel1-0/+10
This patch adds generic support for the MacBook Pro 6 family based on the 6,2 model. [rydberg@euromail.se: patch cleanup] Signed-off-by: Bernhard Froemel <froemel@vmars.tuwien.ac.at> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (applesmc) Add support for MacBook Pro 5,3 and 5,4Henrik Rydberg1-0/+19
The MacBookPro 5,3 model has two fans, whereas the 5,4 model has only one. This patch adds explicit support for the 5,3 and 5,4 models. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (tmp401) Reorganize code to get rid of static forward declarationsAndre Prendel1-108/+97
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>
2010-05-27hwmon: (tmp401) Use constants for sysfs file permissionsAndre Prendel1-22/+28
Replace octal representation of file permissions by the corresponding constants. 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>
2010-05-27hwmon: (adm1031) Allow setting update rateJean Delvare1-2/+66
Based on earlier work by Ira W. Snyder. The adm1031 chip is capable of using a runtime configurable sampling rate, using the fan filter register. Add support for reading and setting the update rate via sysfs. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu>
2010-05-27hwmon: (lm90) Use programmed update rateIra W. Snyder1-1/+2
The lm90 driver programs the sensor chip to update its readings at 2 Hz (500 ms between readings). However, the driver only does reads from the chip at intervals of 2 * HZ (2000 ms between readings). Change the driver update rate to the programmed update rate. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (f71882fg) Acquire I/O regions while we're working with themGiel van Schijndel1-0/+8
Acquire the I/O region for the Super I/O chip while we're working on it. Signed-off-by: Giel van Schijndel <me@mortis.eu> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (f71882fg) Code cleanupGiel van Schijndel1-12/+6
Some code cleanup: properly use previously defined functions, rather than duplicating their code. Signed-off-by: Giel van Schijndel <me@mortis.eu> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (f71882fg) Use strict_stro(l|ul) instead of simple_strto$1Giel van Schijndel1-29/+104
Use the strict_strol and strict_stroul functions instead of simple_strol and simple_stroul respectively in sysfs functions. Signed-off-by: Giel van Schijndel <me@mortis.eu> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (f71882fg) Fixed braces coding style issuesGiel van Schijndel1-6/+5
Fixed several coding style issues. Signed-off-by: Giel van Schijndel <me@mortis.eu> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (lm63) Add basic support for LM64Matthew Garrett2-9/+18
The LM64 appears to be an LM63 with added GPIO lines. Add support for the hwmon functionality - GPIO can be added at some later stage if someone has a need for them. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (asus_atk0110) Don't load if ACPI resources aren't enforcedJean Delvare1-0/+7
When the user passes the kernel parameter acpi_enforce_resources=lax, the ACPI resources are no longer protected, so a native driver can make use of them. In that case, we do not want the asus_atk0110 to be loaded. Unfortunately, this driver loads automatically due to its MODULE_DEVICE_TABLE, so the user ends up with two drivers loaded for the same device - this is bad. So I suggest that we prevent the asus_atk0110 driver from loading if acpi_enforce_resources=lax. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Luca Tettamanti <kronos.it@gmail.com> Cc: Len Brown <lenb@kernel.org>
2010-05-25drivers/hwmon/coretemp.c: get TjMax value from MSRCarsten Emde1-4/+57
The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer Intel processors. Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com> Signed-off-by: Carsten Emde <C.Emde@osadl.org> Cc: Jean Delvare <khali@linux-fr.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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25drivers/hwmon/coretemp.c: detect the thermal sensors by CPUIDCarsten Emde1-20/+12
The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction, indicated by CPUID.06H.EAX[0]. Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com> Signed-off-by: Carsten Emde <C.Emde@osadl.org> Reviewed-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Cc: Jean Delvare <khali@linux-fr.org> 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25hwmon: add TI ads7871 a/d converter driverPaul Thomas3-0/+263
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Paul Thomas <pthomas8589@gmail.com> Cc: Jonathan Cameron <jic23@cam.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>
2010-05-25lis3: setup poll interval limitsSamu Onkalo1-0/+4
Set valid adjustment window (0 - 2000ms). Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Cc: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25lis3: interrupt handlers for 8bit wakeup and click eventsSamu Onkalo2-13/+86
Content for the 8bit device threaded interrupt handlers. Depending on the interrupt line and chip configuration, either click or wakeup / freefall handler is called. In case of click, BTN_ event is sent via input device. In case of wakeup or freefall, input device ABS_ events are updated immediatelly. It is still possible to configure interrupt line 1 for fast freefall detection and use the second line either for click or threshold based interrupts. Or both lines can be used for click / threshold interrupts. Polled input device can be set to stopped state and still get coordinate updates via input device using interrupt based method. Polled mode and interrupt mode can also be used parallel. BTN_ events are remapped based on existing axis remapping information. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Cc: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25lis3: add skeletons for interrupt handlersSamu Onkalo1-23/+64
Original lis3 driver didn't provide interrupt handler(s) for click or threshold event handling. This patch adds threaded handlers for one or two interrupt lines for 8 bit device. Actual content for interrupt handling is provided in the separate patch. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Tested-by: Daniel Mack <daniel@caiaq.de> Acked-by: Eric 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>
2010-05-25lis3: introduce platform data for second ff / wu unitSamu Onkalo1-2/+13
8 bit device has two wakeup / free fall units. It was not possible to configure the second unit. This patch introduces configuration entry to the platform data and also corresponding changes to the 8 bit setup function. High pass filters were enabled by default. Patch introduces configuration option for high pass filter cut off frequency and also possibility to disable or enable the filter via platform data. Since the control is a new one and default state was filter enabled, new option is used to disable the filter. This way old platform data is still compatible with the change. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Tested-by: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25lis3: separate configuration function for 8 bit deviceSamu Onkalo1-19/+26
Separate configuration function for 8 bit version of the chip. This way generic part of the init function stays little bit more readable. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Tested-by: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25lis3: add missing constants for 8bit deviceSamu Onkalo1-0/+10
Definitions for click were missing. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Tested-by: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-24Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracingLinus Torvalds2-8/+11
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: uml: Pushdown the bkl from harddog_kern ioctl sunrpc: Pushdown the bkl from sunrpc cache ioctl sunrpc: Pushdown the bkl from ioctl autofs4: Pushdown the bkl from ioctl uml: Convert to unlocked_ioctls to remove implicit BKL ncpfs: BKL ioctl pushdown coda: Clean-up whitespace problems in pioctl.c coda: BKL ioctl pushdown drivers: Push down BKL into various drivers isdn: Push down BKL into ioctl functions scsi: Push down BKL into ioctl functions dvb: Push down BKL into ioctl functions smbfs: Push down BKL into ioctl function coda/psdev: Remove BKL from ioctl function um/mmapper: Remove BKL usage sn_hwperf: Kill BKL usage hfsplus: Push down BKL into ioctl function
2010-05-22Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely4-69/+65
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-22of: Remove duplicate fields from of_platform_driverGrant Likely1-2/+5
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
2010-05-17drivers: Push down BKL into various driversArnd Bergmann2-8/+11
These are the last remaining device drivers using the ->ioctl file operation in the drivers directory (except from v4l drivers). [fweisbec: drop i8k pushdown as it has been done from procfs pushdown branch already] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2010-05-11Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/stagingLinus Torvalds2-68/+56
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (applesmc) Correct sysfs fan error handling hwmon: (asc7621) Bug fixes
2010-05-11hp_accel: fix race in device removalOliver Neukum1-1/+1
The work queue has to be flushed after the device has been made inaccessible. The patch closes a window during which a work queue might remain active after the device is removed and would then lead to ACPI calls with undefined behavior. Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Pavel Herrmann <morpheus.ibis@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-11hwmon: (applesmc) Correct sysfs fan error handlingHenrik Rydberg1-36/+25
The current code will not remove the sysfs files for fan numbers three and up. Also, upon exit, fans one and two are removed regardless of their existence. This patch cleans up the sysfs error handling for the fans. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-11hwmon: (asc7621) Bug fixesKen Milmore1-32/+31
* Allow fan minimum RPM to be set to zero without triggering alarms. * Fix voltage scaling arithmetic and correct scale factors. * Correct fan1-fan4 alarm bit shifts. * Correct register address for temp3_smoothing_enable. * Read the alarm registers with high priority. Signed-off-by: Ken Milmore <ken.milmore@googlemail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-04-24lis3: add support for HP ProBook 432x/442x/452x/522xTakashi Iwai1-0/+4
Correct axis-mappings for new HP ProBook laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: 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>
2010-04-22sysfs: use sysfs_attr_init in ASUS atk0110 driverJiri Kosina1-0/+4
Annotate dynamic sysfs attribute in atk_create_files(). This gets rid of the following lockdep warning: BUG: key ffff8800379ca670 not in .data! ------------[ cut here ]------------ WARNING: at kernel/lockdep.c:2696 lockdep_init_map+0xd2/0x108() Hardware name: P5K PRO Modules linked in: asus_atk0110(+) pata_acpi firewire_ohci ata_generic dm_multipath firewire_core crc_itu_t pata_marvell floppy Pid: 599, comm: modprobe Not tainted 2.6.34-rc4 #27 Call Trace: [<ffffffff8104cdb0>] warn_slowpath_common+0x7c/0x94 [<ffffffff8104cddc>] warn_slowpath_null+0x14/0x16 [<ffffffff81077c4d>] lockdep_init_map+0xd2/0x108 [<ffffffff81165873>] sysfs_add_file_mode+0x66/0xa2 [<ffffffff811658c0>] sysfs_add_file+0x11/0x13 [<ffffffff8116594b>] sysfs_create_file+0x2a/0x2c [<ffffffff812c1f9c>] device_create_file+0x19/0x1b [<ffffffffa005b4fd>] atk_add+0x58b/0x72e [asus_atk0110] [<ffffffff812572a1>] acpi_device_probe+0x50/0x122 [<ffffffff812c46af>] driver_probe_device+0xa2/0x127 [<ffffffff812c4783>] __driver_attach+0x4f/0x6b [<ffffffff812c4734>] ? __driver_attach+0x0/0x6b [<ffffffff812c3c94>] bus_for_each_dev+0x59/0x8e [<ffffffff812c4519>] driver_attach+0x1e/0x20 [<ffffffff812c4152>] bus_add_driver+0xb9/0x207 [<ffffffff812c4a5f>] driver_register+0x9d/0x10e [<ffffffffa005f000>] ? atk0110_init+0x0/0x31 [asus_atk0110] [<ffffffff81257c7c>] acpi_bus_register_driver+0x43/0x45 [<ffffffffa005f015>] atk0110_init+0x15/0x31 [asus_atk0110] [<ffffffffa005f000>] ? atk0110_init+0x0/0x31 [asus_atk0110] [<ffffffff81002069>] do_one_initcall+0x5e/0x15e [<ffffffff81085075>] sys_init_module+0xd8/0x239 [<ffffffff81009cf2>] system_call_fastpath+0x16/0x1b ---[ end trace 4d0c84007055efb9 ]--- BUG: key ffff8800379ca638 not in .data! BUG: key ffff8800379ca6a8 not in .data! BUG: key ffff8800379ca6e0 not in .data! BUG: key ffff880036f73670 not in .data! BUG: key ffff880036f73638 not in .data! BUG: key ffff880036f736a8 not in .data! BUG: key ffff880036f736e0 not in .data! BUG: key ffff880036f76c70 not in .data! BUG: key ffff880036f76c38 not in .data! BUG: key ffff880036f76ca8 not in .data! BUG: key ffff880036f76ce0 not in .data! BUG: key ffff8800368e7670 not in .data! BUG: key ffff8800368e7638 not in .data! BUG: key ffff8800368e76a8 not in .data! BUG: key ffff8800368e76e0 not in .data! BUG: key ffff880036ef7670 not in .data! BUG: key ffff880036ef7638 not in .data! BUG: key ffff880036ef76a8 not in .data! BUG: key ffff880036ef76e0 not in .data! BUG: key ffff8800373ccc70 not in .data! BUG: key ffff8800373ccc38 not in .data! BUG: key ffff8800373ccca8 not in .data! BUG: key ffff8800373ccce0 not in .data! BUG: key ffff880037a60870 not in .data! BUG: key ffff880037a60838 not in .data! BUG: key ffff880037a608a8 not in .data! BUG: key ffff880037a608e0 not in .data! BUG: key ffff880037355070 not in .data! BUG: key ffff880037355038 not in .data! BUG: key ffff8800373550a8 not in .data! BUG: key ffff8800373550e0 not in .data! BUG: key ffff8800378c2670 not in .data! BUG: key ffff8800378c2638 not in .data! BUG: key ffff8800378c26a8 not in .data! BUG: key ffff8800378c26e0 not in .data! BUG: key ffff880036ef7e70 not in .data! BUG: key ffff880036ef7e38 not in .data! BUG: key ffff880036ef7ea8 not in .data! BUG: key ffff880036ef7ee0 not in .data! Cc: Eric W. Biederman <ebiederm@xmission.com> Reported-by: Dhaval Giani <dhaval.giani@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Tested-by: Dhaval Giani <dhaval.giani@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-14hwmon: (applesmc) Add iMac9,1 and MacBookPro2,2 supportJustin P. Mattock1-0/+18
Add the iMac9,1 and the MacBookPro2,2 temperature sensors to hwmon driver applesmc to fix kernel bug #14429: https://bugzilla.kernel.org/show_bug.cgi?id=14429 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Nicolas Boichat <nicolas@boichat.ch> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-04-14hwmon: (it87) Invalidate cache on temperature sensor changeJean Delvare1-0/+1
When any temperature sensor type is changed, the corresponding temperature value needs to be updated. The register caching mechanism may delay this update, so we want to invalidate the cache to force an immediate update. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-04-14hwmon: (it87) Properly handle wrong sensor type requestsJean Delvare1-10/+10
Currently, if someone tries to set the thermal sensor type to an unsupported value, subsequent accesses to the chip may temporarily show the sensor in question as disabled. Use a temporary variable and only update the cached value on success, to prevent such confusion. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-04-14hwmon: (it87) Don't arbitrarily enable temperature channelsJean Delvare1-8/+5
Temperature channels can be used in 2 different modes (thermistor and thermal diode) and we don't know which one, if any, is correct for every given board. So don't arbitrarily choose one. Instead, leave the temperature channels untouched. They can be configured from user-space if needed anyway. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-04-14hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=nJean Delvare1-1/+6
When CONFIG_REGULATOR isn't set, regulator_get_voltage() returns 0. Properly handle this case by not trusting the value. Reported-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2010-04-14hwmon: (sht15) Fix sht15_calc_temp interpolation functionJerome Oufella1-3/+3
I discovered two issues. First the previous sht15_calc_temp() loop did not iterate through the temppoints array since the (data->supply_uV > temppoints[i - 1].vdd) test is always true in this direction. Also the two-points linear interpolation function was returning biased values due to a stray division by 1000 which shouldn't be there. [JD: Also change the default value for d1 from 0 to something saner.] Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo18-1/+17
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-29hwmon: (asc7621) Add X58 entry in KconfigJaswinder Singh Rajput1-2/+2
Intel X58 have asc7621a chip. So added X58 entry in Kconfig for asc7621. Also arranged existing models in ascending order. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-29hwmon: (w83793) Saving negative errors in unsignedDan Carpenter1-1/+1
"ret" is used to store the return value for watchdog_trigger() and it should be signed for the error handling to work. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>