From: Kiran Padwal <kiran.padwal@smartplayin.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Jonathan Cameron <jic23@kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Hartmut Knaack <knaack.h@gmx.de>,
Lee Jones <lee.jones@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] iio: iadc: Qualcomm SPMI PMIC current ADC driver
Date: Fri, 19 Sep 2014 15:49:27 +0530 [thread overview]
Message-ID: <541C032F.3080206@smartplayin.com> (raw)
In-Reply-To: <1411046123-30625-1-git-send-email-iivanov@mm-sol.com>
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@mm-sol.com>
> ---
> .../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.
> + 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,
^
> + int ret;
> +
> + ret = iadc_read(iadc, IADC_MODE_CTL, &mode);
> + if (ret < 0)
> + return;
> +
> + ret = iadc_read(iadc, IADC_DIG_PARAM, &dig);
Thanks,
--Kiran
next prev parent reply other threads:[~2014-09-19 10:19 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 [this message]
[not found] ` <541C032F.3080206-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
2014-09-19 12:16 ` Ivan T. Ivanov
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=541C032F.3080206@smartplayin.com \
--to=kiran.padwal@smartplayin.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=iivanov@mm-sol.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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).