aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2008-07-31hwmon: (lm75) add new-style driver bindingDavid Brownell
More LM75 updates: - Teach the LM75 driver to use new-style driver binding: * Create a second driver struct, using new-style driver binding methods cribbed from the legacy code. * Add a MODULE_DEVICE_TABLE (for "newER-style binding") * The legacy probe logic delegates its work to this new code. * The legacy driver now uses the name "lm75_legacy". - More careful initialization. Chips are put into 9-bit mode so the current interconversion routines will never fail. - Save the original chip configuration, and restore it on exit. (Among other things, this normally turns off the mode where the chip is constantly sampling ... and thus saves power.) So the new-style code should catch all chips that boards declare, while the legacy code catches others. This particular coexistence strategy may need some work yet ... legacy modes might best be set up explicitly by some tool not unlike "sensors-detect". (Or else completely eradicated...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm75) cleanup/reorgDavid Brownell
Minor cleanup and reorg of the lm75 code. - Kconfig provides a larger list of lm75-compatible chips - A top comment now says what the driver does (!) ... as in, just what sort of sensor is this?? - Section comments now delineate the various sections of the driver: hwmon attributes, driver binding, register access, module glue. One driver binding function moved out of the attribute section, as did the driver struct itself. - Minor tweaks to legacy probe logic: correct a comment, and remove a pointless variable. - Whitespace, linelength, and comment fixes. This patch should include no functional changes. It's preparation for adding new-style (driver model) I2C driver binding. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (adt7473) clarify an awkward bit of codeMark M. Hoffman
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2008-07-31hwmon: (adt7473) Remove unused definesJean Delvare
All the *_MAX_ADDR defines are never used, so remove them. The number of registers of each type is already expressed by the *_COUNT defines. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) fix voltage scalingJuerg Haefliger
This patch fixes a voltage scaling issue for the sch311x device. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) probe all addressesJuerg Haefliger
This patch adds a module load parameter to enable probing of non-standard LPC addresses 0x162e and 0x164e when scanning for supported ISA chips. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) demacrofy for readabilityJuerg Haefliger
This patch gets rid of a couple of macros previously used for sysfs attribute generation and manipulation. This makes the source a little bigger but a lot more readable and maintainable. It also fixes an issue with pwm5 & pwm6 attributes not being created read-only initially. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-21device create: hwmon: convert device_create to device_create_drvdataGreg Kroah-Hartman
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into nextDmitry Torokhov
2008-07-16hwmon: (w83l786ng) Convert to a new-style i2c driverJean Delvare
The new-style w83l786ng driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Kevin Lo <kevlo@kevlo.org>
2008-07-16hwmon: (w83l785ts) Convert to a new-style i2c driverJean Delvare
The new-style w83l785ts driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83793) Convert to a new-style i2c driverJean Delvare
The new-style w83793 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83792d) Convert to a new-style i2c driverJean Delvare
The new-style w83792d driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (w83791d) Convert to a new-style i2c driverJean Delvare
The new-style w83791d driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Marc Hulsman <m.hulsman@tudelft.nl>
2008-07-16hwmon: (thmc50) Convert to a new-style i2c driverJean Delvare
The new-style thmc50 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
2008-07-16hwmon: (smsc47m192) Convert to a new-style i2c driverJean Delvare
The new-style smsc47m192 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hartmut Rick <linux@rick.claranet.de>
2008-07-16hwmon: (max6650) Convert to a new-style i2c driverJean Delvare
The new-style max6650 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans J. Koch <hjk@linutronix.de>
2008-07-16hwmon: (max1619) Convert to a new-style i2c driverJean Delvare
The new-style max1619 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alexey Fisher <fishor@mail.ru>
2008-07-16hwmon: (lm93) Convert to a new-style i2c driverJean Delvare
The new-style lm93 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Eric J. Bowersox <ericb@aspsys.com> Cc: Carsten Emde <cbe@osadl.org> Cc: Hans J. Koch <hjk@linutronix.de>
2008-07-16hwmon: (lm92) Convert to a new-style i2c driverJean Delvare
The new-style lm92 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (lm90) Convert to a new-style i2c driverJean Delvare
The new-style lm90 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (lm87) Convert to a new-style i2c driverJean Delvare
The new-style lm87 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ben Hutchings <bhutchings@solarflare.com>
2008-07-16hwmon: (lm83) Convert to a new-style i2c driverJean Delvare
The new-style lm83 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (lm80) Convert to a new-style i2c driverJean Delvare
The new-style lm80 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (lm77) Convert to a new-style i2c driverJean Delvare
The new-style lm77 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andras Bali <drewie@freemail.hu>
2008-07-16hwmon: (lm63) Convert to a new-style i2c driverJean Delvare
The new-style lm63 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (gl520sm) Convert to a new-style i2c driverJean Delvare
The new-style gl520sm driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Maarten Deprez <maartendeprez@users.sourceforge.net>
2008-07-16hwmon: (gl518sm) Convert to a new-style i2c driverJean Delvare
The new-style gl518sm driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (fscpos) Convert to a new-style i2c driverJean Delvare
The new-style fscpos driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (fschmd) Convert to a new-style i2c driverJean Delvare
The new-style fschmd driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <j.w.r.degoede@hhs.nl>
2008-07-16hwmon: (fscher) Convert to a new-style i2c driverJean Delvare
The new-style fscher driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Reinhard Nissl <rnissl@gmx.de>
2008-07-16hwmon: (f75375s) Drop legacy i2c driverJean Delvare
Drop the legacy f75375s i2c driver, and add a detect callback to the new-style i2c driver to achieve the same functionality. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Riku Voipio <riku.voipio@movial.fi>
2008-07-16hwmon: (ds1621) Convert to a new-style i2c driverJean Delvare
The new-style ds1621 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (atxp1) Convert to a new-style i2c driverJean Delvare
The new-style atxp1 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (asb100) Convert to a new-style i2c driverJean Delvare
The new-style asb100 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (adt7473) Convert to a new-style i2c driverJean Delvare
The new-style adt7473 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Darrick J. Wong <djwong@us.ibm.com>
2008-07-16hwmon: (adt7470) Convert to a new-style i2c driverJean Delvare
The new-style adt7470 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Darrick J. Wong <djwong@us.ibm.com>
2008-07-16hwmon: (ads7828) Convert to a new-style i2c driverJean Delvare
The new-style ads7828 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (adm9240) Convert to a new-style i2c driverJean Delvare
The new-style adm9240 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Grant Coady <gcoady.lk@gmail.com>
2008-07-16hwmon: (adm1031) Convert to a new-style i2c driverJean Delvare
The new-style adm1031 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alexandre d'Alton <alex@alexdalton.org>
2008-07-16hwmon: (adm1029) Convert to a new-style i2c driverJean Delvare
The new-style adm1029 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
2008-07-16hwmon: (adm1026) Convert to a new-style i2c driverJean Delvare
The new-style adm1026 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (adm1025) Convert to a new-style i2c driverJean Delvare
The new-style adm1025 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (adm1021) Convert to a new-style i2c driverJean Delvare
The new-style adm1021 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (ad7418) Convert to a new-style i2c driverJean Delvare
The ad7418 driver is only used on embedded platforms where i2c devices can easily be declared in platform code. Thus a new-style i2c driver makes perfect sense. This lets us get rid of quirky detection code (these chips have no identification registers) and shrinks the binary driver size by 38%. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <a.zummo@towertech.it>
2008-07-14Merge commit 'origin/HEAD' into test-mergeBenjamin Herrenschmidt
Manual fixup of include/asm-powerpc/pgtable-ppc64.h
2008-07-04hdaps: add support for various newer Lenovo thinkpadsmaximilian attems
Adds R61, T61p, X61s, X61, Z61m, Z61p models to whitelist. Fixes this: cullen@lenny:~$ sudo modprobe hdaps FATAL: Error inserting hdaps (/lib/modules/2.6.22-10-generic/kernel/drivers/hwmon/hdaps.ko): No such device [25192.888000] hdaps: supported laptop not found! [25192.888000] hdaps: driver init failed (ret=-19)! Originally based on an Ubuntu patch that got it wrong, the dmidecode output of the corresponding laptops shows LENOVO as the manufacturer. https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/133636 tested on X61s: [ 184.893588] hdaps: inverting axis readings. [ 184.893588] hdaps: LENOVO ThinkPad X61s detected. [ 184.893588] input: hdaps as /class/input/input12 [ 184.924326] hdaps: driver successfully loaded. Cc: Klaus S. Madsen <ubuntu@hjernemadsen.org> Cc: Chuck Short <zulcss@ubuntu.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: maximilian attems <max@stro.at> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-30hwmon: Use linux/of_platform.h instead of asmStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Stelian Pop <stelian@popies.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-06-19hwmon: (lm75) sensor reading bugfixDavid Brownell
LM75 sensor reading bugfix: never save error status as valid sensor output. This could be improved, but at least this prevents certain rude failure modes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19hwmon: (abituguru3) update driver detectionHans de Goede
It has been reported that the abituguru3 driver fails to load after a BIOS update. This patch fixes this by loosening the detection routine so that it will work after the BIOS update too. To compensate for the now very loose detection an additional check is added on the DMI Base Board vendor string to make sure we only load on Abit motherboards, this is the same as the check in the abituguru (1 / 2) driver. Signed-of-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>