LKML Archive on lore.kernel.org
 help / color / Atom feed
From: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"angelogioacchino.delregno@somainline.org" 
	<angelogioacchino.delregno@somainline.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: short-circuit and over-current IRQs
Date: Wed, 27 Jan 2021 12:01:55 +0000
Message-ID: <6046836e22b8252983f08d5621c35ececb97820d.camel@fi.rohmeurope.com> (raw)

Hi dee Ho peeps,

I just noticed the
390af53e04114f790d60b63802a4de9d815ade03 ("regulator: qcom-labibb:
Implement short-circuit and over-current IRQs")

in regulator tree. No worries - I haven't hit any problem with it :]
I've been working with ROHM BD9576MUF - which implements warning IRQs
for over/under-voltage and high temperature. (Short-circuit detection
does also generate IRQ but it also automatically shuts down the
regulators by HW). BD9576MUF does also keep the IRQ activated for as
long as the 'troubling condition' stays active in HW. This is why
BD9576MUF driver does also need to implement some logic to disable IRQ
for some time period just to keep CPU out of the IRQ loop.

https://lore.kernel.org/lkml/4d725ea6e9261f22d4c808b39013baf479f252dc.1611324968.git.matti.vaittinen@fi.rohmeurope.com/

My implementation lacks of the retry counter and regulator shut-down
(BD9576 has also OCP - "Over Current Protection/OVP - "Over Voltage
Protection"/TSD - "Thermal Shutdown" features so that HW will shut down
outputs if things get worse so those are not so crucial).

I've also had some hard time when trying to test this - I guess others
have faced similar problems too...

Anyways - I was wondering if this is common thing amongst many PMICs?
If yes - then, perhaps some generally useful regulator helper could be
added to help implementing the IRQ disabling + scheduling worker to
check status and re-enable IRQs? I think it *might* save some time in
the future - and help making same mistakes many times :]

I *might* be able to find some time to draft out some code for this
(not promising, I am currently having few patch series pending but I
could at least try) - but I am not able to do thorough testing with
BD9576... Any possibility to co-operate? Maybe we could try this also
onqcom-labibb? Or do you think this is overall just a dead idea?

Best Regards
	Matti Vaittinen


             reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 12:01 Vaittinen, Matti [this message]
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

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=6046836e22b8252983f08d5621c35ececb97820d.camel@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git