summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
...
* | hwmon: (fam15h_power) Remove needless pci dev idAravind Gopalakrishnan2014-08-041-3/+0
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (powerpc/powernv) hwmon driver for power, fan rpm, voltage and ↵Neelesh Gupta2014-08-043-0/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | hwmon: (pmbus) Add tps40422 front-end driverZhu, Richard \(NSN - CN/Beijing\)2014-08-044-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | hwmon: (tmp421) Drop FSF mailing addressGuenter Roeck2014-08-041-4/+0
| | | | | | | | | | | | | | | | 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>
* | hwmon: (tmp421) Add support for TMP441 and TMP442Guenter Roeck2014-08-042-5/+18
| | | | | | | | | | | | | | 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>
* | hwmon: (tmp421) Strengthen detect functionGuenter Roeck2014-08-041-0/+14
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (g760a) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-40/+13
| | | | | | | | | | | | | | | | 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>
* | hwmon: (g760a) Avoid forward declarationAxel Lin2014-08-041-20/+15
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm9240) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-48/+26
| | | | | | | | | | | | | | | | 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>
* | hwmon: (lineage-pem) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-47/+19
| | | | | | | | | | | | | | | | 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>
* | hwmon: (smm665) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-28/+16
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm9240) Avoid forward declarationAxel Lin2014-08-041-162/+153
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (adm1031) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-63/+38
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm1031) Avoid forward declarationAxel Lin2014-08-041-148/+138
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (adm1026) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-85/+55
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm1026) Avoid forward declarationAxel Lin2014-08-041-233/+219
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (adm1025) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-48/+23
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm1025) Avoid forward declarationAxel Lin2014-08-041-120/+104
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (adm1021) Avoid forward declarationAxel Lin2014-08-041-92/+83
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (gl520sm) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-61/+35
| | | | | | | | | | | | | | | | 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>
* | hwmon: (gl520sm) Avoid forward declarationAxel Lin2014-08-041-167/+150
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (gl518sm) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-51/+25
| | | | | | | | | | | | | | | | 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>
* | hwmon: (gl518sm) Avoid forward declarationAxel Lin2014-08-041-137/+126
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (lm93) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-88/+66
| | | | | | | | | | | | | | | | 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>
* | hwmon: (w83791d) Fix smatch warningGuenter Roeck2014-08-041-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | hwmon: (lm63) Fix smatch warningsGuenter Roeck2014-08-041-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | hwmon: Make regmap configs constAxel Lin2014-08-045-5/+5
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (htu21) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-47/+22
| | | | | | | | | | | | | | | | 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>
* | hwmon: (emc6w201) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-45/+19
| | | | | | | | | | | | | | | | 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>
* | hwmon: (amc6821) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-45/+25
| | | | | | | | | | | | | | | | 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>
* | hwmon: (amc6821) Avoid forward declarationAxel Lin2014-08-041-206/+154
| | | | | | | | | | | | | | Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (adm1029) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-40/+15
| | | | | | | | | | | | | | | | 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>
* | hwmon: (adm1029) Avoid forward declarationsAxel Lin2014-08-041-93/+78
| | | | | | | | | | | | | | Reorder functions to avoid forward declarations. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (ad7418) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-41/+24
| | | | | | | | | | | | | | | | 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>
* | hwmon: (ad7418) Avoid forward declarationAxel Lin2014-08-041-38/+34
| | | | | | | | | | | | | | | | 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>
* | hwmon: (ad7414) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-41/+16
| | | | | | | | | | | | | | | | 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>
* | hwmon: (ntc_thermistor) Support B57330V2103 from EPCOSJohannes Pointner2014-08-042-2/+50
| | | | | | | | | | | | | | 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>
* | hwmon: (hih6130) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-65/+23
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probeAxel Lin2014-08-041-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (lm75) Add support for TMP112Frans Klaver2014-08-042-2/+10
| | | | | | | | | | | | | | TMP112 is compatible to LM75. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (w83l786ng) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-57/+29
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (w83l786ng) Avoid forward declarationAxel Lin2014-08-041-109/+100
| | | | | | | | | | | | | | | | 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>
* | hwmon: (fam15h_power) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-42/+9
| | | | | | | | | | | | | | | | 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>
* | hwmon: (wm8350) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-43/+7
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (wm831x) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-61/+11
| | | | | | | | | | | | | | | | | | 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>
* | hwmon: (ads7828) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-38/+14
| | | | | | | | | | | | | | | | 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>
* | hwmon: (atxp1) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-55/+21
| | | | | | | | | | | | | | | | 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>
* | hwmon: Driver for TI TMP103 temperature sensorHeiko Schocher2014-08-043-0/+217
| | | | | | | | | | | | | | | | | | | | | | Driver for the TI TMP103. The TI TMP103 is similar to the TMP102. It differs from the TMP102 by having only 8 bit registers. Signed-off-by: Heiko Schocher <hs@denx.de> [linux@roeck-us.net: Select REGMAP_I2C in Kconfig] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (gpio-fan) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-13/+4
| | | | | | | | | | | | | | | | This simplifies the code a bit and also ensures the attribute groups are properly removed from sysfs when unload the module. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | hwmon: (twl4030-madc-hwmon) Convert to devm_hwmon_device_register_with_groupsAxel Lin2014-08-041-32/+6
| | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud