summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (ltc4245) Read only one GPIO pinIra W. Snyder2010-07-051-13/+5
| | | | | | | | | | | | | | | | commit df16dd53c575d0cb9dbee20a3149927c862a9ff6 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hp_accel: fix race in device removalOliver Neukum2010-05-261-1/+1
| | | | | | | | | | | | | | | | | | commit 06efbeb4a47b6f865e1c9d175ab9d6e90b69ae9e upstream. 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> 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>
* hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=nJean Delvare2010-04-261-1/+6
| | | | | | | | | | | | | | commit c7a78d2c2e2537fd24903e966f34aae50319d587 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: (sht15) Fix sht15_calc_temp interpolation functionJerome Oufella2010-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | commit 328a2c22abd08911e37fa66f1358f829cecd72e9 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: (coretemp) Add missing newline to dev_warn() messageDean Nelson2010-04-011-1/+1
| | | | | | | | | | | | | commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream. Add missing newline to dev_warn() message string. This is more of an issue with older kernels that don't automatically add a newline if it was missing from the end of the previous line. Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: Fix off-by-one kind valuesJean Delvare2010-03-153-15/+11
| | | | | | | | | | | | | | | | | commit dc71afe5ac7e8d049bb991330518e4c898a7d92e upstream. Recent changes on the I2C front have left off-by-one array indexes in 3 hwmon drivers. Fix them. Faulty commit: e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8 Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Andre Prendel <andre.prendel@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: (tmp421) Restore missing inputsJean Delvare2010-03-151-7/+7
| | | | | | | | | | | | | | commit 8d59582a867470a3e0c3eced4a01625ae8dc546b upstream. An off-by-one error caused some inputs to not be created by the driver when they should. TMP421 gets only one input instead of two, TMP422 gets two instead of three, etc. Fix the bug by listing explicitly the number of inputs each device has. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andre Prendel <andre.prendel@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: (tmp421) Fix temperature conversionsJean Delvare2010-03-151-2/+4
| | | | | | | | | | | | commit a44908d742a577fb5ccb9a8c082326d4cea234c2 upstream. The low bits of temperature registers are status bits, they must be masked out before converting the register values to temperatures. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andre Prendel <andre.prendel@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* macintosh/hwmon/ams: Fix device removal sequenceJean Delvare2010-03-154-4/+12
| | | | | | | | | | | | | | | | | | | | | commit 98ceb75c7c14eada76b0aa9f03a635a735cee3cb upstream. Some code that is in ams_exit() (the module exit code) should instead be called when the device (not module) is removed. It probably doesn't make much of a difference in the PMU case, but in the I2C case it does matter. I make no guarantee that my fix isn't racy, I'm not familiar enough with the ams driver code to tell for sure. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Christian Kujau <lists@nerdbynature.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hwmon: (w83781d) Request I/O ports individually for probingJean Delvare2010-02-051-13/+13
| | | | | | | | | | | | | | | | | Different motherboards have different PNP declarations for W83781D/W83782D chips. Some declare the whole range of I/O ports (8 ports), some declare only the useful ports (2 ports at offset 5) and some declare fancy ranges, for example 4 ports at offset 4. To properly handle all cases, request all ports individually for probing. After we have determined that we really have a W83781D or W83782D chip, the useful port range will be requested again, as a single block. I did not see a board which needs this yet, but I know of one for lm78 driver and I'd like to keep the logic of these two drivers in sync. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
* hwmon: (lm78) Request I/O ports individually for probingJean Delvare2010-02-051-13/+12
| | | | | | | | | | | | | | | Different motherboards have different PNP declarations for LM78/LM79 chips. Some declare the whole range of I/O ports (8 ports), some declare only the useful ports (2 ports at offset 5) and some declare fancy ranges, for example 4 ports at offset 4. To properly handle all cases, request all ports individually for probing. After we have determined that we really have an LM78 or LM79 chip, the useful port range will be requested again, as a single block. This fixes the driver on the Olivetti M3000 DT 540, at least. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
* hwmon: (adt7462) Wrong ADT7462_VOLT_COUNTRay Copeland2010-02-051-1/+1
| | | | | | | | | | | | | | The #define ADT7462_VOLT_COUNT is wrong, it should be 13 not 12. All the for loops that use this as a limit count are of the typical form, "for (n = 0; n < ADT7462_VOLT_COUNT; n++)", so to loop through all voltages w/o missing the last one it is necessary for the count to be one greater than it is. (Specifically, you will miss the +1.5V 3GPIO input with count = 12 vs. 13.) Signed-off-by: Ray Copeland <ray.copeland@aprius.com> Acked-by: "Darrick J. Wong" <djwong@us.ibm.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
* hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdogHans de Goede2010-01-251-2/+5
| | | | | | | | | When /dev/watchdog gets opened a second time we return -EBUSY, but we already have got a kref then, so we end up leaking our data struct. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
* hwmon: (asus_atk0110) Do not fail if MBIF is missingLuca Tettamanti2010-01-251-10/+9
| | | | | | | | | | MBIF (motherboard identification) is only used to print the name of the board, it's not essential for the driver; do not fail if it's missing. Based on Juan's patch. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Acked-by: Juan RP <xtraeme@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (amc6821) Double unlock bugDan Carpenter2010-01-251-1/+0
| | | | | | | The mutex gets unlocked after we goto EXIT. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (smsc47m1) Fix section mismatchJeff Mahoney2010-01-251-1/+1
| | | | | | | | smsc47m1_restore is called from sm_smsc47m1_exit, which is an __exit function, so it can't be __init. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2010-01-119-69/+288
|\ | | | | | | | | | | | | | | | | | | | | | | 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: Make PCI device ids constant hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs hwmon: (k10temp) Blacklist more family 10h processors hwmon: (asus_atk0110) Add debugfs interface hwmon: (asus_atk0110) Refactor interface probe code hwmon: (adt7462) Fix pin 28 monitoring
| * hwmon: Make PCI device ids constantMárton Németh2010-01-105-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make pci_device_id also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUsYong Wang2010-01-102-3/+15
| | | | | | | | | | | | | | | | | | | | | | The max junction temperature of Atom N450/D410/D510 CPUs is 100 degrees Celsius. Since these CPUs are always coupled with Intel NM10 chipset in one package, the best way to verify whether an Atom CPU is N450/D410/D510 is to check the host bridge device. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Acked-by: Huaxu Wan <huaxu.wan@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (k10temp) Blacklist more family 10h processorsClemens Ladisch2010-01-101-6/+32
| | | | | | | | | | | | | | | | | | | | | | The latest version of the Revision Guide for AMD Family 10h Processors lists two more processor revisions which may be affected by erratum 319. Change the blacklisting code to correctly detect those processors, by implementing AMD's recommended algorithm. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
| * hwmon: (asus_atk0110) Add debugfs interfaceLuca Tettamanti2010-01-101-0/+191
| | | | | | | | | | | | | | | | | | | | | | Expose the raw GGRP/GITM interface via debugfs. The hwmon interface is reverse engineered and the driver tends to break on newer boards... Using this interface it's possible to poke directly at the ACPI methods without the need to recompile, reducing the guesswork and the round trips needed to support a new revision of the interface. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (asus_atk0110) Refactor interface probe codeLuca Tettamanti2010-01-101-54/+44
| | | | | | | | | | | | | | | | The behaviour is unmodified, this makes easier to override the heuristic (which is probably needed for some boards). Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (adt7462) Fix pin 28 monitoringRoger Blofeld2010-01-101-1/+1
| | | | | | | | | | | | | | | | The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding shift must be 4. Signed-off-by: Roger Blofeld <blofeldus@yahoo.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: driver for Texas Instruments amc6821 chipTomaz Mertelj2010-01-113-0/+1127
|/ | | | | | | Signed-off-by: <tomaz.mertelj@guest.arnes.si> 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>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2009-12-177-30/+706
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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: (w83627hf) Fix for "No such device" hwmon: (sht15) Off-by-one error in array index + incorrect constants hwmon: Add driver for VIA CPU core temperature hwmon: (smsc47m1) Enable device if needed hwmon: (smsc47m1) Fail module loading on error hwmon: (smsc47m1) Only request I/O ports we really use hwmon: New driver for AMD Family 10h/11h CPUs
| * hwmon: (w83627hf) Fix for "No such device"Christian Schulte2009-12-161-1/+1
| | | | | | | | | | | | | | | | | | The commit b72656dbc491484765776a16eeb55ef2e90efea6 introduced a bug leading to the w83627hf_find function no longer finding any chips. Signed-off-by: Christian Schulte <cs@schulte.it> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (sht15) Off-by-one error in array index + incorrect constantsJonathan Cameron2009-12-161-3/+3
| | | | | | | | | | | | | | | | Fix an off-by-one error in array index + incorrect constants. Signed-off-by: Christoph Walser <walser@tik.ee.ethz.ch> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: Add driver for VIA CPU core temperatureHarald Welte2009-12-163-0/+365
| | | | | | | | | | | | | | | | | | | | | | | | This is a driver for the on-die digital temperature sensor of VIA's recent CPU models. [JD: Misc clean-ups.] Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Adam Nielsen <a.nielsen@shikadi.net>
| * hwmon: (smsc47m1) Enable device if neededJean Delvare2009-12-161-3/+27
| | | | | | | | | | | | | | | | | | | | If the address is set but the device isn't enabled, attempt to enable it. If it won't work for any reason (resource conflict, no function enabled) the initial state is restored. The initial state is also restored on module unloading. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * hwmon: (smsc47m1) Fail module loading on errorJean Delvare2009-12-161-13/+11
| | | | | | | | | | | | | | | | | | If an error occurs during probing, there's no point in keeping the module in memory. Better fail the module loading early to make the problem more visible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * hwmon: (smsc47m1) Only request I/O ports we really useJean Delvare2009-12-161-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | The I/O area of the SMSC LPC47M1xx chips which we use, gives access to a lot of registers, some of which are related to fan speed monitoring and control, but many are not. At the moment, the smsc47m1 driver requests the whole I/O port range. This could easily result in resource conflicts with either ACPI or other drivers. Request only the I/O ports we really use, to prevent such conflicts. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sean Fidler <fidlersean@gmail.com>
| * hwmon: New driver for AMD Family 10h/11h CPUsClemens Ladisch2009-12-163-0/+210
| | | | | | | | | | | | | | | | This adds a driver for the internal temperature sensor of AMD Family 10h and 11h CPUs. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | hwmon: I2C bus support for lis3lv02d and variant accelerometer chipsSamu Onkalo2009-12-173-0/+201
|/ | | | | | | | | Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Éric Piel <eric.piel@tremplin-utc.net> Cc: Kalhan Trisal <kalhan.trisal@intel.com> 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>
* lis3: scale output values to mgSamu Onkalo2009-12-152-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report output values as 1/1000 of earth gravity. Output values from lis3 can be read from sysfs position entry and from input device. Input device can be accessed as event device and as joystick device. Joystick device can be in two modes. Meaning of the output values varies from case to case depending on the chip type and configuration (scale). Only joystick interface in JS_CORR_BROKEN mode returned somehow similar output values in different configurations. Joystick device is in that state by default in case of lis3. Position sysfs entry, input event device and raw joystick device have been little bit broken since meaning of the output values has been varied between 12 and 8 bit devices. Applications which relayed on those methods failed if the chip is different than the expected one. This patch converts output values to mean similar thing in different configurations. Both 8 and 12 bit devices reports now same acceleration values. If somebody implements full scale support to the driver, output values will still mean the same. Scaling factor and input device range must be updated in that case. Joystick interface in JS_CORR_BROKEN mode is not touched by this patch. All other interfaces have different scale after this change. For 12 bit device scaling factor is 0.977 which keeps scaled and unscaled values are quite close to each others. For 8 bit device, scaled values are 18 times bigger than unscaled values. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3: sysfs entry for setting chip measurement rateSamu Onkalo2009-12-152-7/+46
| | | | | | | | | | | | It is possible to read position information at the chip measurement rate via sysfs. This patch adds possibility to configure chip measurement rate. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Signed-off-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3lv02d: remove calibaration functionalitySamu Onkalo2009-12-152-32/+3
| | | | | | | | | | | | Chip is calibrated by the manufacturer. There is no need to calibarate it at driver level. If the chip is used as a joystick, calibaration can be done using joystick device calibration mechanism. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3: selftest supportSamu Onkalo2009-12-152-3/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement selftest feature as specified by chip manufacturer. Control: read selftest sysfs entry Response: "OK x y z" or "FAIL x y z" where x, y, and z are difference between selftest mode and normal mode. Test is passed when values are within acceptance limit values. Acceptance limits are provided via platform data. See chip spesifications for acceptance limits. If limits are not properly set, OK / FAIL decision is meaningless. However, userspace application can still make decision based on the numeric x, y, z values. Selftest is meant for HW diagnostic purposes. It is not meant to be called during normal use of the chip. It may cause false interrupt events. Selftest mode delays polling of the normal results but it doesn't cause wrong values. Chip must be in static state during selftest. Any acceration during the test causes most probably failure. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3lv02d: proper power on sequenceSamu Onkalo2009-12-152-14/+28
| | | | | | | | | | | | | Lis3 accelerometer sensors have quite long power on delay (up to 125 ms). This patch adds necessary delay to power on sequence for currently supported lis3 chips. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Tested-by: Éric Piel <eric.piel@tremplin-utc.net> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3: fix show rate for 8 bits chipsÉric Piel2009-12-152-8/+17
| | | | | | | | | | | | | | | | | Originally the driver was only targeted to 12bits sensors. When support for 8bits sensors was added, some slight difference in the registers were overlooked. This should fix it, both for initialization, and for displaying the rate. Reported-by: Kalhan Trisal <kalhan.trisal@intel.com> Reported-by: Christoph Plattner <christoph.plattner@gmx.at> Tested-by: Christoph Plattner <christoph.plattner@gmx.at> Tested-by: Samu Onkalo <samu.p.onkalo@nokia.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3: update documentation and commentsÉric Piel2009-12-153-32/+38
| | | | | | | | | | | | Most of the documentation and comments were written when the driver was only supporting one type of chip, only via ACPI/HP. Update the info to the much clearer understanding that we have now. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3lv02d: correct memory leak in module unloadSamu Onkalo2009-12-151-0/+1
| | | | | | | | | | | polled input device itself was not free'd. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Tested-by: Éric Piel <eric.piel@tremplin-utc.net> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* lis3lv02d: send sync eventSamu Onkalo2009-12-151-0/+1
| | | | | | | | | | | | Send input_sync after each measurement round. This helps userspace to detect which reported values belongs to the same measurement. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Tested-by: Éric Piel <eric.piel@tremplin-utc.net> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hwmon: w83627ehf updatesDaniel J Blueman2009-12-151-19/+53
| | | | | | | | | | | | | | | | Add control of fan minimum turn-on output levels, decoupling it from the fan turn-off output level. Add control of rate of change of fan output level. These in turn allow lower turn-off rotor speed and smoother transitions for better thermal and acoustic control authority. Add support for constant fan speed and proportional-response operations modes. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: David Hubbard <david.c.hubbard@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* const: constify remaining dev_pm_opsAlexey Dobriyan2009-12-151-1/+1
| | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* i2c: Drop I2C_CLIENT_INSMOD_2 to 8Jean Delvare2009-12-1418-51/+26
| | | | | | | | | These macros simply declare an enum, so drivers might as well declare it themselves. This puts an end to the arbitrary limit of 8 chip types per i2c driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
* i2c: Drop I2C_CLIENT_INSMOD_1Jean Delvare2009-12-1427-109/+29
| | | | | | | | This macro simply declares an enum, so drivers might as well declare it themselves. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
* i2c: Get rid of struct i2c_client_address_dataJean Delvare2009-12-1445-45/+45
| | | | | | | | | Struct i2c_client_address_data only contains one field at this point, which makes its usefulness questionable. Get rid of it and pass simple address lists around instead. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
* i2c: Drop the kind parameter from detect callbacksJean Delvare2009-12-1445-94/+79
| | | | | | | | The "kind" parameter always has value -1, and nobody is using it any longer, so we can remove it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2009-12-0949-1650/+2082
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (41 commits) hwmon: (adt7475) Add VID support for the ADT7476 hwmon: (adt7475) Add an entry in MAINTAINERS hwmon: (adt7475) Add support for the ADT7476 hwmon: (adt7475) Voltage attenuators can be bypassed hwmon: (adt7475) Print device information on probe hwmon: (adt7475) Handle alternative pin functions hwmon: (adt7475) Move sysfs files removal to a separate function hwmon: (adt7475) Add support for the ADT7490 hwmon: (adt7475) Improve device detection hwmon: (adt7475) Add missing static marker hwmon: (adt7475) Rework voltage inputs handling hwmon: (adt7475) Implement pwm_use_point2_pwm_at_crit hwmon: (adt7475) New documentation hwmon: (adt7475) Add support for the ADT7473 hwmon: (f71882fg) Add support for the f71889fg (version 2) hwmon: (f71882fg) Fix sysfs file removal hwmon: (f71882fg) Cleanup sysfs attr creation 2/2 hwmon: (f71882fg) Cleanup sysfs attr creation 1/2 hwmon: (thmc50) Stop using I2C_CLIENT_MODULE_PARM hwmon: Add Freescale MC13783 ADC driver ...
| * hwmon: (adt7475) Add VID support for the ADT7476Jean Delvare2009-12-092-3/+64
| | | | | | | | | | | | | | | | | | | | The ADT7476 has 5 dedicated pins for VID input, and the +12V input can optionally be used as a 6th VID pin. Add support for VID input. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Cc: "Darrick J. Wong" <djwong@us.ibm.com>