summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2014-08-04hwmon: (ds620) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (max16065) Use PTR_ERR_OR_ZEROAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (sht21) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (fam15h_power) Remove needless pci dev idAravind Gopalakrishnan
PCI_DEVICE_ID_AMD_16H_NB_F4 can be obtained from it's definition in pci_ids.h. So we don't have to define it again here. Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (powerpc/powernv) hwmon driver for power, fan rpm, voltage and ↵Neelesh Gupta
temperature This patch adds basic kernel support for reading power values, fan speed rpm, voltage and temperature data on powernv platforms which will be exported to user space through sysfs interface. Test results: ------------- [root@tul163p1 ~]# sensors ibmpowernv-isa-0000 Adapter: ISA adapter fan1: 5465 RPM (min = 0 RPM) fan2: 5152 RPM (min = 0 RPM) fan3: 5521 RPM (min = 0 RPM) fan4: 4891 RPM (min = 0 RPM) fan5: 0 RPM (min = 0 RPM) fan6: 0 RPM (min = 0 RPM) fan7: 7480 RPM (min = 0 RPM) fan8: 7944 RPM (min = 0 RPM) temp1: +39.0°C (high = +0.0°C) power1: 190.00 W [root@tul163p1 ~]# ls /sys/devices/platform/ alarmtimer ibmpowernv.0 power rtc-generic serial8250 uevent [root@tul163p1 ~]# ls /sys/devices/platform/ibmpowernv.0/hwmon/hwmon0/ device fan2_min fan4_min fan6_min fan8_min power fan1_fault fan3_fault fan5_fault fan7_fault in1_fault power1_input fan1_input fan3_input fan5_input fan7_input in2_fault subsystem fan1_min fan3_min fan5_min fan7_min in3_fault temp1_input fan2_fault fan4_fault fan6_fault fan8_fault in4_fault temp1_max fan2_input fan4_input fan6_input fan8_input name uevent [root@tul163p1 ~]# ls /sys/class/hwmon/hwmon0/ device fan2_min fan4_min fan6_min fan8_min power fan1_fault fan3_fault fan5_fault fan7_fault in1_fault power1_input fan1_input fan3_input fan5_input fan7_input in2_fault subsystem fan1_min fan3_min fan5_min fan7_min in3_fault temp1_input fan2_fault fan4_fault fan6_fault fan8_fault in4_fault temp1_max fan2_input fan4_input fan6_input fan8_input name uevent [root@tul163p1 ~]# Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (pmbus) Add tps40422 front-end driverZhu, Richard \(NSN - CN/Beijing\)
For TI power management chip TPS40422, READ_TEMPERATURE_2 command is supported on page 1 of the chip, but the original driver(pmbus.c) only tried to detect this command on page 0, this will lead to a result that the temperature sensor in page 1 couldn't be detected. This change is to isolate the tps40422 driver from pmbus.c into a solo front-end driver. Signed-off-by: Zhu Laiwen <richard.zhu@nsn.com> [Guenter Roeck: Dropped unnecessary license text (fixes checkpatch warning)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (tmp421) Drop FSF mailing addressGuenter Roeck
The FSF mailing address can and will change over time, so drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-08-04hwmon: (tmp421) Add support for TMP441 and TMP442Guenter Roeck
TMP441 and TMP442 are compatible to TMP421 and TMP422. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-08-04hwmon: (tmp421) Strengthen detect functionGuenter Roeck
Not all supported chips support the entire I2C address range. Only accept specific chips at the addresses supported by that chip. Check for invalid values in conversion rate and status registers. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-08-04hwmon: (g760a) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (g760a) Avoid forward declarationAxel Lin
Move g760a_driver to proper place to avoid forward declaration. Also move g760a_id table close to g760a_driver. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm9240) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (lineage-pem) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (smm665) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm9240) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1031) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1031) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1026) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1026) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1025) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1025) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1021) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (gl520sm) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (gl520sm) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (gl518sm) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (gl518sm) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (lm93) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (w83791d) Fix smatch warningGuenter Roeck
smatch complains as follows when checking w83791d.c. drivers/hwmon/w83791d.c:996 store_temp23() warn: '32768' 32768 can't fit into 32767 'data->temp_add[nr][index]' Fix by using DIV_ROUND_CLOSEST and clamp_val to convert the values. While we are at it, modify other macros as well for consistency and to make the code easier to understand. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (lm63) Fix smatch warningsGuenter Roeck
smatch complains as follows when checking lm63.c. drivers/hwmon/lm63.c:594 set_temp11() warn: '65504' 65504 can't fit into 32767 'data->temp11[nr]' drivers/hwmon/lm63.c:596 set_temp11() warn: '32768' 32768 can't fit into 32767 'data->temp11[nr]' Fix by using DIV_ROUND_CLOSEST and clamp_val to convert the values. While we are at it, modify other macros as well for consistency and to make the code easier to understand. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: Make regmap configs constAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (htu21) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (emc6w201) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (amc6821) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (amc6821) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1029) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1029) Avoid forward declarationsAxel Lin
Reorder functions to avoid forward declarations. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ad7418) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ad7418) Avoid forward declarationAxel Lin
Move ad7418_driver to proper place to avoid forward declaration. Also move ad7418_init_client() close to ad7418_probe(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ad7414) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ntc_thermistor) Support B57330V2103 from EPCOSJohannes Pointner
This patch adds support for the ntc thermistor B57330V2103 from EPCOS. Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (hih6130) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Iain Paton <ipaton0@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probeAxel Lin
Add missing i2c_set_clientdata() call in tmp103_probe, this makes the dev_get_drvdata() call in tmp103_suspend/tmp103_resume return correct address. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (lm75) Add support for TMP112Frans Klaver
TMP112 is compatible to LM75. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (w83l786ng) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (w83l786ng) Avoid forward declarationAxel Lin
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (fam15h_power) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (wm8350) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (wm831x) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (ads7828) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (atxp1) Convert to devm_hwmon_device_register_with_groupsAxel Lin
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups. This simplifies the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>