lkml.org 
[lkml]   [2023]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH INTERNAL v1 3/3] regulator: tps6594-regulator: Add driver for TI TPS6594 regulators
On Thu, Mar 23, 2023 at 10:12:21AM +0100, jerome Neanne wrote:

> > This would be simpler and you wouldn't need this lookup function if the
> > regulator descriptions included their IRQ names, then you could just
> > request the interrupts while registering the regulators.

> I changed the code to follow your recommendations then now in case of a
> multiphase buck, only one set of interrupt is requested.

> buck2, buck3, buck4 are not associated to a regulator device because buck1
> registers control all the multiphase bucks (only one logic regulator).
> Consequently the mapping for the associated interrupts does not occur.
> I'm not sure it's the right option.
> Do you suggest to keep it like that for multiphase?
> Is it better to request all the interrupts anyway and map it to the same
> rdev?

Do the other interrupts do anything useful for this configuration? With
a lot of hardware the whole control interface gets merged into one which
includes the interrupts.

> > > + error = devm_request_threaded_irq(tps->dev, irq, NULL,
> > > + tps6594_regulator_irq_handler,
> > > + IRQF_ONESHOT,
> > > + irq_type->irq_name,
> > > + &irq_data[i]);
> > > + if (error) {
> > > + dev_err(tps->dev, "failed to request %s IRQ %d: %d\n",
> > > + irq_type->irq_name, irq, error);
> > > + return error;
> > > + }

> > This leaks all previously requested interrupts.

> I'm not sure to understand this sentence correctly. You mean all the
> interrupts already requested are still allocated after the error occurs?

Yes, I'd either not registered the devm or thought there was some other
interrupt wasn't devm.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 01:14    [W:0.065 / U:2.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site