Re: [RFC PATCH v3 3/7] regulator: IRQ based event/error notification helpers

2021-04-04 Thread Matti Vaittinen
On Fri, 2021-04-02 at 18:11 +0100, Mark Brown wrote: > On Thu, Mar 11, 2021 at 12:22:36PM +0200, Matti Vaittinen wrote: > > + if (d->fatal_cnt && h->retry_cnt > d->fatal_cnt) { > > + if (d->die) > > + ret = d->die(rid); > > + else > > +

Re: [RFC PATCH v3 3/7] regulator: IRQ based event/error notification helpers

2021-04-02 Thread Mark Brown
On Thu, Mar 11, 2021 at 12:22:36PM +0200, Matti Vaittinen wrote: > @@ -0,0 +1,423 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (C) 2021 ROHM Semiconductors Please make the entire comment a C++ one so things look more consistent. > +static void

[RFC PATCH v3 3/7] regulator: IRQ based event/error notification helpers

2021-03-11 Thread Matti Vaittinen
Provide helper function for IC's implementing regulator notifications when an IRQ fires. The helper also works for IRQs which can not be acked. Helper can be set to disable the IRQ at handler and then re-enabling it on delayed work later. The helper also adds regulator_get_error_flags() errors in