summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2010-10-28hwmon: (lis3) Fix Oops with NULL platform dataTakashi Iwai
commit f7c77a3dc4683659b6f0d1b6cbc82b6253d095e0 upstream. The recent addition of threaded irq handler causes a NULL dereference when used with hp_accel driver, which has NULL pdata. Acked-by: Samu Onkalo <samu.p.onkalo@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hwmon: (f75375s) Do not overwrite values read from registersGuillem Jover
commit c3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b upstream. All bits in the values read from registers to be used for the next write were getting overwritten, avoid doing so to not mess with the current configuration. Signed-off-by: Guillem Jover <guillem@hadrons.org> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hwmon: (f75375s) Shift control mode to the correct bit positionGuillem Jover
commit 96f3640894012be7dd15a384566bfdc18297bc6c upstream. The spec notes that fan0 and fan1 control mode bits are located in bits 7-6 and 5-4 respectively, but the FAN_CTRL_MODE macro was making the bits shift by 5 instead of by 4. Signed-off-by: Guillem Jover <guillem@hadrons.org> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hwmon: (emc1403) Remove unnecessary hwmon_device_unregisterYong Wang
commit f17c811d1433aa1966f9c5a744841427e9a97ecf upstream. It is unnecessary and wrong to call hwmon_device_unregister in error handling before hwmon_device_register is called. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hp_accel: add quirks for HP ProBook 532x and HP Mini 5102Takashi Iwai
commit 4e70598c3b56e6fec551454c495d4d4025834749 upstream. Added missing axis-mapping for HP ProBook 532x and HP Mini 5102. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hwmon: (k8temp) Differentiate between AM2 and ASB1Andreas Herrmann
commit a05e93f3b3fc2f53c1d0de3b17019e207c482349 upstream. Commit 8bf0223ed515be24de0c671eedaff49e78bebc9c (hwmon, k8temp: Fix temperature reporting for ASB1 processor revisions) fixed temperature reporting for ASB1 CPUs. But those CPU models (model 0x6b, 0x6f, 0x7f) were packaged both as AM2 (desktop) and ASB1 (mobile). Thus the commit leads to wrong temperature reporting for AM2 CPU parts. The solution is to determine the package type for models 0x6b, 0x6f, 0x7f. This is done using BrandId from CPUID Fn8000_0001_EBX[15:0]. See "Constructing the processor Name String" in "Revision Guide for AMD NPT Family 0Fh Processors" (Rev. 3.46). Cc: Rudolf Marek <r.marek@assembler.cz> Reported-by: Vladislav Guberinic <neosisani@gmail.com> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20hwmon: (ads7871) Fix ads7871_probe error pathsAxel Lin
commit c12c507d7185fe4e8ada7ed9832957576eefecf8 upstream. 1. remove 'status' variable 2. remove unneeded initialization of 'err' variable 3. return missing error code if sysfs_create_group fail. 4. fix the init sequence as: - check hardware existence - kzalloc for ads7871_data - sysfs_create_group - hwmon_device_register Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-26hwmon: (pc87360) Fix device resource declarationJean Delvare
commit b9783dcebe952bf73449fe70a19ee4814adc81a0 upstream. It's not OK to call platform_device_add_resources() multiple times in a row. Despite its name, this functions sets the resources, it doesn't add them. So we have to prepare an array with all the resources, and then call platform_device_add_resources() once. Before this fix, only the last I/O resource would be actually registered. The other I/O resources were leaked. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-09hwmon: (coretemp) Properly label the sensorsJean Delvare
Don't assume that CPU entry number and core ID always match. It worked in the simple cases (single CPU, no HT) but fails on multi-CPU systems. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Huaxu Wan <huaxu.wan@intel.com> Cc: stable@kernel.org
2010-07-09hwmon: (coretemp) Skip duplicate CPU entriesJean Delvare
On hyper-threaded CPUs, each core appears twice in the CPU list. Skip the second entry to avoid duplicate sensors. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Huaxu Wan <huaxu.wan@intel.com> Cc: stable@kernel.org
2010-07-09hwmon: (it87) Fix in7 on IT8720FJean Delvare
The IT8720F has no VIN7 pin, so VCCH should always be routed internally to VIN7 with an internal divider. Curiously, there still is a configuration bit to control this, which means it can be set incorrectly. And even more curiously, many boards out there are improperly configured, even though the IT8720F datasheet claims that the internal routing of VCCH to VIN7 is the default setting. So we force the internal routing in this case. It turns out that all boards with the wrong setting are from Gigabyte, so I suspect a BIOS bug. But it's easy enough to workaround in the driver, so let's do it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jean-Marc Spaggiari <jean-marc@spaggiari.org> Cc: stable@kernel.org
2010-07-09hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisionsAndreas Herrmann
Reported temperature for ASB1 CPUs is too high. Add ASB1 CPU revisions (these are also non-desktop variants) to the list of CPUs for which the temperature fixup is not required. Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle) Current kernel reports $ sensors k8temp-pci-00c3 Adapter: PCI adapter Core0 Temp: +74.0 C Core0 Temp: +70.0 C Core1 Temp: +69.0 C Core1 Temp: +70.0 C With this patch I have $ sensors k8temp-pci-00c3 Adapter: PCI adapter Core0 Temp: +54.0 C Core0 Temp: +51.0 C Core1 Temp: +48.0 C Core1 Temp: +49.0 C Cc: stable@kernel.org [.32.x .33.x, .34.x] Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-06-20hwmon: (k8temp) Bypass core swapping on single-core processorsJean Delvare
Commit a2e066bba2aad6583e3ff648bf28339d6c9f0898 introduced core swapping for CPU models 64 and later. I recently had a report about a Sempron 3200+, model 95, for which this patch broke temperature reading. It happens that this is a single-core processor, so the effect of the swapping was to read a temperature value for a core that didn't exist, leading to an incorrect value (-49 degrees C.) Disabling core swapping on singe-core processors should fix this. Additional comment from Andreas: The BKDG says Thermal Sensor Core Select (ThermSenseCoreSel)-Bit 2. This bit selects the CPU whose temperature is reported in the CurTemp field. This bit only applies to dual core processors. For single core processors CPU0 Thermal Sensor is always selected. k8temp_probe() correctly detected that SEL_CORE can't be used on single core CPU. Thus k8temp did never update the temperature values stored in temp[1][x] and -49 degrees was reported. For single core CPUs we must use the values read into temp[0][x]. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Rick Moritz <rhavin@gmx.net> Acked-by: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: stable@kernel.org
2010-06-20hwmon: (i5k_amb) Fix sysfs attribute for lockdepKAMEZAWA Hiroyuki
i5k_amb.ko uses dynamically allocated memory (by kmalloc) for attributes passed to sysfs. So, sysfs_attr_init() should be called for working happy with lockdep. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org [2.6.34 only]
2010-06-20hwmon: (k10temp) Do not blacklist known working CPU modelsJean Delvare
When detecting AM2+ or AM3 socket with DDR2, only blacklist cores which are known to exist in AM2+ format. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: stable@kernel.org
2010-06-03i2c: Remove all i2c_set_clientdata(client, NULL) in driversWolfram Sang
I2C drivers can use the clientdata-pointer to point to private data. As I2C devices are not really unregistered, but merely detached from their driver, it used to be the drivers obligation to clear this pointer during remove() or a failed probe(). As a couple of drivers forgot to do this, it was agreed that it was cleaner if the i2c-core does this clearance when appropriate, as there is no guarantee for the lifetime of the clientdata-pointer after remove() anyhow. This feature was added to the core with commit e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers. As there is no need anymore to clear the clientdata-pointer, remove all current occurrences in the drivers to simplify the code and prevent confusion. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-27hwmon: (lm75) Add support for the Texas Instruments TMP105Shubhrajyoti Datta
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. Snyder
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 Haefliger
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 Delvare
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 Delvare
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 Delvare
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 King
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 Trisal
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 Murray
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 Rydberg
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 Froemel
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 Rydberg
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 Prendel
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 Prendel
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 Delvare
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. Snyder
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 Schijndel
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 Schijndel
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 Schijndel
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 Schijndel
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 Garrett
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 Delvare
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 Emde
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 Emde
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 Thomas
[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 Onkalo
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 Onkalo
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 Onkalo
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 Onkalo
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 Onkalo
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 Onkalo
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 ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing * '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 Likely
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 Likely
.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>