- 16 Dec, 2018 40 commits
-
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Guenter Roeck authored
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>
-
Pu Wen authored
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>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/blob/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/blob/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocciSigned-off-by: Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Introduce SENSOR_DEVICE_ATTR_{RO,RW,WO} and SENSOR_DEVICE_ATTR_2_{RO,RW,WO} as simplified variants of SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 to simplify the source code, improve readbility, and reduce the chance of inconsistencies. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Jagan Teki authored
The STLM75 is a high-precision digital CMOS temperature sensor IC with a sigma-delta temperature-to-digital converter. The configuration register mapping is similar to existing lm75 but the sample rate is 150ms(max). Tested on real hardware and verified temperature readings are correct. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Thierry Reding authored
The TI TMP451 temperature sensors are compatible with the National LM90 temperature sensors. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Rosin authored
Sort the entries while at it. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Rosin authored
Use an enum to index the array, so that it is possible to add sorted entries without causing churn. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Rosin authored
More of the same... Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Peter Rosin authored
These are Negative Temperature Coefficient thermistors, like the others in the list. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Colin Ian King authored
There is a spelling mistake in the module description text, fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Corentin Labbe authored
This patch remove extra space after a dot. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Corentin Labbe authored
This patch fix a typo where build is used instead of built. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Michele Sorcinelli authored
Allow the module to be loaded on Dell XPS 9570, without having to provide the "force=1" option. Signed-off-by: Michele Sorcinelli <michelesr@autistici.org> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Vadim Pasternak authored
Modify macros for tachometer fault status reading for making it more simple and clear. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
There are a few sysfs entries being exposed to user space by the ina2xx hwmon driver while not getting explicitly documented. So this patch just adds a description section for them. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Rob Herring authored
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Heiko Stuebner authored
The tmp108 does have an alert output that can be used as interrupt source and can of course also be used as part of a thermal sensor setup for things like thermal-based cpu frequencies, so document the necessary properties. Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
According to the code right before the removed line, data->kind should be either from DT or from id pointer. So there shouldn't be an additional overwriting after the if-else statement. So this patch just removes the overwriting line. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
If all three channels are disabled via in[123]_enable ABI, the driver could suspend the chip for power saving purpose. So this patch adds the PM runtime support in order to gain more power control than system suspend and resume use case. For PM runtime, there are a few related changes happening: 1) Added a new pm_dev device pointer for all the PM runtime callbacks. This is because hwmon core registers a child device for each hwmon driver and passes it back to each driver. So there might be a mismatch between two device pointers in the driver if mixing using them. 2) Added a check in ina3221_is_enabled() to make sure that the chip is resumed. 3) Bypassed the unchanged status in ina3221_write_enable() in order to keep the PM runtime refcount being matched. 4) Removed the reset routine in the probe() by calling the resume() via pm_runtime_get_sync() instead, as they're similar. It's also necessary to do so to match initial PM refcount with the number of enabled channels. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
The data might need some time to get ready after channel enabling, although the data register is always readable. The CVRF bit is to indicate that data conversion is finished, so polling the CVRF bit before data reading could ensure the result being valid. An alternative way could be to wait for expected time between the channel enabling and the data reading. And this could avoid extra I2C communications. However, INA3221 seemly takes longer time than what's stated in the datasheet. Test results show that sometimes it couldn't finish data conversion in time. So this patch plays safe by adding a CVRF polling to make sure the data register is updated with the new data. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
This change adds a mutex to serialize accesses of sysfs attributes. This is required when polling CVRF bit of the MASK/ENABLE register because this bit is cleared on a read of this MASK/ENABLE register or a write to CONFIG register, which means that this bit might be accidentally cleared by reading other fields like alert flags. So this patch adds a mutex lock to protect the write() and read() callbacks. The read_string() callback won't need the lock since it just returns the label without touching any hardware register. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-
Nicolin Chen authored
There is nothing critically wrong to read these two attributes without having a is_enabled() check at this point. But reading the MASK_ENABLE register would clear the CVRF bit according to the datasheet. So it'd be safer to fence for disabled channels in order to add pm runtime feature. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-