aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/nct7904.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-08hwmon: (nct7904) Changes comments in probe function.amy.shih1-2/+2
Linux style for comments is the C89 "/* ... */" style, changes the comments to Linux style. Signed-off-by: amy.shih <amy.shih@advantech.com.tw> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-07-08hwmon: (nct7904) Add error handling in probe function.amy.shih1-5/+18
When register read and write operations return errors, needs to add error handling. Signed-off-by: amy.shih <amy.shih@advantech.com.tw> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-06-23hwmon: (nct7904) Fix the incorrect value of tcpu_mask in nct7904_data struct.amy.shih1-9/+63
Detect the multi-function of voltage, thermal diode and thermistor from register VT_ADC_MD_REG to set value of tcpu_mask in nct7904_data struct, set temp[1-5]_input the input values TEMP_CH1~4 and LTD of temperature. Set temp[6~13]_input the input values of DTS temperature that correspond to sensors TCPU1~8. Signed-off-by: amy.shih <amy.shih@advantech.com.tw> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-10/+1
Based on 3 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-15hwmon: (nct7904) Use new HWMON_CHANNEL_INFO() macroGuenter Roeck1-82/+46
The new macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-18hwmon: (nct7904) Replace S_<PERMS> with octal valuesGuenter Roeck1-5/+5
Replace S_<PERMS> with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-07-08hwmon: (nct7904) Fix UNSPECIFIED_INT warningJakob Albert1-4/+4
Fix UNSPECIFIED_INT warning reported by checkpatch.pl Signed-off-by: Lorenz Kaestle <lorenz.kaestle@fau.de> Signed-off-by: Jakob Albert <jakob.j.albert@fau.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-07-08hwmon: (nct7904) Fix CODE_INDENT errorJakob Albert1-24/+24
Fix CODE_INDENT error reported by checkpatch.pl Signed-off-by: Lorenz Kaestle <lorenz.kaestle@fau.de> Signed-off-by: Jakob Albert <jakob.j.albert@fau.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-07-08hwmon: (nct7904) Fix SPACING errorsJakob Albert1-6/+6
Fix SPACING errors reported by checkpatch.pl Signed-off-by: Lorenz Kaestle <lorenz.kaestle@fau.de> Signed-off-by: Jakob Albert <jakob.j.albert@fau.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08hwmon: (nct7904) Convert to use new hwmon registration APIGuenter Roeck1-285/+270
Simplify code and reduce code size by using the new hwmon registration API. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-05hwmon: (nct7904) Export I2C module alias informationJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-29hwmon: (nct7904) Rename pwm attributes to match hwmon ABIGuenter Roeck1-28/+29
pwm attributes have well defined names, which should be used. Cc: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru> Cc: stable@vger.kernel.org #v4.1+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (nct7904) Strengthen detect functionGuenter Roeck1-1/+2
The bank register has five unused bits. Verify that those bits are zero to strengthen the detect function. Cc: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2015-03-09hwmon: Add Nuvoton NCT7904 hwmon driverVadim V. Vlasov1-0/+592
The NCT7904D is a hardware monitor supporting up to 20 voltage sensors, internal temperature sensor, Intel PECI and AMD SB-TSI CPU temperature interface, up to 12 fan tachometer inputs, up to 4 fan control channels with SmartFan. Signed-off-by: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru> [Guenter Roeck: Fixed whitespace errors, dropped redundant comment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>