Re: [PATCH v2 1/2] mfd: bd96801: Add ERRB IRQ

From: Matti Vaittinen
Date: Thu Oct 10 2024 - 02:06:28 EST


On 09/10/2024 19:11, Lee Jones wrote:
On Thu, 03 Oct 2024, Matti Vaittinen wrote:

The ROHM BD96801 "scalable PMIC" provides two physical IRQs. The ERRB
handling can in many cases be omitted because it is used to inform fatal
IRQs, which usually kill the power from the SOC.

There may however be use-cases where the SOC has a 'back-up' emergency
power source which allows some very short time of operation to try to
gracefully shut down sensitive hardware. Furthermore, it is possible the
processor controlling the PMIC is not powered by the PMIC. In such cases
handling the ERRB IRQs may be beneficial.

Add support for ERRB IRQs.

Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
---
Revision history:
New series (only ERRB addition)
v2:
- Suffle local variables in probe()
- Unify and improve the error prints when adding regmap IRQ chip for
INTB or ERRB fails.
v1:
- use devm allocation for regulator_res
- use goto skip_errb instead of an if (errb)
- constify immutable structs

Old series (All BD96801 functionality + irqdomain and regmap changes)
v2 => v3:
- No changes
v1 => v2:
- New patch
---
drivers/mfd/rohm-bd96801.c | 275 ++++++++++++++++++++++++++++++++-----
1 file changed, 241 insertions(+), 34 deletions(-)

Are the 2 patches tied together or can they be taken separately?


I tried compiling the commits individually, and there should be no compilation dependencies between them. The MFD commit introduces the IRQs the regulator commit is using - but the regulator code should not abort if getting the ERRB IRQs fails - assuming I read the code right. I don't have the BD96801 at my hands to test right now (I'm not in the office).

Also, the ERRB IRQ registration is only attempted if ERRB IRQs are given in device-tree. I don't think we have users who run the bleeding-edge upstream and I'd be _very_ surprized if there are users who run newest upstream (or subsystem trees) AND have added ERRBs to device-tree.

So, I'd say it should be safe to take em separately, but sure it'd be nice to have them landing in same release.

Yours,
-- Matti