From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Mårten Lindahl" <marten.lindahl@axis.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] regulator: fix pickable ranges vsel caching
Date: Mon, 20 May 2024 15:31:02 +0300 [thread overview]
Message-ID: <ZktChruNV_Jc4j4u@fedora> (raw)
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
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/cover.1715848512.git.mazziesaccount@gmail.com/
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(-)
--
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 =]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
reply other threads:[~2024-05-20 12:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZktChruNV_Jc4j4u@fedora \
--to=mazziesaccount@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marten.lindahl@axis.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox