From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
To: Kiran Padwal <kiran.padwal-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iio: iadc: Qualcomm SPMI PMIC current ADC driver
Date: Fri, 19 Sep 2014 15:16:34 +0300 [thread overview]
Message-ID: <1411128994.3997.19.camel@iivanov-dev> (raw)
In-Reply-To: <541C032F.3080206-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
Hi Kiran,
On Fri, 2014-09-19 at 15:49 +0530, Kiran Padwal wrote:
> Hi Ivan,
>
> On Thursday 18 September 2014 06:45 PM, Ivan T. Ivanov wrote:
> > The current ADC is peripheral of Qualcomm SPMI PMIC chips. It has
> > 16 bits resolution and register space inside PMIC accessible across
> > SPMI bus.
> >
> > The driver registers itself through IIO interface.
> >
> > Signed-off-by: Ivan T. Ivanov <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
> > ---
> > .../devicetree/bindings/iio/adc/qcom,spmi-iadc.txt | 61 ++
>
> <snip>
>
> > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> > index 11b048a..77274e4 100644
> > --- a/drivers/iio/adc/Kconfig
> > +++ b/drivers/iio/adc/Kconfig
> > @@ -279,4 +279,15 @@ config XILINX_XADC
> > The driver can also be build as a module. If so, the module will be called
> > xilinx-xadc.
> >
> > +config QCOM_SPMI_IADC
> > + tristate "Qualcomm SPMI PMIC current ADC"
> > + select REGMAP_SPMI
> > + depends on IIO
>
> May be you need to add "SPMI" in depends on because without enabling that it breaks.
Right.
>
> > + help
> > + This is the IIO Current ADC driver for Qualcomm QPNP IADC Chip.
> > +
> > + The driver supports single mode operation to read from upto seven channel
> > + configuration that include reading the external/internal Rsense, CSP_EX,
> > + CSN_EX pair along with the gain and offset calibration.
> > +
> > endmenu
>
> <snip>
>
> > +
> > + return iadc_write(iadc, IADC_EN_CTL1, data);
> > +}
> > +
> > +static void iadc_status_show(struct iadc_chip *iadc)
> > +{
> > + u8 mode, sta1, chan, dig, en, req;
>
> During compilation, getting a waring as below for all variables,
>
> rivers/iio/adc/qcom-spmi-iadc.c: In function ‘iadc_poll_wait_eoc’:
> drivers/iio/adc/qcom-spmi-iadc.c:227:10: warning: ‘en’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> dev_warn(iadc->dev,
> ^
>
Right. I am not sure why I am not getting this warning.
> > + int ret;
> > +
> > + ret = iadc_read(iadc, IADC_MODE_CTL, &mode);
> > + if (ret < 0)
> > + return;
> > +
> > + ret = iadc_read(iadc, IADC_DIG_PARAM, &dig);
>
Thank you for review.
Regards,
Ivan
next prev parent reply other threads:[~2014-09-19 12:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 13:15 [PATCH] iio: iadc: Qualcomm SPMI PMIC current ADC driver Ivan T. Ivanov
2014-09-19 10:19 ` Kiran Padwal
[not found] ` <541C032F.3080206-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
2014-09-19 12:16 ` Ivan T. Ivanov [this message]
2014-09-21 14:04 ` Jonathan Cameron
2014-09-23 8:31 ` Ivan T. Ivanov
2014-09-27 10:06 ` Jonathan Cameron
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=1411128994.3997.19.camel@iivanov-dev \
--to=iivanov-neyub+7iv8pqt0dzr+alfa@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=kiran.padwal-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).