From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Mboumba Cedric Madianga <cedric.madianga@gmail.com>
Subject: Re: [PATCH 8/8 v2] ARM: dts: ux500: declare GPADC IIO ADC channels
Date: Mon, 26 Aug 2019 09:51:33 +0100 [thread overview]
Message-ID: <20190826095133.0e21c55b@archlinux> (raw)
In-Reply-To: <20190822145233.18222-9-linus.walleij@linaro.org>
On Thu, 22 Aug 2019 16:52:33 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:
> This adds the IIO channels for the GPADC after converting it
> to using the standard IIO ADC bindings and moving the driver
> over to the IIO subsystem. We also add IIO hwmon standard
> driver node to support reading channels in a standard manner.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
I'll ask the 'stupid' question. Doesn't this break compatibility
with old DTs?
One comment inline to do with IIO standardization that occurred in
the meantime.
Thanks,
Jonathan
> ---
> ChangeLog v1->v2:
> - Rebased on v5.3-rc5
> ---
> arch/arm/boot/dts/ste-dbx5x0.dtsi | 102 +++++++++++++++++++++++++++++-
> 1 file changed, 101 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
> index b1a31134f860..80016521333b 100644
> --- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
> +++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
> @@ -52,6 +52,20 @@
> };
> };
>
> + /* Essential housekeeping hardware monitors */
> + iio-hwmon {
> + compatible = "iio-hwmon";
> + io-channels = <&gpadc 0x02>, /* Battery temperature */
> + <&gpadc 0x03>, /* Main charger voltage */
> + <&gpadc 0x08>, /* Main battery voltage */
> + <&gpadc 0x09>, /* VBUS */
> + <&gpadc 0x0a>, /* Main charger current */
> + <&gpadc 0x0b>, /* USB charger current *
> + <&gpadc 0x0c>, /* Backup battery voltage */
> + <&gpadc 0x0d>, /* Die temperature */
> + <&gpadc 0x12>; /* Crystal temperature */
> + };
> +
> soc {
> #address-cells = <1>;
> #size-cells = <1>;
> @@ -623,12 +637,84 @@
> interrupt-names = "60S", "ALARM";
> };
>
> - ab8500-gpadc {
> + gpadc: ab8500-gpadc {
> compatible = "stericsson,ab8500-gpadc";
> interrupts = <32 IRQ_TYPE_LEVEL_HIGH
> 39 IRQ_TYPE_LEVEL_HIGH>;
> interrupt-names = "HW_CONV_END", "SW_CONV_END";
> vddadc-supply = <&ab8500_ldo_tvout_reg>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #io-channel-cells = <1>;
> +
> + /* GPADC channels */
> + bat_ctrl: adc-channel@01 {
> + reg = <0x01>;
We standardised recently on just channel@01 etc
Curiously we didn't document a reg value for that in the shared doc
but we have used them in drivers so that is fine.
> + };
> + btemp_ball: adc-channel@02 {
> + reg = <0x02>;
> + };
> + main_charger_v: adc-channel@03 {
> + reg = <0x03>;
> + };
> + acc_detect1: adc-channel@04 {
> + reg = <0x04>;
> + };
> + acc_detect2: adc-channel@05 {
> + reg = <0x05>;
> + };
> + adc_aux1: adc-channel@06 {
> + reg = <0x06>;
> + };
> + adc_aux2: adc-channel@07 {
> + reg = <0x07>;
> + };
> + main_batt_v: adc-channel@08 {
> + reg = <0x08>;
> + };
> + vbus_v: adc-channel@09 {
> + reg = <0x09>;
> + };
> + main_charger_c: adc-channel@0a {
> + reg = <0x0a>;
> + };
> + usb_charger_c: adc-channel@0b {
> + reg = <0x0b>;
> + };
> + bk_bat_v: adc-channel@0c {
> + reg = <0x0c>;
> + };
> + die_temp: adc-channel@0d {
> + reg = <0x0d>;
> + };
> + usb_id: adc-channel@0e {
> + reg = <0x0e>;
> + };
> + xtal_temp: adc-channel@12 {
> + reg = <0x12>;
> + };
> + vbat_true_meas: adc-channel@13 {
> + reg = <0x13>;
> + };
> + bat_ctrl_and_ibat: adc-channel@1c {
> + reg = <0x1c>;
> + };
> + vbat_meas_and_ibat: adc-channel@1d {
> + reg = <0x1d>;
> + };
> + vbat_true_meas_and_ibat: adc-channel@1e {
> + reg = <0x1e>;
> + };
> + bat_temp_and_ibat: adc-channel@1f {
> + reg = <0x1f>;
> + };
> + };
> +
> + ab8500_temp {
> + compatible = "stericsson,abx500-temp";
> + io-channels = <&gpadc 0x06>,
> + <&gpadc 0x07>;
> + io-channel-name = "aux1", "aux2";
> };
>
> ab8500_battery: ab8500_battery {
> @@ -639,17 +725,31 @@
> ab8500_fg {
> compatible = "stericsson,ab8500-fg";
> battery = <&ab8500_battery>;
> + io-channels = <&gpadc 0x08>;
> + io-channel-name = "main_bat_v";
> };
>
> ab8500_btemp {
> compatible = "stericsson,ab8500-btemp";
> battery = <&ab8500_battery>;
> + io-channels = <&gpadc 0x02>,
> + <&gpadc 0x01>;
> + io-channel-name = "btemp_ball",
> + "bat_ctrl";
> };
>
> ab8500_charger {
> compatible = "stericsson,ab8500-charger";
> battery = <&ab8500_battery>;
> vddadc-supply = <&ab8500_ldo_tvout_reg>;
> + io-channels = <&gpadc 0x03>,
> + <&gpadc 0x0a>,
> + <&gpadc 0x09>,
> + <&gpadc 0x0b>;
> + io-channel-name = "main_charger_v",
> + "main_charger_c",
> + "vbus_v",
> + "usb_charger_c";
> };
>
> ab8500_chargalg {
next prev parent reply other threads:[~2019-08-26 8:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 14:52 [PATCH 0/8 v2] AB8500 GPADC MFD to IIO conversion Linus Walleij
2019-08-22 14:52 ` [PATCH 1/8 v2] power: supply: ab8500_btemp: convert to IIO ADC Linus Walleij
2019-08-22 14:52 ` [PATCH 2/8 v2] power: supply: ab8500_charger: " Linus Walleij
2019-08-22 14:52 ` [PATCH 3/8 v2] power: supply: ab8500_fg: " Linus Walleij
2019-08-22 14:52 ` [PATCH 4/8 v2] hwmon: ab8500: " Linus Walleij
2019-08-22 14:52 ` [PATCH 5/8 v2] mfd: ab8500: augment DT bindings Linus Walleij
2019-09-02 9:30 ` Lee Jones
2019-09-03 14:19 ` Linus Walleij
2019-09-04 8:55 ` Lee Jones
2019-08-22 14:52 ` [PATCH 6/8 v2] iio: adc: New driver for the AB8500 GPADC Linus Walleij
2019-08-26 8:46 ` Jonathan Cameron
2019-09-03 14:55 ` Linus Walleij
2019-09-08 12:19 ` Jonathan Cameron
2019-08-22 14:52 ` [PATCH 7/8 v2] mfd: Switch the AB8500 GPADC to IIO Linus Walleij
2019-08-22 14:52 ` [PATCH 8/8 v2] ARM: dts: ux500: declare GPADC IIO ADC channels Linus Walleij
2019-08-26 8:51 ` Jonathan Cameron [this message]
2019-09-03 13:36 ` Linus Walleij
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=20190826095133.0e21c55b@archlinux \
--to=jic23@kernel.org \
--cc=cedric.madianga@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.