Commit ed35905
hwmon: (pmbus) Fix vout margin caching
The code currently uses a zero margin to mean not cached, but this
results in the cache being bypassed if the (low) margin is set to zero,
leading to lots of unnecessary SMBus transactions in that case. Use a
negative value instead.
Fixes: 07fb762 ("hwmon: (pmbus) Introduce and use cached vout margins")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20220816144414.2358974-1-vincent.whitchurch@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>1 parent 09e52d1 commit ed35905
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2861 | 2861 | | |
2862 | 2862 | | |
2863 | 2863 | | |
2864 | | - | |
| 2864 | + | |
2865 | 2865 | | |
2866 | 2866 | | |
2867 | 2867 | | |
| |||
2887 | 2887 | | |
2888 | 2888 | | |
2889 | 2889 | | |
2890 | | - | |
| 2890 | + | |
2891 | 2891 | | |
2892 | 2892 | | |
2893 | 2893 | | |
| |||
3319 | 3319 | | |
3320 | 3320 | | |
3321 | 3321 | | |
| 3322 | + | |
3322 | 3323 | | |
3323 | 3324 | | |
3324 | 3325 | | |
| |||
3352 | 3353 | | |
3353 | 3354 | | |
3354 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
3355 | 3361 | | |
3356 | 3362 | | |
3357 | 3363 | | |
| |||
0 commit comments