summaryrefslogtreecommitdiff
path: root/drivers/hwmon/max6650.c
AgeCommit message (Collapse)Author
2016-09-09hwmon: (max6650) Allow fan shutdown and initial rpm targetMike Looijmans
The fan can be stopped by writing "3" to pwm1_enable in sysfs. Add devicetree property for early initialization of the fan controller to prevent overheating, for example when resetting the board while the fan was completely turned off. Also improve error reporting, I2C failures were ignored while writing new values. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-09hwmon: (max6650) Add devicetree supportMike Looijmans
Parse devicetree parameters for voltage and prescaler setting. This allows using multiple max6550 devices with varying settings, and also makes it possible to instantiate and configure the device using devicetree. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Introduce local 'dev' variableGuenter Roeck
This makes the code a bit easier to read. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Drop error message after memory allocation failuresGuenter Roeck
The core code already generates an error message. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach sensor attributes to hwmon device. Reviewed-by: Jean Delvare <jdelvare@suse.de> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Rearrange code to no longer require forward declarationsGuenter Roeck
Cleanup only; no functional change. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: Correct some typosLABBE Corentin
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-26hwmon: Replace SENSORS_LIMIT with clamp_valGuenter Roeck
SENSORS_LIMIT and the generic clamp_val have the same functionality, and clamp_val is more efficient. This patch reduces text size by 9052 bytes and bss size by 11624 bytes for x86_64 builds. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-22hwmon: (max6650) Convert to use devm_ functionsGuenter Roeck
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Hans J. Koch <hjk@hansjkoch.de>
2012-03-19hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin
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>
2012-03-19hwmon: (max6650) Fix multi-line commentsGuenter Roeck
Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-19hwmon: (max6650) Fix checkpatch issuesGuenter Roeck
Fixed: ERROR: do not use assignment in if condition ERROR: open brace '{' following struct go on the same line ERROR: spaces required around that '||' (ctx:VxV) ERROR: switch and case should be at the same indent WARNING: simple_strtoul is obsolete, use kstrtoul instead Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-01-04switch ->is_visible() to returning umode_tAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-05-25hwmon: (max6650) Properly support the MAX6650Jean Delvare
The MAX6650 has only one fan input. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25hwmon: (max6650) Drop device detectionJean Delvare
MAX6650 device detection is unreliable, we got reports of false positives. We now have many ways to let users instantiate the devices explicitly, so unreliable detection should be dropped. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: Change mail address of Hans J. KochHans J. Koch
My old mail address doesn't exist anymore. This changes all occurrences to my new address. Signed-off-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-12-14i2c: Drop I2C_CLIENT_INSMOD_1Jean Delvare
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>
2009-12-14i2c: Get rid of struct i2c_client_address_dataJean Delvare
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>
2009-12-14i2c: Drop the kind parameter from detect callbacksJean Delvare
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>
2009-12-09hwmon: Clean up detect functionsJean Delvare
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>
2009-07-11hwmon: (max6650) Fix lock imbalanceJiri Slaby
Add omitted update_lock to one switch/case in set_div. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-06-15hwmon: (max6650) Add support for alarmsChristian Engelmayer
Export the alarm flags provided by the MAX6650/MAX6651 fan-speed regulator and monitor chips via sysfs. Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
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-02-19hwmon: normal_i2c arrays should be constMark M. Hoffman
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-10-10hwmon: Convert from class_device to deviceTony Jones
Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-05-08hwmon: New max6650 driverHans-Juergen Koch
This driver supports the Maxim MAX6650 and MAX6651 fan speed monitoring and control chips. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>