From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Stanimir Varbanov <svarbanov@mm-sol.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v5 2/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver
Date: Fri, 30 Jan 2015 11:10:03 +0200 [thread overview]
Message-ID: <1422609003.11083.13.camel@mm-sol.com> (raw)
In-Reply-To: <54C92E7C.5040507@kernel.org>
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
next prev parent reply other threads:[~2015-01-30 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 10:15 [PATCH v5 0/2] Initial support for voltage ADC Ivan T. Ivanov
2015-01-20 10:15 ` [PATCH v5 1/2] DT: iio: vadc: document dt binding Ivan T. Ivanov
2015-01-28 18:45 ` Jonathan Cameron
2015-01-30 9:00 ` Ivan T. Ivanov
2015-01-20 10:15 ` [PATCH v5 2/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver Ivan T. Ivanov
2015-01-28 18:46 ` Jonathan Cameron
2015-01-30 9:10 ` Ivan T. Ivanov [this message]
2015-01-28 8:25 ` [PATCH v5 0/2] Initial support for voltage ADC Ivan T. Ivanov
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=1422609003.11083.13.camel@mm-sol.com \
--to=iivanov@mm-sol.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=svarbanov@mm-sol.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox