summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/emc1403.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: Make regmap configs constAxel Lin2014-08-041-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add device IDs for EMC1412, EMC1413, and EMC1414Guenter Roeck2014-05-211-0/+3
| | | | | | | | | EMC1412, EMC1413, and EMC1414 are fully compatible to EMC1402, EMC1403, and EMC1404, and even report the same chip ID. Add to device ID table to enable instantiation with correct chip names. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add support for min_hyst attributesGuenter Roeck2014-05-211-3/+24
| | | | | | | The hysteresis value applies to all limits, so add support for tempX_min_hyst. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add support for max_hyst attributesGuenter Roeck2014-05-211-0/+8
| | | | | | | The hysteresis value applies to all limits, so add support for tempX_max_hyst. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Relax hysteresis limit write checksGuenter Roeck2014-05-211-6/+1
| | | | | | | | | Writing the hysteresis limit returned -ERANGE if the written hysteresis was too high or too low. Relax error check and adjust the hysteresis value to its valid range. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Make all hyst attributes except for temp1_crit_hyst read-onlyGuenter Roeck2014-05-211-6/+3
| | | | | | | | | | All chips in this chip series only support a single hysteresis value. Having multiple writable hysteresis attributes is therefore confusing, since a single write affects all hysteresis temperatures. Make all but one (temp1_crit_hyst) read-only. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add support for alarm and diode fault status on EMC14x2Guenter Roeck2014-05-211-0/+36
| | | | | | | Alarm and fault status register on EMC1402, EMC1412, and EMC1422 is reported in a different register than with other chips. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Report external diode fault statusGuenter Roeck2014-05-211-0/+6
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Convert to use regmapGuenter Roeck2014-05-211-54/+63
| | | | | | Convert to regmap to be able to use its register caching mechanism. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add support for emc14x2Josef Gajdusek2014-05-211-15/+43
| | | | | | | | | | Add support for emc1402/emc1412/emc1422 temperature monitoring chips. This line of sensors only has 2 temperature channels (internal and external) in comparison to the emc14x3 (3 channels) and emc14x4 (4 channels). Signed-off-by: Josef Gajdusek <atx@atx.name> [Guenter Roeck: ordered i2c address list, updated description/headline] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Support full range of known chip revision numbersJosef Gajdusek2014-05-121-1/+1
| | | | | | | | | | | | The datasheet for EMC1413/EMC1414, which is fully compatible to EMC1403/1404 and uses the same chip identification, references revision numbers 0x01, 0x03, and 0x04. Accept the full range of revision numbers from 0x01 to 0x04 to make sure none are missed. Signed-off-by: Josef Gajdusek <atx@atx.name> Cc: stable@vger.kernel.org [Guenter Roeck: Updated headline and description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Fix resource leak on module unloadJean Delvare2014-05-121-3/+3
| | | | | | | | | | | | | | Commit 454aee17f claims to convert driver emc1403 to use devm_hwmon_device_register_with_groups, however the patch itself makes use of hwmon_device_register_with_groups instead. As the driver remove function was still dropped, the hwmon device is no longer unregistered on driver removal, leading to a resource leak. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: 454aee17f hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groups Cc: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org [3.13+] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) fix inverted store_hyst()Josef Gajdusek2014-05-121-1/+1
| | | | | | | | | | | | Attempts to set the hysteresis value to a temperature below the target limit fails with "write error: Numerical result out of range" due to an inverted comparison. Signed-off-by: Josef Gajdusek <atx@atx.name> Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org [Guenter Roeck: Updated headline and description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Add support for EMC1404 and EMC1424Guenter Roeck2013-10-181-8/+51
| | | | | | | EMC1404 and EMC1424 are similar to EMC1403 and EMC1423, but support an additional external temperature sensor. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-47/+26
| | | | | | Simplify code and reduce its size. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Add missing inclusions of <linux/jiffies.h>Jean Delvare2012-10-101-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>
* hwmon: (emc1403) Convert to use devm_ functionsGuenter Roeck2012-09-231-11/+7
| | | | | | Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (emc1403) Fix multi-line commentsGuenter Roeck2012-03-181-4/+8
| | | | | Cc: Kalhan Trisal <kalhan.trisal@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin2012-03-181-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>
* hwmon: replaced strict_str* with kstr*Frans Meulenbroeks2012-01-051-3/+3
| | | | | | | | | | | replaced strict_strtol with kstrtol and replaced strict_strtuol with kstrtuol This satisfies checkpatch -f Compile tested only: no warnings or errors given Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (emc1403) Fix I2C address rangeGuenter Roeck2011-02-091-1/+1
| | | | | | | | I2C address range included 0x2a, which the chips do not support. Replace with 0x29 which is supported but was missing. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (emc1403) Add EMC1423 supportJekyll Lai2011-01-121-4/+12
| | | | | | | | | | | | | EMC1423 uses the similar register and adds a hardware shutdown pin to protect exceed temperature. This function is set by resistor; it's not necessary to do anything in the driver except add the emc1423 pid of 0x23. Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com> [Updated Kconfig/comments and minor further changes asked for by the hwmon maintainers] Signed-off-by: Alan Cox <alan@linux.intel.com> [Fixed checkpatch warning] Signed-of--by: Jean Delvare <khali@linux-fr.org>
* hwmon: (emc1403) Remove unnecessary hwmon_device_unregisterYong Wang2010-09-171-1/+0
| | | | | | | | | | It is unnecessary and wrong to call hwmon_device_unregister in error handling before hwmon_device_register is called. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (emc1403) Add power supportAlan Cox2010-08-141-0/+33
| | | | | | | | Add back the power interface we lost due to a slight misunderstanding of the maintainers wishes. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: EMC1403 thermal sensor supportKalhan Trisal2010-05-271-0/+344
Provides support for the EMC1403 thermal sensor. Only reporting of values is supported. The various Moorestown specific extras to do with thermal alerts and the like are not in this version of the driver. Considerably edited and tidied up by Alan Cox, plus fixes and detection bits from Jean Delvare. Signed-off-by: Kalhan Trisal <kalhan.trisal@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
OpenPOWER on IntegriCloud