1
0
Fork 0
Commit Graph

3470 Commits (fa7295ab69a32d2bea0fc67ef7e1a2a4c324db1b)

Author SHA1 Message Date
Cheng-Min Ao f422449b58 hwmon: (tmp421) Correct the misspelling of the tmp442 compatible attribute in OF device ID table
Correct a typo in OF device ID table
The last one should be 'ti,tmp442'

Signed-off-by: Cheng-Min Ao <tony_ao@wiwynn.com>
Signed-off-by: Yu-Hsiang Chen <matt_chen@wiwynn.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-01-17 12:54:52 -08:00
Gustavo A. R. Silva b0407d820b hwmon: (occ) Fix potential integer overflow
Cast get_unaligned_be32(...) to u64 in order to give the compiler
complete information about the proper arithmetic to use and avoid
a potential integer overflow.

Notice that such function call is used in contexts that expect
expressions of type u64 (64 bits, unsigned); and the following
expressions are currently being evaluated using 32-bit
arithmetic:

val = get_unaligned_be32(&power->update_tag) *
                        occ->powr_sample_time_us;

val = get_unaligned_be32(&power->vdn.update_tag) *
                        occ->powr_sample_time_us;

Addresses-Coverity-ID: 1442357 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1442476 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1442508 ("Unintentional integer overflow")
Fixes: ff692d80b2e2 ("hwmon (occ): Add sensor types and versions")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-01-07 21:03:59 -08:00
Wei Yongjun 07bd14ccc3 hwmon: (lm80) Fix missing unlock on error in set_fan_div()
Add the missing unlock before return from function set_fan_div()
in the error handling case.

Fixes: c9c6391551 ("hwmon: (lm80) fix a missing check of the status of SMBus read")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-01-06 19:49:14 -08:00
Guenter Roeck 9de15c95a6 hwmon: (nct6775) Enable IO mapping for NCT6797D and NCT6798D
Similar to other recent chips from Nuvoton, IO mapping may be disabled
by default. Enable it when instantiating the driver and after resume.

Fixes: 0599682b82 ("hwmon: (nct6775) Add support for NCT6798D")
Fixes: e41da286a2 ("hwmon: (nct6775) Add support for NCT6797D")
Reported-by: Michael Cook <mcook@mackal.net>
Cc: Michael Cook <mcook@mackal.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-01-06 19:49:14 -08:00
Guenter Roeck 264142bc70 hwmon: (nct6775) Fix chip ID for NCT6798D
The chip ID is 0xd42[8-f], not 0xd45[8-f].

Fixes: 0599682b82 ("hwmon: (nct6775) Add support for NCT6798D")
Reported-by: Michael Cook <mcook@mackal.net>
Cc: Michael Cook <mcook@mackal.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-01-06 19:49:14 -08:00
Linus Torvalds 769e47094d Kconfig updates for v4.21
- support -y option for merge_config.sh to avoid downgrading =y to =m
 
  - remove S_OTHER symbol type, and touch include/config/*.h files correctly
 
  - fix file name and line number in lexer warnings
 
  - fix memory leak when EOF is encountered in quotation
 
  - resolve all shift/reduce conflicts of the parser
 
  - warn no new line at end of file
 
  - make 'source' statement more strict to take only string literal
 
  - rewrite the lexer and remove the keyword lookup table
 
  - convert to SPDX License Identifier
 
  - compile C files independently instead of including them from zconf.y
 
  - fix various warnings of gconfig
 
  - misc cleanups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcJieuAAoJED2LAQed4NsGHlIP/1s0fQ86XD9dIMyHzAO0gh2f
 7rylfe2kEXJgIzJ0DyZdLu4iZtwbkEUqTQrRS1abriNGVemPkfBAnZdM5d92lOQX
 3iREa700AJ2xo7V7gYZ6AbhZoG3p0S9U9Q2qE5S+tFTe8c2Gy4xtjnODF+Vel85r
 S0P8tF5sE1/d00lm+yfMI/CJVfDjyNaMm+aVEnL0kZTPiRkaktjWgo6Fc2p4z1L5
 HFmMMP6/iaXmRZ+tHJGPQ2AT70GFVZw5ePxPcl50EotUP25KHbuUdzs8wDpYm3U/
 rcESVsIFpgqHWmTsdBk6dZk0q8yFZNkMlkaP/aYukVZpUn/N6oAXgTFckYl8dmQL
 fQBkQi6DTfr9EBPVbj18BKm7xI3Y4DdQ2fzTfYkJ2XwNRGFA5r9N3sjd7ZTVGjxC
 aeeMHCwvGdSx1x8PeZAhZfsUHW8xVDMSQiT713+ljBY+6cwzA+2NF0kP7B6OAqwr
 ETFzd4Xu2/lZcL7gQRH8WU3L2S5iedmDG6RnZgJMXI0/9V4qAA+nlsWaCgnl1TgA
 mpxYlLUMrd6AUJevE34FlnyFdk8IMn9iKRFsvF0f3doO5C7QzTVGqFdJu5a0CuWO
 4NBJvZjFT8/4amoWLfnDlfApWXzTfwLbKG+r6V2F30fLuXpYg5LxWhBoGRPYLZSq
 oi4xN1Mpx3TvXz6WcKVZ
 =r3Fl
 -----END PGP SIGNATURE-----

Merge tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

 - support -y option for merge_config.sh to avoid downgrading =y to =m

 - remove S_OTHER symbol type, and touch include/config/*.h files correctly

 - fix file name and line number in lexer warnings

 - fix memory leak when EOF is encountered in quotation

 - resolve all shift/reduce conflicts of the parser

 - warn no new line at end of file

 - make 'source' statement more strict to take only string literal

 - rewrite the lexer and remove the keyword lookup table

 - convert to SPDX License Identifier

 - compile C files independently instead of including them from zconf.y

 - fix various warnings of gconfig

 - misc cleanups

* tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (39 commits)
  kconfig: surround dbg_sym_flags with #ifdef DEBUG to fix gconf warning
  kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings
  kconfig: add static qualifiers to fix gconf warnings
  kconfig: split the lexer out of zconf.y
  kconfig: split some C files out of zconf.y
  kconfig: convert to SPDX License Identifier
  kconfig: remove keyword lookup table entirely
  kconfig: update current_pos in the second lexer
  kconfig: switch to ASSIGN_VAL state in the second lexer
  kconfig: stop associating kconf_id with yylval
  kconfig: refactor end token rules
  kconfig: stop supporting '.' and '/' in unquoted words
  treewide: surround Kconfig file paths with double quotes
  microblaze: surround string default in Kconfig with double quotes
  kconfig: use T_WORD instead of T_VARIABLE for variables
  kconfig: use specific tokens instead of T_ASSIGN for assignments
  kconfig: refactor scanning and parsing "option" properties
  kconfig: use distinct tokens for type and default properties
  kconfig: remove redundant token defines
  kconfig: rename depends_list to comment_option_list
  ...
2018-12-29 13:03:29 -08:00
Linus Torvalds 8754040378 hwmon updates for v4.21
The big change in this series is for the most part automatic: Introducing
 SENSOR[_DEVICE]_ATTR_{RO,RW,WO} variants and conversion of various drivers
 to use it. This is similar to DEVICE_ATTR variants.
 
 Other than that, we have
 - Some conversions of S_<PERMS> with octal values, also automated
 - Added support for Hygon Dhyana CPUs to k10temp driver
 - Added support for STLM75 to lm75 driver
 - B57891S0103 to ntc_thermistor
 - Added pm-runtime support to ina3221 driver
 - Support for PowerPC On-Chip Controller (OCC)
 - Various minor bug fices and improvements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcHbaJAAoJEMsfJm/On5mB+IEP/R79N2zXdhtH3jPYhpdJiUIF
 gwXqP7mO9JliDyQBjqwutO2QE73Zdftr7UWvaryVnBySG3LTRBmDefhD5NyvaSna
 20yl0cIVqbo5cNaXlyhrZRE/ZAy6hyqGNNz28ArmNg9/w3S6dAwIUIrhy06tXrW8
 bOf/k3SGNIRvSeRaFJ/2Agh83e2Vg4ckCUvGW7YIUcXUlhQITO1m71hhqDLt0XY5
 enjpDafg0eSid0Jhy4aMWuiVRMdl7WR+2R+15Pm4HkH3SG/WDqNrpCcybDJoJeIv
 PIsFFj5ctwcnU7IDx12TOuIWJB3hhZyAe+WitYA71VAlWQ39/1FInZ2x1fgxW17Q
 lKQQYQaKa/4qNA44eEFLcsV7NiasOOwWYONWRHOvffCP6PvBmnD6VBZAhbz5dRCP
 8JjmS/yhUY35dPBeTHOXEEbifTMPNajZjQrr3DtyTeuQTeaOBgU/dprJBzU/I1ie
 +NYv0kEvRlWb39wZeiU1Pz93YhIcTy9EunqPhaay9P95AFn/lw1s9Ova+zrJh9oJ
 aYN0sXfSsPaa+EhgqpyzH62r4bn7BVtAIsYyPqcm7z6hGnY9eNQgAC/YQEpqJq0k
 wOlDb+3mLUXDPpnzoI9zg73dajTT3UAqpkjd0/ILpYltcfb5oTfbc/pRsUIjYIT2
 2y7VH2Vb1dFgUlrfmxjM
 =tRyC
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "The big change in this series is for the most part automatic:
  Introducing SENSOR[_DEVICE]_ATTR_{RO,RW,WO} variants and conversion of
  various drivers to use it. This is similar to DEVICE_ATTR variants.

  Other than that, we have

   - Some conversions of S_<PERMS> with octal values, also automated

   - Added support for Hygon Dhyana CPUs to k10temp driver

   - Added support for STLM75 to lm75 driver

   - B57891S0103 to ntc_thermistor

   - Added pm-runtime support to ina3221 driver

   - Support for PowerPC On-Chip Controller (OCC)

   - Various minor bug fices and improvements"

* tag 'hwmon-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (80 commits)
  hwmon: (lm80) fix a missing check of bus read in lm80 probe
  hwmon: (lm80) fix a missing check of the status of SMBus read
  hwmon: (asus_atk0110) Fix debugfs_simple_attr.cocci warnings
  hwmon: (ftsteutates) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (fschmd) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (emc6w201) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (emc2103) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (emc1403) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (ds620) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (ds1621) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (dell-smm-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (da9055-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (da9052-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (coretemp) Replace S_<PERMS> with octal values
  hwmon: (asus_atk0110) Replace S_<PERMS> with octal values
  hwmon: (aspeed-pwm-tacho) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (applesmc) Replace S_<PERMS> with octal values
  hwmon: (amc6821) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (adt7x10) Use permission specific SENSOR[_DEVICE]_ATTR variants
  hwmon: (adt7475) Use permission specific SENSOR[_DEVICE]_ATTR variants
  ...
2018-12-28 19:48:25 -08:00
Linus Torvalds 8465625ab4 Merge branch 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 AMD northbridge updates from Ingo Molnar:
 "Update DF/SMN access and k10temp for AMD F17h M30h, by Brian Woods:

   'Updates the data fabric/system management network code needed to get
    k10temp working for M30h. Since there are now processors which have
    multiple roots per DF/SMN interface, there needs to some logic which
    skips N-1 root complexes per DF/SMN interface. This is because the
    root complexes per interface are redundant (as far as DF/SMN goes).
    These changes shouldn't effect past processors and, for F17h M0Xh,
    the mappings stay the same.'

  The hwmon changes were seen and acked by hwmon maintainer Guenter Roeck"

* 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hwmon/k10temp: Add support for AMD family 17h, model 30h CPUs
  x86/amd_nb: Add PCI device IDs for family 17h, model 30h
  x86/amd_nb: Add support for newer PCI topologies
  hwmon/k10temp, x86/amd_nb: Consolidate shared device IDs
2018-12-26 16:12:50 -08:00
Kangjie Lu 9aa3aa15f4 hwmon: (lm80) fix a missing check of bus read in lm80 probe
In lm80_probe(), if lm80_read_value() fails, it returns a negative
error number which is stored to data->fan[f_min] and will be further
used. We should avoid using the data if the read fails.

The fix checks if lm80_read_value() fails, and if so, returns with the
error number.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-21 15:37:59 -08:00
Kangjie Lu c9c6391551 hwmon: (lm80) fix a missing check of the status of SMBus read
If lm80_read_value() fails, it returns a negative number instead of the
correct read data. Therefore, we should avoid using the data if it
fails.

The fix checks if lm80_read_value() fails, and if so, returns with the
error number.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
[groeck: One variable for return values is enough]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-21 15:37:56 -08:00
Masahiro Yamada 8636a1f967 treewide: surround Kconfig file paths with double quotes
The Kconfig lexer supports special characters such as '.' and '/' in
the parameter context. In my understanding, the reason is just to
support bare file paths in the source statement.

I do not see a good reason to complicate Kconfig for the room of
ambiguity.

The majority of code already surrounds file paths with double quotes,
and it makes sense since file paths are constant string literals.

Make it treewide consistent now.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
2018-12-22 00:25:54 +09:00
YueHaibing f9facc24a6 hwmon: (asus_atk0110) Fix debugfs_simple_attr.cocci warnings
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files.

Semantic patch information:
Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
imposes some significant overhead as compared to
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:47 -08:00
Guenter Roeck 626f5eaed1 hwmon: (ftsteutates) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:46 -08:00
Guenter Roeck 22ed7883c1 hwmon: (fschmd) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:45 -08:00
Guenter Roeck 7a61d7197b hwmon: (emc6w201) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:45 -08:00
Guenter Roeck 94bf70da8a hwmon: (emc2103) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:44 -08:00
Guenter Roeck ae66d2d9e8 hwmon: (emc1403) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:44 -08:00
Guenter Roeck 57549f3360 hwmon: (ds620) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:43 -08:00
Guenter Roeck 0ad85c07a1 hwmon: (ds1621) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:43 -08:00
Guenter Roeck ba949ed62d hwmon: (dell-smm-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: "Pali Rohár" <pali.rohar@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:42 -08:00
Guenter Roeck 4b76a6c9b7 hwmon: (da9055-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: Support Opensource <support.opensource@diasemi.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:42 -08:00
Guenter Roeck 6db587b73f hwmon: (da9052-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: Support Opensource <support.opensource@diasemi.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:41 -08:00
Guenter Roeck 0cd709d0dd hwmon: (coretemp) Replace S_<PERMS> with octal values
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.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:41 -08:00
Guenter Roeck b51c14c736 hwmon: (asus_atk0110) Replace S_<PERMS> with octal values
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.

Cc: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:40 -08:00
Guenter Roeck e98dd5388b hwmon: (aspeed-pwm-tacho) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:39 -08:00
Guenter Roeck 71ee4a4000 hwmon: (applesmc) Replace S_<PERMS> with octal values
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.

Cc: Henrik Rydberg <rydberg@bitmath.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:39 -08:00
Guenter Roeck a7818350f6 hwmon: (amc6821) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:38 -08:00
Guenter Roeck f9fe9de0e6 hwmon: (adt7x10) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:38 -08:00
Guenter Roeck c24f9ba9ad hwmon: (adt7475) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:37 -08:00
Guenter Roeck 42291a5aae hwmon: (adt7470) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:37 -08:00
Guenter Roeck d60a51a690 hwmon: (adt7462) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:36 -08:00
Guenter Roeck 595a86af49 hwmon: (ads7871) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:36 -08:00
Guenter Roeck 3ecd278383 hwmon: (ads7828) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:35 -08:00
Guenter Roeck 7e77d1e76d hwmon: (ads1015) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:35 -08:00
Guenter Roeck cfc5bca6db hwmon: (adm1021) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:34 -08:00
Guenter Roeck b0c130fdaa hwmon: (adcxx) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:33 -08:00
Guenter Roeck 0594462f97 hwmon: (adc128d818) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:33 -08:00
Guenter Roeck 6fdc5d7fa9 hwmon: (ad7418) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:32 -08:00
Guenter Roeck cbf6cb2b7e hwmon: (ad7414) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:32 -08:00
Guenter Roeck 1ba3e02376 hwmon: (ad7314) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:31 -08:00
Guenter Roeck 419eeabc0d hwmon: (acpi_power_meter) Replace S_<PERMS> with octal values
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-12-16 15:13:31 -08:00
Guenter Roeck 4708e96831 hwmon: (abx500) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, 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>
2018-12-16 15:13:30 -08:00
Pu Wen d93217d84c hwmon: (k10temp) Add Hygon Dhyana support
Add support for Hygon Dhyana family 18h processor for k10temp to get the
temperature. As Hygon Dhyana shares the same function interface with AMD
family 17h, so add Hygon PCI Vendor ID and reuse the code path of AMD.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:30 -08:00
Guenter Roeck d7f2a8f596 hwmon: (ltc4215) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:29 -08:00
Guenter Roeck 6a0f234fb4 hwmon: (ina2xx) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:28 -08:00
Guenter Roeck e36917f486 hwmon: (tmp401) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:28 -08:00
Guenter Roeck 740c2f2b86 hwmon: (max6697) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:27 -08:00
Guenter Roeck cb1d85341f hwmon: (pwm-fan) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:27 -08:00
Guenter Roeck c4043410f7 hwmon: (ntc_thermistor) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:26 -08:00
Guenter Roeck 4400711732 hwmon: (max6650) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-12-16 15:13:26 -08:00