aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adt7473.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: Remove the deprecated adt7473 driverAmerigo Wang2010-03-051-1180/+0
| | | | | | | | adt7473 driver is obsoleted by adt7475 driver. And it is scheduled to be removed in Feb 2010. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Drop I2C_CLIENT_INSMOD_1Jean Delvare2009-12-141-4/+1
| | | | | | | | 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-141-1/+1
| | | | | | | | | 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-141-2/+2
| | | | | | | | 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>
* hwmon: (adt7475) Add support for the ADT7473Jean Delvare2009-12-091-1/+2
| | | | | | | | | | | | | Add support for the ADT7473 to the adt7475 driver, and mark the adt7473 driver for removal. The ADT7473 and ADT7475 chips are almost the same chip and essentially compatible, so there's no point in having separate drivers for them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Cc: "Darrick J. Wong" <djwong@us.ibm.com>
* hwmon: Clean up detect functionsJean Delvare2009-12-091-15/+10
| | | | | | | | | | | | As kind is now hard-coded to -1, there is room for code clean-ups. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Riku Voipio <riku.voipio@iki.fi> Acked-by: "Hans J. Koch" <hjk@linutronix.de> Cc: Rudolf Marek <r.marek@assembler.cz>
* adt74{62, 70, 73}: Use DIV_ROUND_CLOSEST for rounded divisionDarrick J. Wong2009-01-061-6/+4
| | | | | | | | | | Modify some hwmon drivers to use DIV_ROUND_CLOSEST instead of bloating source with (naughty) macros. Signed-off-by: Darrick J. Wong <djwong@us.ibm.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>
* adt7473: check inputs from sysfs writesDarrick J. Wong2008-11-121-15/+74
| | | | | | | | | | | | | Implement correct range checking for adt7470 to prevent userland from writing impossible values into the chip, and cap out-of-range values per standard hwmon conventions. Implement correct rounding of input values per standard hwmon conventions. Signed-off-by: Darrick J. Wong <djwong@us.ibm.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>
* hwmon: (adt7473) Fix voltage conversion routinesJean Delvare2008-10-261-20/+9
| | | | | | | | | | | | Fix voltage conversion routines. Based on an earlier patch from Paulius Zaleckas. According to the datasheet voltage is scaled with resistors and value 192 is nominal voltage. 0 is 0V. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Cc: Darrick J. Wong <djwong@us.ibm.com>
* Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds2008-08-011-15/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: hwmon: needs new maintainer hwmon: (lm85) Simplify device initialization function hwmon: (lm85) Misc cleanups hwmon: (lm85) Don't write back cached values hwmon: (lm85) Drop dead code hwmon: (lm85) Coding-style cleanups hwmon: (lm75) add new-style driver binding hwmon: (lm75) cleanup/reorg hwmon: (adt7473) clarify an awkward bit of code hwmon: (adt7473) Remove unused defines hwmon: (dme1737) fix voltage scaling hwmon: (dme1737) probe all addresses hwmon: (dme1737) demacrofy for readability
| * hwmon: (adt7473) clarify an awkward bit of codeMark M. Hoffman2008-07-311-2/+1
| | | | | | | | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Acked-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (adt7473) Remove unused definesJean Delvare2008-07-311-13/+0
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (adt7473) Convert to a new-style i2c driverJean Delvare2008-07-161-54/+48
|/ | | | | | | | 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>
* hwmon: (adt7473) Initialize max_duty_at_overheat before useJean Delvare2008-06-191-0/+3
| | | | | | | | | | data->max_duty_at_overheat is not updated in adt7473_update_device, so it might be used before it is initialized (if the user reads from sysfs file max_duty_at_crit before writing to it.) 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>
* hwmon: (adt7473) minor cleanup / refactoringMark M. Hoffman2008-04-271-22/+23
| | | | | Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: normal_i2c arrays should be constMark M. Hoffman2008-02-181-1/+1
| | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: New driver for Analog Devices ADT7473 sensor chipDarrick J. Wong2008-02-181-0/+1157
This driver reports voltage, temperature and fan sensor readings on an ADT7473 chip. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>