lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230419-dynamic-vmon-v1-0-f48b7438e891@skidata.com>
Date:   Thu, 20 Apr 2023 12:29:19 +0200
From:   Benjamin Bara <bbara93@...il.com>
To:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, support.opensource@...semi.com
Cc:     DLG-Adam.Ward.opensource@...renesas.com,
        linux-kernel@...r.kernel.org,
        Matti Vaittinen <mazziesaccount@...il.com>,
        Benjamin Bara <benjamin.bara@...data.com>
Subject: [PATCH RFC 0/2] regulator: dynamic voltage monitoring support

Hi!

This series targets the "automatic" state handling of voltage monitors
when the state of the monitored regulator is changed. This is e.g.
necessary for the da9063, which reaches an invalid state (!PWR_OK) if
the voltage monitor is not disabled before the regulator is disabled.
The problem could also be tackled inside of the driver's "state change
ops" (.enable(), .disable(), ...) but I thought it might be a good idea
to have a "common framework" independent of the driver's implementation.
Not sure if a good idea, therefore RFC.

For now, 1/2 implements so-called "monitoring constraints", but for now
only for under- and overvoltage monitoring. 
2/2 depends on [1], which implements (static) voltage monitoring for the
da9063. It shows a basic example how to use these constraints.

What's not targeted (for now) are possibly required delay times between
monitor state change and regulator state change. For the da9063, these
are not required but I can imagine there are other regulators where they
might be needed?

Possible next step:
"regulators-{uv,ov}-{warn,error,protection}-enable" dt property on chip
level, with either 1 or 0, to en-/disable the dynamic voltage monitoring
for every regulator of the chip. This would require the regulator's
set_{over,under}_voltage_protection() to work with limit = 1.

Thanks & best regards,
Benjamin

[1] https://lore.kernel.org/all/20230403-da9063-disable-unused-v3-0-cc4dc698864c@skidata.com/

---
Benjamin Bara (2):
      regulator: introduce regulator monitoring constraints
      regulator: da9063: disable monitoring while regulator is off

 drivers/regulator/core.c             | 155 +++++++++++++++++++++++++++++++----
 drivers/regulator/da9063-regulator.c |  17 +++-
 include/linux/regulator/machine.h    |  34 ++++++++
 3 files changed, 190 insertions(+), 16 deletions(-)
---
base-commit: 6a8f57ae2eb07ab39a6f0ccad60c760743051026
change-id: 20230419-dynamic-vmon-e08daa0ac7ad

Best regards,
-- 
Benjamin Bara <benjamin.bara@...data.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ