regulator: fix pickable ranges vsel caching
Get series with b4
b4 am ZktChruNV_Jc4j4u@fedoraVersions newest first
- v2 Latest2 patches 2 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | regulator: pickable ranges: don't always cache vseldrivers/ include/ | +33 | 1 reply | |
| 2/2 | regulator: tps6287x: Force writing VSEL bitdrivers/ | +1 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] regulator: fix pickable ranges vsel caching
This series addresses a potential problem where the voltage selector for pickable-ranges is used in same fashion as a 'apply-bit'. Eg, when a regulator voltage is changed so that also the range changes, the effect of the range and voltage selector change is not taken into account until the voltage selector is written to hardware. In such case caching the voltage-selector value will cause the voltage range change to not change the actual output voltage.
Patch 1 addresses this issue by adding a flag to regulator desc to advertise this behaviour and by always writing the VSEL register value to hardware if range was changed.
Patch 2 sets that flag to Texsas instrument's tps6287x driver because, according to the data-sheet, the TI's PMICs VSEL register must be always written after the range has been changed. Please note that this has not been tested in TI's hardware but the concept is only quickly verified on ROHM's BD71851. All testing is appreciated.
Revision history:
- v2:
- Change series name to reflect content that is still not merged.
- Drop already applied patches.
- Add patch fixing TI's tps2687x.
- Don't bypass cache for pickable-ranges users who don't have. the 'VSEL as apply' behaviour.
- Bypass cache only if range was changed.
- v1:
https://lore.kernel.org/all/[email protected]/
series is base on regulator/for-next
---
Matti Vaittinen (2):
regulator: pickable ranges: don't always cache vsel
regulator: tps6287x: Force writing VSEL bit
drivers/regulator/helpers.c | 43 ++++++++++++++++++-------- drivers/regulator/tps6287x-regulator.c | 1 + include/linux/regulator/driver.h | 3 ++ 3 files changed, 34 insertions(+), 13 deletions(-)
Signature · 14 lines
2.45.1 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =]