lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 2/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver
From
Date

On Wed, 2015-01-28 at 18:46 +0000, Jonathan Cameron wrote:
> On 20/01/15 10:15, Ivan T. Ivanov wrote:
> > From: Stanimir Varbanov <svarbanov@mm-sol.com>
> >
> > The voltage ADC is peripheral of Qualcomm SPMI PMIC chips. It has
> > 15bits resolution and register space inside PMIC accessible across
> > SPMI bus.
> >
> > The vadc driver registers itself through IIO interface.
> >
> > Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> > Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> One minor comment inline. Looks good to me.
> Applied to the togreg branch of iio.git - initially pushed out as testing.
>
> Glad to have this one out of the pending list ;)

Thank you.

>
> > +
> > + irq_eoc = platform_get_irq(pdev, 0);
> > + if (irq_eoc < 0) {
> > + if (irq_eoc == -EPROBE_DEFER || irq_eoc == -EINVAL)
> > + return irq_eoc;
> This does feel a little backwards. I'd normally expect to see those
> errors that indicate one is not specified tested against, rather than
> trying to guess all the reasons it might fail otherwise....
>
> This way round strikes me as probably more fragile as additional errors
> may turn up in that function over time..
>

Agree, would it be better if driver just check for EPROBE_DEFER
and treat all other error codes as "no interrupt defined"?
I could send followup patch if you like.

Regards,
Ivan



\
 
 \ /
  Last update: 2015-01-30 10:21    [W:0.083 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site