summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ltc4215.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-03hwmon: (ltc4215) Convert to devm_hwmon_device_register_with_groupsGuenter Roeck1-38/+13
Simplify code, reduce code size, and attach sysfs attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2013-04-08hwmon: (ltc4215) Fix 'Macros with complex values' checkpatch errorGuenter Roeck1-28/+18
Fix: ERROR: Macros with complex values should be enclosed in parenthesis by unwinding the problematic macros. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-10-10hwmon: Add missing inclusions of <linux/jiffies.h>Jean Delvare1-0/+1
Many hwmon drivers use jiffies but omit the inclusion of the header file. Fix that, and also fix one driver which was including the header file but didn't need it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Luca Tettamanti <kronos.it@gmail.com> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz>
2012-09-24hwmon: (ltc4215) Convert to use devm_ functionsGuenter Roeck1-11/+4
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-19hwmon: (ltc4215) Fix multi-line commentsGuenter Roeck1-5/+10
Cc: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu>
2012-03-19hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin1-12/+1
This patch converts the drivers in drivers/hwmon/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com> Cc: David George <david.george@ska.ac.za> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-12-13hwmon: (ltc4215) make sysfs file match the alarm causeIra W. Snyder1-2/+2
The ltc4215 driver used the chip's "power good" status bit to provide the power1_alarm file. This is wrong: the chip is really reporting the status of one of the monitored voltages. Change the sysfs file from power1_alarm to in2_min_alarm instead. This matches the voltage that the chip is raising an alarm for. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2009-10-05ltc4215/ltc4245: Discard obsolete detect methodsJean Delvare1-42/+5
There is no point in implementing a detect callback for the LTC4215 and LTC4245, as these devices can't be detected. It was there solely to handle "force" module parameters to instantiate devices, but now we have a better sysfs interface that can do the same. So we can get rid of the ugly module parameters and the detect callbacks. This shrinks the binary module sizes by 36% and 46%, respectively. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ira W. Snyder <iws@ovro.caltech.edu>
2009-09-24hwmon: (ltc4215) Clear faults at startupIra W. Snyder1-1/+1
When power is applied to the ltc4215 chip it sometimes reports spurious faults. The faults are not yet exposed via sysfs, however it may be useful for userspace to read the fault register directly with the i2cget command. Clear the fault register when the driver is installed so userspace doesn't have to worry about spurious fault indications. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-04-01hwmon: Add LTC4215 driverIra Snyder1-0/+364
Add Linux support for the Linear Technology LTC4215 Hot Swap controller I2C monitoring interface. I have tested the driver with my board, and it appears to work fine. With the power supplies disabled, it reads 11.93V input, 1.93V output, no current and no power. With the supplies enabled, it reads 11.93V input, 11.98V output, no current, no power. I'm not drawing any current at the moment, so this is reasonable. The value in the sense register never reads anything except 0, so I expect to get zero from the current and power calculations. I didn't attempt to support changing any of the chip's settings or enabling the FET. I'm not sure even how to do that and still fit within the hwmon framework. :) Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Cc: Jean Delvare <khali@linux-fr.org> 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>