From: Benjamin Bara <bbara93@gmail.com>
To: mazziesaccount@gmail.com
Cc: DLG-Adam.Ward.opensource@dm.renesas.com, bbara93@gmail.com,
benjamin.bara@skidata.com, broonie@kernel.org,
lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
support.opensource@diasemi.com
Subject: Re: [PATCH RFC v3 1/5] regulator: move monitor handling into own function
Date: Tue, 23 May 2023 13:51:01 +0200 [thread overview]
Message-ID: <20230523115101.627722-1-bbara93@gmail.com> (raw)
In-Reply-To: <9641aa06-4925-051c-2ebe-22e43bf9dd4f@gmail.com>
Hi Matti,
thanks for the feedback!
On Tue, 23 May 2023 at 11:46, Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> As far as I see, this changes the existing logic. Previously the
> monitoring was unconditionally enabled for all regulators, now it gets
> only enabled for regulators which are marked as enabled.
>
> Furthermore, if I am not reading this wrong, the code tries to disable
> all protections if regulator is not enabled at startup(?)
>
> I am not saying this is wrong. I am just saying that things will
> change here and likely to break something.
>
> There are PMICs like ROHM BD9576, where the protection can not be
> disabled.
Thanks for letting me know! I dropped my initial "disable monitor while
disabling the regulator" property, and activated it per default instead.
But this basically means something like that will be required. I guess
it might make sense to have a property which is called something like
"monitor always on", to let the driver inform the core that the monitors
cannot or should not be disabled, instead.
Except if you think there is a general problem with keeping monitors
disabled while the regulator is disabled, then I might have to do it
differently.
> I am unsure if we might also have cases where some regulator could
> really be enabled w/o core knowing it.
Unfortunately, I am not 100% sure what you mean by that.
On the da9063, for example, it might be possible that a monitor is
activated by the OTP, without that the kernel actually activates it.
I think it is not recommended, but it is possible.
> There can also be a problem if we have hardware where monitoring is
> common for all regulators, eg either globally enabled / disabled.
Yes, but I think in this case it should be the responsibility of the
driver to ensure that either all or no regulator is monitored, because
the same requirement is valid for implementing the protection ops.
Best regards,
Benjamin
next prev parent reply other threads:[~2023-05-23 11:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-21 11:39 [PATCH RFC v3 0/5] regulator: dynamic voltage monitoring support Benjamin Bara
2023-05-21 11:39 ` [PATCH RFC v3 1/5] regulator: move monitor handling into own function Benjamin Bara
2023-05-23 9:46 ` Matti Vaittinen
2023-05-23 11:51 ` Benjamin Bara [this message]
2023-05-24 7:28 ` Matti Vaittinen
2023-05-24 10:47 ` Mark Brown
2023-06-13 7:33 ` Benjamin Bara
2023-05-21 11:39 ` [PATCH RFC v3 2/5] regulator: disable monitors when regulator is disabled Benjamin Bara
2023-05-21 11:39 ` [PATCH RFC v3 3/5] regulator: add getter for active monitors Benjamin Bara
2023-05-21 11:39 ` [PATCH RFC v3 4/5] regulator: add properties to handle monitoring on state change Benjamin Bara
2023-05-21 11:39 ` [PATCH RFC v3 5/5] regulator: bd718x7: let the core handle the monitors Benjamin Bara
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=20230523115101.627722-1-bbara93@gmail.com \
--to=bbara93@gmail.com \
--cc=DLG-Adam.Ward.opensource@dm.renesas.com \
--cc=benjamin.bara@skidata.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=support.opensource@diasemi.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
all inboxes | Powered by JetHome®