From: "Kim, Milo" <Milo.Kim@ti.com>
To: Jonathan Cameron <jic23@kernel.org>,
Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
Kumar Gala <galak@codeaurora.org>,
Mark Rutland <mark.rutland@arm.com>,
Grant Likely <grant.likely@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lars-Peter Clausen <lars@metafoo.de>,
"Angelo Compagnucci" <angelo.compagnucci@gmail.com>,
Doug Anderson <dianders@chromium.org>,
Fugang Duan <B38611@freescale.com>,
"Johannes Thumshirn" <johannes.thumshirn@men.de>,
Jean Delvare <jdelvare@suse.de>,
Philippe Reynes <tremyfr@yahoo.fr>,
Lee Jones <lee.jones@linaro.org>,
"Josh Cartwright" <joshc@codeaurora.org>,
Stephen Boyd <sboyd@codeaurora.org>,
"David Collins" <collinsd@codeaurora.org>,
"Ivan T. Ivanov" <iivanov@mm-sol.com>
Subject: RE: [PATCH v2 1/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver
Date: Mon, 22 Sep 2014 01:01:12 +0000 [thread overview]
Message-ID: <A874F61F95741C4A9BA573A70FE3998FBC4743E2@DQHE06.ent.ti.com> (raw)
In-Reply-To: <541ED2C0.4040801@kernel.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1569 bytes --]
Hello Jonathan and Stanimir,
> >> See Documentation/ABI/sysfs-bus-iio
> >> Millivolts I think... We copied hwmon where possible.
> >
> > I'm a bit confused about these units. I searched references of
> > iio_read_channel_processed() and found a few.
> >
> > The iio_hwmon expecting milivolts. On the other side lp8788-charger.c
> > registers a get_property method in charger-manager.c, which expects
> > microvolts in get_batt_uV().
> It's definitely meant to be millivolts (lifted from hwmon a while back).
> See Documentation/ABI/testing/sysfs-bus-iio
>
> Looks like we have a bug in lp8788-charger - it might be matched with one in
> lp8788-adc, but then there will be a bug there...
>
> Cc'd Milo Kim.
'lp8788-charger' registers not charger-manager but power-supply subsystem.
'lp8788-adc' is the IIO driver.
'lp8788-charger' is the IIO consumer of lp8788-adc.
(How to communicate between lp8788-adc and lp8788-charger)
1. Application requests vbatt(battery voltage) by accessing /sys/class/power/
2. lp8788-charger asks lp8788-adc to get converted vbatt value
3. lp8788-adc get the battery ADC from the device.
It returns calculated micro voltage to lp8788-charger.
4. lp8788-charger reports this uV value to the application
5. Application uses uV or converts to mV or V unit. It's up to the app.
Please note that battery app accesses not /sys/bus/iio but /sys/class/power/.
Best regards,
Milo
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2014-09-22 1:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 15:13 [PATCH v2 0/2] Intial support for voltage ADC Stanimir Varbanov
2014-09-11 15:13 ` [PATCH v2 1/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver Stanimir Varbanov
2014-09-12 23:27 ` Hartmut Knaack
2014-09-13 17:27 ` Jonathan Cameron
2014-09-15 14:12 ` Stanimir Varbanov
2014-09-15 16:11 ` Jonathan Cameron
2014-09-18 9:57 ` Stanimir Varbanov
2014-09-21 13:29 ` Jonathan Cameron
2014-09-22 1:01 ` Kim, Milo [this message]
2014-09-15 14:16 ` Stanimir Varbanov
2014-09-11 15:13 ` [PATCH v2 2/2] DT: iio: vadc: document dt binding Stanimir Varbanov
2014-09-12 23:35 ` Hartmut Knaack
2014-09-13 17:32 ` 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=A874F61F95741C4A9BA573A70FE3998FBC4743E2@DQHE06.ent.ti.com \
--to=milo.kim@ti.com \
--cc=B38611@freescale.com \
--cc=angelo.compagnucci@gmail.com \
--cc=arnd@arndb.de \
--cc=collinsd@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.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=jdelvare@suse.de \
--cc=jic23@kernel.org \
--cc=johannes.thumshirn@men.de \
--cc=joshc@codeaurora.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 \
--cc=sboyd@codeaurora.org \
--cc=svarbanov@mm-sol.com \
--cc=tremyfr@yahoo.fr \
/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).