summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (ad7418) Add device tree probingLinus Walleij2019-02-251-1/+14
| | | | | | | | | | | | This adds device tree probing for the AD7418 hwmon sensor. When device tree is not enabled, stub functions will kick in. Tested on the Gateway Cambria GW2358-4. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [groeck: Added missing {} to terminate ad7418_dt_ids] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ntc_thermistor) Convert to new hwmon APIGuenter Roeck2019-02-231-40/+66
| | | | | | | | | | Use devm_hwmon_device_register_with_info() instead of devm_hwmon_device_register_with_groups() to register the hwmon device to simplify the code and make it easier to maintain. As part of this change, thermal device registration is moved into the hwmon core. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pwm-fan) Add optional regulator supportStefan Wahren2019-02-231-1/+42
| | | | | | | | This adds optional regulator support to the pwm-fan driver. This is necessary for pwm fans which are powered by a switchable supply. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (f71882fg) Mark expected switch fall-throughGustavo A. R. Silva2019-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/hwmon/f71882fg.c: In function ‘f71882fg_probe’: drivers/hwmon/f71882fg.c:2457:33: warning: this statement may fall through [-Wimplicit-fallthrough=] data->auto_point_temp_signed = 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/hwmon/f71882fg.c:2459:3: note: here case f71889fg: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ad7418) Catch I2C errorsBrandon Maier2019-02-181-15/+48
| | | | | | | | If there is an i2c failure, the ad7416 reports its temperature as 0C. Return an error code so users can properly detect errors. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm85) add support for LM96000 high frequenciesJeremy Gebben2019-02-181-0/+9
| | | | | | | | The LM96000 expands the freqency field from 3 to 4 bits, to add more frequencies in the 22.5 to 30 kHz ranges. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm85) support the LM96000Jeremy Gebben2019-02-181-2/+7
| | | | | | | It has been supported as a generic lm85 for quite some time. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm85) remove freq_map size hardcodesJeremy Gebben2019-02-181-10/+15
| | | | | | | Allow support for chips that support more than 8 frequencies. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (occ) Fix license headersEddie James2019-02-185-15/+10Star
| | | | | | | Files have inconsistent license information. Signed-off-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (via-cputemp) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-8/+7Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (vexpress-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-15/+10Star
| | | | | | | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (tmp421) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-2/+2
| | | | | | | | | | | | | 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>
* hwmon: (tmp103) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-12/+8Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (tmp102) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-2/+2
| | | | | | | | | | | | | 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>
* hwmon: (tc74) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-2/+2
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (tc654) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-33/+27Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (stts751) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-32/+32
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (smsc47b397) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-12/+12
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (sht3x) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-34/+16Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (sht21) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-10/+7Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (sht15) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-20/+14Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (scpi-hwmon) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-2/+2
| | | | | | | | | | | | | 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>
* hwmon: (scmi-hwmon) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-1/+1
| | | | | | | | | | | | | 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>
* hwmon: (sch5636) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-101/+101
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (sch5627) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-73/+73
| | | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (powr1220) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-92/+52Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (pc87427) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-171/+146Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (pc87360) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-223/+204Star
| | | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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. Cc: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nsa320-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-4/+4
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (nct7904) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-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>
* hwmon: (mc13783-adc) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-23/+26
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max6650) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-3/+3
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max6642) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-15/+16
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max6639) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-49/+43Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max31790) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-3/+3
| | | | | | | | | | | | | 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>
* hwmon: (max31722) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-5/+3Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max1619) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-18/+15Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (max16065) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-143/+82Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (ltc4261) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-18/+10Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (adm1029) Add a comment for locking mutexCorentin Labbe2019-02-181-1/+1
| | | | | | | | Checkpatch complains that mutex does not have any comment. This patch fix that. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) Fix function alignmentCorentin Labbe2019-02-181-3/+3
| | | | | | | | This patch fix the "Alignment should match open parenthesis" checkpatch warning. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) Fix Logical continuations should be on the previous line ↵Corentin Labbe2019-02-181-7/+6Star
| | | | | | | | | checkpatch warning This patchs fix the "Logical continuations should be on the previous line" checkpatch warning. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) Add blank line after declarationsCorentin Labbe2019-02-181-0/+4
| | | | | | | As requested by checkpatch, this patch adds a blank line after declarations Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) replace S_IXXX macros by their numeric valuesCorentin Labbe2019-02-181-21/+16Star
| | | | | | | As requested by checkpatch, this patch replace S_IXXX macros by their numeric values. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) Add SPDX headerCorentin Labbe2019-02-181-0/+1
| | | | | | | This patch addes SPDX header to adm1029 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1029) Remove write to FFF paragraphCorentin Labbe2019-02-181-4/+0Star
| | | | | | | As suggested by checkpatch, remove the "write to FFF" paragraph. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ina3221) Implement ti,single-shot DT propertyNicolin Chen2019-02-181-0/+19
| | | | | | | | | | | | | | | | By default, ina3221, as a hardware monitor, continuously measures the inputs and generates corresponding data. However, for battery powered devices, this mode might be power consuming. The DT binding doc is updated with a new boolean type property to allow changing the default operating mode from consuming mode to single-shot mode, which will measure input on demand and then shut down to save power. So this patch implements the DT property accordingly. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ltc4245) Replace S_<PERMS> with octal valuesGuenter Roeck2019-02-181-4/+4
| | | | | | | | | | | | | 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>
* hwmon: (ltc4222) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-31/+25Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>
* hwmon: (ltc4151) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-7/+4Star
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver 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>