[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/ytmh9QrXN9Tw17@sirena.org.uk>
Date: Mon, 27 Feb 2023 13:18:18 +0000
From: Mark Brown <broonie@...nel.org>
To: Sascha Hauer <sha@...gutronix.de>
Cc: linux-kernel@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>,
kernel@...gutronix.de, linux-arm-kernel@...ts.infradead.org
Subject: Re: About regulator error events
On Mon, Feb 27, 2023 at 02:05:42PM +0100, Sascha Hauer wrote:
> The strategy I had in mind was to disable the regulator, enable it again
> to see if the errors persists and if it does, permanently disable the
> device. Disabling the regulator only works though when there's only one
> consumer. With multiple consumers only the enable count decreases, but
Might also be a good idea to turn off any other supplies to the device
as well but yes.
> A first good step might be to notify the user somehow. While we can get
> the overcurrent status of a regulator from
> /sys/class/regulator/*/over_current there doesn't seem to be any way to
> get a regulator event in userspace, right? Would patches changing that
> be welcomed?
Sure.
> There doesn't seem to be much prior art for handling regulator error
> events in the kernel. It would be great to get some input what others do
> in this situation, or to get some ideas what they would do if they had
> the time to do so ;)
The general issue is that if the regulators get upset enough to start
complaining something has generally gone really badly wrong and there
isn't anything constructive that can be done other than logging. You
might potentially want to power off the system as a whole or something
too. I do think any big actions are going to be userspace policy
things.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists