linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: AngeloGioacchino Del Regno  <angelogioacchino.delregno@somainline.org>
Cc: matti.vaittinen@fi.rohmeurope.com,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: short-circuit and over-current IRQs
Date: Mon, 1 Feb 2021 13:17:28 +0000	[thread overview]
Message-ID: <20210201131728.GA5960@sirena.org.uk> (raw)
In-Reply-To: <536ce0f7-b299-f39c-15e1-a7c1151d0fd8@somainline.org>

[-- Attachment #1: Type: text/plain, Size: 2602 bytes --]

On Sat, Jan 30, 2021 at 04:43:46PM +0100, AngeloGioacchino Del Regno wrote:
> Il 29/01/21 10:14, Matti Vaittinen ha scritto:

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> > > It's not that we shouldn't implement support for warnings, it's that
> > > they're not the common case for hardware and so won't line up with
> > > behaviour for other users.

> ....but anyway, I have no idea what would you do when a warning is
> triggered: make a good example, please...

> I mean, take for example the "usual display": you are delivering power
> to a DriverIC (which is most of the times undocumented), your display
> starts drawing more than expected, so... uh.. so what?
> You shut it down? You reboot the DrIC?
> I can't imagine a DrIC reboot to restore the power draw...

As I've said several times now if you're getting anywhere near the point
where individual chips are starting to generate this sort of hardwired
alarms rather than specialist hardware monitoring stuff then something
will usually be very badly wrong.  If there's an actual fault developed
then very likely there is nothing that will fix it and it's merely a
case of preventing further or escallating physical damage to the system.
If it's something like a thermal warning then possibly waiting for
things to cool down might help.  The fact that it's hard to do anything
constructive about these issues on an individual device level is why
there's not code doing so upstream, if things have got to this point
then the ship has sailed.

Typical reactions would include things like going down to the lowest
available OPP, turning off some or all functionality of the system or
just plain shutting down the entire system.  The main distinction with a
warning rather than an error is that you know the regulator is still
operating.  If the regulator has encountered an actual error then you
don't know what state the devices it is supplying will be in, this means
that for example the driver getting the notification won't be able to
assume that the device will respond to register I/O or retain any state
it may have had.

> Keep in mind, though, that at least the qcom-labibb regulator does *not*
> support what you propose: that one has auto-shutdown (OVP) enabled by
> default (and *cannot* be disabled), no auto-shutdown on OCP (and no way
> to enable it).

This is very standard, the stuff that's baked into the devices tends to
be minimally configurable.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2021-02-01 13:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 12:01 short-circuit and over-current IRQs Vaittinen, Matti
2021-01-27 12:27 ` Mark Brown
2021-01-27 12:56   ` Matti Vaittinen
2021-01-27 14:34     ` AngeloGioacchino Del Regno
2021-01-27 14:42       ` Vaittinen, Matti
2021-01-27 16:32       ` Mark Brown
2021-01-28  9:23         ` Vaittinen, Matti
2021-01-28 12:10           ` Mark Brown
2021-01-28 12:49             ` Vaittinen, Matti
     [not found]             ` <a89bf6f0e6c1e4b9afe980908b7e36b70b304a96.camel@fi.rohmeurope.com>
2021-01-30 15:43               ` AngeloGioacchino Del Regno
2021-02-01  7:14                 ` Matti Vaittinen
2021-02-01 13:17                 ` Mark Brown [this message]

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=20210201131728.GA5960@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).