|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7 |
|
| #
d8a66f36 |
| 30-Apr-2024 |
Uwe Kleine-König <[email protected]> |
hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member.
Thi
hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own.
Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6 |
|
| #
729f1f73 |
| 10-Jun-2023 |
Mark Brown <[email protected]> |
hwmon: (tmp102) Use maple tree register cache
The tmp102 is only capable of performing single register read and write operations which means it gains no advantage from using a rbtree register cache,
hwmon: (tmp102) Use maple tree register cache
The tmp102 is only capable of performing single register read and write operations which means it gains no advantage from using a rbtree register cache, convert it to using the more modern maple tree register cache instead. This should be more efficient.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1 |
|
| #
1975d167 |
| 05-May-2023 |
Uwe Kleine-König <[email protected]> |
hwmon: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 (
hwmon: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver.
Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] [groeck: Added missing change in pmbus/acbel-fsg032.c] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v6.3, v6.3-rc7, v6.3-rc6 |
|
| #
fc3ad668 |
| 06-Apr-2023 |
Krzysztof Kozlowski <[email protected]> |
hwmon: tmp102: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlow
hwmon: tmp102: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made const for safety.
Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7 |
|
| #
73568f92 |
| 25-Sep-2022 |
Jonathan Cameron <[email protected]> |
hwmon: (tmp102) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
These newer PM macros allow the compiler to see what code it can remove if !CONFIG_PM_SLEEP. This allows the removal of #ifdef
hwmon: (tmp102) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
These newer PM macros allow the compiler to see what code it can remove if !CONFIG_PM_SLEEP. This allows the removal of #ifdef guards whilst achieving the same result.
Signed-off-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1 |
|
| #
67487038 |
| 13-Aug-2020 |
Stephen Kitt <[email protected]> |
hwmon: use simple i2c probe function
Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by
hwmon: use simple i2c probe function
Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by calling i2c_match_id explicitly.
This avoids scanning the identifier tables during probes.
Drivers which didn't use the id are converted as-is; drivers which did are modified as follows:
* if the information in i2c_client is sufficient, that's used instead (client->name); * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before.
A few drivers aren't included in this patch because they have a different set of maintainers. They will be covered by other patches.
Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1, v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2, v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6, v5.3-rc5, v5.3-rc4, v5.3-rc3, v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6, v5.2-rc5, v5.2-rc4, v5.2-rc3 |
|
| #
c942fddf |
| 27-May-2019 |
Thomas Gleixner <[email protected]> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6, v5.1-rc5, v5.1-rc4 |
|
| #
07af9a4a |
| 04-Apr-2019 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Fix build warning
If CONFIG_OF is not enabled, the following build warning is observed.
drivers/hwmon/tmp102.c:324:34: warning: ‘tmp102_of_match’ defined but not used
Mark it as _
hwmon: (tmp102) Fix build warning
If CONFIG_OF is not enabled, the following build warning is observed.
drivers/hwmon/tmp102.c:324:34: warning: ‘tmp102_of_match’ defined but not used
Mark it as __maybe_unused to fix the problem.
Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v5.1-rc3 |
|
| #
88078254 |
| 31-Mar-2019 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Use HWMON_CHANNEL_INFO macro
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read.
The conversion was done automatic
hwmon: (tmp102) Use HWMON_CHANNEL_INFO macro
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read.
The conversion was done automatically with coccinelle. The semantic patch used to make this change is as follows.
@r@ initializer list elements; identifier i; @@
-u32 i[] = { - elements, - 0 -};
@s@ identifier r.i,j,ty; @@
-struct hwmon_channel_info j = { - .type = ty, - .config = i, -};
@script:ocaml t@ ty << s.ty; elements << r.elements; shorter; elems; @@
shorter := make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty))); elems := make_ident (String.concat "," (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x) (Str.split (Str.regexp " , ") elements)))
@@ identifier s.j,t.shorter; identifier t.elems; @@
- &j + HWMON_CHANNEL_INFO(shorter,elems)
This patch does not introduce functional changes. Many thanks to Julia Lawall for providing the semantic patch.
Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v5.1-rc2, v5.1-rc1, v5.0, v5.0-rc8, v5.0-rc7, v5.0-rc6, v5.0-rc5, v5.0-rc4, v5.0-rc3, v5.0-rc2, v5.0-rc1, v4.20, v4.20-rc7 |
|
| #
51148a23 |
| 10-Dec-2018 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) 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
hwmon: (tmp102) 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 <[email protected]>
show more ...
|
|
Revision tags: v4.20-rc6, v4.20-rc5, v4.20-rc4, v4.20-rc3, v4.20-rc2, v4.20-rc1, v4.19, v4.19-rc8, v4.19-rc7, v4.19-rc6, v4.19-rc5, v4.19-rc4, v4.19-rc3, v4.19-rc2 |
|
| #
1c96a2f6 |
| 01-Sep-2018 |
David Frey <[email protected]> |
regmap: split up regmap_config.use_single_rw
Split regmap_config.use_single_rw into use_single_read and use_single_write. This change enables drivers of devices which only support bulk operations in
regmap: split up regmap_config.use_single_rw
Split regmap_config.use_single_rw into use_single_read and use_single_write. This change enables drivers of devices which only support bulk operations in one direction to use the regmap_bulk_*() functions for both directions and have their bulk operation split into single operations only when necessary.
Update all struct regmap_config instances where use_single_rw==true to instead set both use_single_read and use_single_write. No attempt was made to evaluate whether it is possible to set only one of use_single_read or use_single_write.
Signed-off-by: David Frey <[email protected]> Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v4.19-rc1, v4.18, v4.18-rc8, v4.18-rc7, v4.18-rc6, v4.18-rc5, v4.18-rc4, v4.18-rc3, v4.18-rc2, v4.18-rc1, v4.17, v4.17-rc7, v4.17-rc6, v4.17-rc5, v4.17-rc4, v4.17-rc3, v4.17-rc2, v4.17-rc1, v4.16, v4.16-rc7, v4.16-rc6, v4.16-rc5, v4.16-rc4, v4.16-rc3, v4.16-rc2, v4.16-rc1, v4.15, v4.15-rc9, v4.15-rc8, v4.15-rc7, v4.15-rc6, v4.15-rc5, v4.15-rc4, v4.15-rc3, v4.15-rc2, v4.15-rc1, v4.14, v4.14-rc8, v4.14-rc7 |
|
| #
d0725439 |
| 24-Oct-2017 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Fix first temperature reading
Commit 3d8f7a89a197 ("hwmon: (tmp102) Improve handling of initial read delay") reduced the initial temperature read delay and made it dependent on the c
hwmon: (tmp102) Fix first temperature reading
Commit 3d8f7a89a197 ("hwmon: (tmp102) Improve handling of initial read delay") reduced the initial temperature read delay and made it dependent on the chip's shutdown mode. If the chip was not in shutdown mode at probe, the read delay no longer applies.
This ignores the fact that the chip initialization changes the temperature sensor resolution, and that the temperature register values change when the resolution is changed. As a result, the reported temperature is twice as high as the real temperature until the first temperature conversion after the configuration change is complete. This can result in unexpected behavior and, worst case, in a system shutdown. To fix the problem, let's just always wait for a conversion to complete before reporting a temperature.
Fixes: 3d8f7a89a197 ("hwmon: (tmp102) Improve handling of initial read delay") Link: https://bugzilla.kernel.org/show_bug.cgi?id=197167 Reported-by: Ralf Goebel <[email protected]> Cc: Ralf Goebel <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc6, v4.14-rc5, v4.14-rc4, v4.14-rc3, v4.14-rc2, v4.14-rc1, v4.13, v4.13-rc7, v4.13-rc6, v4.13-rc5, v4.13-rc4, v4.13-rc3, v4.13-rc2, v4.13-rc1, v4.12, v4.12-rc7, v4.12-rc6, v4.12-rc5, v4.12-rc4, v4.12-rc3, v4.12-rc2, v4.12-rc1, v4.11, v4.11-rc8, v4.11-rc7, v4.11-rc6, v4.11-rc5, v4.11-rc4, v4.11-rc3, v4.11-rc2, v4.11-rc1 |
|
| #
15390c61 |
| 24-Feb-2017 |
Javier Martinez Canillas <[email protected]> |
hwmon: (tmp102) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device
hwmon: (tmp102) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>.
But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF.
Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v4.10, v4.10-rc8, v4.10-rc7, v4.10-rc6, v4.10-rc5, v4.10-rc4, v4.10-rc3, v4.10-rc2, v4.10-rc1, v4.9, v4.9-rc8, v4.9-rc7, v4.9-rc6, v4.9-rc5, v4.9-rc4, v4.9-rc3, v4.9-rc2, v4.9-rc1, v4.8, v4.8-rc8, v4.8-rc7, v4.8-rc6, v4.8-rc5, v4.8-rc4, v4.8-rc3, v4.8-rc2, v4.8-rc1, v4.7, v4.7-rc7, v4.7-rc6, v4.7-rc5 |
|
| #
0208531d |
| 20-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Convert to use new hwmon registration API
Simplify code and reduce code size by using the new hwmon registration API.
Signed-off-by: Guenter Roeck <[email protected]>
|
| #
1aa4f028 |
| 25-Jul-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Improve error handling
Use devm_add_action_or_reset() instead of devm_add_action(), and check its return code.
Signed-off-by: Guenter Roeck <[email protected]>
|
| #
28a340db |
| 20-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Convert to use regmap, and drop local cache
By converting the driver to regmap, we can use regmap to cache non-volatile registers. Stop caching the temperature register; while potent
hwmon: (tmp102) Convert to use regmap, and drop local cache
By converting the driver to regmap, we can use regmap to cache non-volatile registers. Stop caching the temperature register; while potentially reading it more often can result in reading it more often than necessary, this is offset by the gain due to not re-reading the limit registers.
A positive side effect of this change is that limit registers can now be read and updated before the first temperature conversion is complete.
Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
| #
a9f92ccf |
| 22-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Rework chip configuration
So far the chip was forced into polarity 0, even if it was preconfigured differently. Do not touch the polarity when configuring the chip.
Also, the config
hwmon: (tmp102) Rework chip configuration
So far the chip was forced into polarity 0, even if it was preconfigured differently. Do not touch the polarity when configuring the chip.
Also, the configuration register was read beack to check if the configuration 'sticks'. Ultimately, that is similar to checking if the chip is a tmp102 in the first place. Checking if a write into the configuration register was successful is really not the way to do it, and quite risky if the chip is not a tmp102, so drop that check. Instead, verify if the configuration register has unexpected bits set before writing into it.
Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v4.7-rc4 |
|
| #
3d8f7a89 |
| 20-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Improve handling of initial read delay
If the chip was in shutdown mode when the driver was loaded, the first conversion is ready no more than 35 milli-seconds after the chip was tak
hwmon: (tmp102) Improve handling of initial read delay
If the chip was in shutdown mode when the driver was loaded, the first conversion is ready no more than 35 milli-seconds after the chip was taken out of shutdown. The driver delay was so far set to 333 ms (HZ / 3), which is much higher than the maximum time needed by the chip. Reduce the time to 35 milli-seconds.
Introduce a 'valid' flag to ensure that sensor data is actually read even if requested less than 333 ms after the driver was loaded.
Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
| #
4e6163e8 |
| 22-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Drop FSF address
The FSF address can change, so drop it from the driver.
Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
|
| #
b17ea1ca |
| 20-Jun-2016 |
Guenter Roeck <[email protected]> |
hwmon: (tmp102) Use devm_add_action to register cleanup function
By registering a cleanup function with devm_add_action(), we can simplify the error path in the probe function and drop the remove fu
hwmon: (tmp102) Use devm_add_action to register cleanup function
By registering a cleanup function with devm_add_action(), we can simplify the error path in the probe function and drop the remove function entirely.
Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v4.7-rc3, v4.7-rc2, v4.7-rc1, v4.6, v4.6-rc7, v4.6-rc6, v4.6-rc5, v4.6-rc4, v4.6-rc3, v4.6-rc2, v4.6-rc1, v4.5 |
|
| #
51b77fd7 |
| 09-Mar-2016 |
Eduardo Valentin <[email protected]> |
hwmon: convert tmp102 to use devm_thermal_zone_of_sensor_register
This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister c
hwmon: convert tmp102 to use devm_thermal_zone_of_sensor_register
This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls.
Cc: Jean Delvare <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
show more ...
|
|
Revision tags: v4.5-rc7, v4.5-rc6, v4.5-rc5, v4.5-rc4, v4.5-rc3, v4.5-rc2, v4.5-rc1, v4.4, v4.4-rc8, v4.4-rc7, v4.4-rc6, v4.4-rc5, v4.4-rc4 |
|
| #
00917b5c |
| 01-Dec-2015 |
Nishanth Menon <[email protected]> |
hwmon: (tmp102) Force wait for conversion time for the first valid data
TMP102 works based on conversions done periodically. However, as per the TMP102 data sheet[1] the first conversion is triggere
hwmon: (tmp102) Force wait for conversion time for the first valid data
TMP102 works based on conversions done periodically. However, as per the TMP102 data sheet[1] the first conversion is triggered immediately after we program the configuration register. The temperature data registers do not reflect proper data until the first conversion is complete (in our case HZ/4).
The driver currently sets the last_update to be jiffies - HZ, just after the configuration is complete. When TMP102 driver registers with the thermal framework, it immediately tries to read the sensor temperature data. This takes place even before the conversion on the TMP102 is complete and results in an invalid temperature read.
Depending on the value read, this may cause thermal framework to assume that a critical temperature event has occurred and attempts to shutdown the system.
Instead of causing an invalid mid-conversion value to be read erroneously, we mark the last_update to be in-line with the current jiffies. This allows the tmp102_update_device function to skip update until the required conversion time is complete. Further, we ensure to return -EAGAIN result instead of returning spurious temperature (such as 0C) values to the caller to prevent any wrong decisions made with such values. NOTE: this allows the read functions not to be blocking and allows the callers to make the decision if they would like to block or try again later. At least the current user(thermal) seems to handle this by retrying later.
A simpler alternative approach could be to sleep in the probe for the duration required, but that will result in latency that is undesirable and delay boot sequence un-necessarily.
[1] http://www.ti.com/lit/ds/symlink/tmp102.pdf
Cc: Eduardo Valentin <[email protected]> Reported-by: Aparna Balasubramanian <[email protected]> Reported-by: Elvita Lobo <[email protected]> Reported-by: Yan Liu <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v4.4-rc3, v4.4-rc2, v4.4-rc1, v4.3, v4.3-rc7, v4.3-rc6, v4.3-rc5, v4.3-rc4, v4.3-rc3, v4.3-rc2, v4.3-rc1, v4.2, v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4 |
|
| #
17e8351a |
| 24-Jul-2015 |
Sascha Hauer <[email protected]> |
thermal: consistently use int for temperatures
The thermal code uses int, long and unsigned long for temperatures in different places.
Using an unsigned type limits the thermal framework to positiv
thermal: consistently use int for temperatures
The thermal code uses int, long and unsigned long for temperatures in different places.
Using an unsigned type limits the thermal framework to positive temperatures without need. Also several drivers currently will report temperatures near UINT_MAX for temperatures below 0°C. This will probably immediately shut the machine down due to overtemperature if started below 0°C.
'long' is 64bit on several architectures. This is not needed since INT_MAX °mC is above the melting point of all known materials.
Consistently use a plain 'int' for temperatures throughout the thermal code and the drivers. This only changes the places in the drivers where the temperature is passed around as pointer, when drivers internally use another type this is not changed.
Signed-off-by: Sascha Hauer <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Reviewed-by: Lukasz Majewski <[email protected]> Reviewed-by: Darren Hart <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Peter Feuerer <[email protected]> Cc: Punit Agrawal <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Eduardo Valentin <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Jean Delvare <[email protected]> Cc: Peter Feuerer <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Thierry Reding <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Guenter Roeck <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Darren Hart <[email protected]> Cc: [email protected] Signed-off-by: Zhang Rui <[email protected]>
show more ...
|
|
Revision tags: v4.2-rc3, v4.2-rc2, v4.2-rc1, v4.1, v4.1-rc8, v4.1-rc7, v4.1-rc6, v4.1-rc5, v4.1-rc4, v4.1-rc3, v4.1-rc2, v4.1-rc1, v4.0, v4.0-rc7, v4.0-rc6, v4.0-rc5, v4.0-rc4, v4.0-rc3, v4.0-rc2, v4.0-rc1, v3.19 |
|
| #
dd378b1b |
| 03-Feb-2015 |
Grygorii Strashko <[email protected]> |
hwmon: (tmp102) add hibernation callbacks
Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by us
hwmon: (tmp102) add hibernation callbacks
Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move mp102_suspend/tmp102_resume under CONFIG_PM_SLEEP to avoid build warnings.
Signed-off-by: Grygorii Strashko <[email protected]> [groeck: Declare tmp102_dev_pm_ops as static variable] Signed-off-by: Guenter Roeck <[email protected]>
show more ...
|
|
Revision tags: v3.19-rc7, v3.19-rc6, v3.19-rc5, v3.19-rc4, v3.19-rc3, v3.19-rc2, v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6, v3.18-rc5, v3.18-rc4 |
|
| #
2251aef6 |
| 08-Nov-2014 |
Eduardo Valentin <[email protected]> |
thermal: of: improve of-thermal sensor registration API
Different drivers request API extensions in of-thermal. For this reason, additional callbacks are required to fit the new drivers needs.
The
thermal: of: improve of-thermal sensor registration API
Different drivers request API extensions in of-thermal. For this reason, additional callbacks are required to fit the new drivers needs.
The current API implementation expects the registering sensor driver to provide a get_temp and get_trend callbacks as function parameters. As the amount of callbacks is growing, this patch changes the existing implementation to use a .ops field to hold all the of thermal callbacks to sensor drivers.
This patch also changes the existing of-thermal users to fit the new API design. No functional change is introduced in this patch.
Cc: Alexandre Courbot <[email protected]> Cc: [email protected] Cc: Grant Likely <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Jean Delvare <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Rob Herring <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Zhang Rui <[email protected]> Acked-by: Guenter Roeck <[email protected]> Tested-by: Mikko Perttunen <[email protected]> Reviewed-by: Mikko Perttunen <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Reviewed-by: Lukasz Majewski <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
show more ...
|