All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	dianders@chromium.org, gregkh@linuxfoundation.org,
	lars@metafoo.de
Subject: Re: iio: adc: add exynos5 adc driver under iio framwork
Date: Wed, 13 Feb 2013 07:51:00 -0800	[thread overview]
Message-ID: <20130213155100.GA7198@roeck-us.net> (raw)
In-Reply-To: <CAHfPSqAJN8C6d6Oa=1UDpJ+hTXbEOGBio4Ob__ZphsKq=Rvppg@mail.gmail.com>

On Wed, Feb 13, 2013 at 06:46:01PM +0530, Naveen Krishna Ch wrote:
[ ... ]
> 
> Hello Guenter,
> 
> I've rebase my adc driver on top of your (OF for IIO patch)
> 
> My setup is like the below one. kindly, help me find the right device
> tree node params
> 
> One ADC controller with 8 channels,
>   4 NTC thermistors are connected to channel 3, 4, 5 and 6 of ADC respectively
> 
> ADC ch - 0
> ADC ch - 1
> ADC ch - 2
> ADC ch - 3 ------------------NTC
> ADC ch - 4 ------------------NTC
> ADC ch - 5 ------------------NTC
> ADC ch - 6 ------------------NTC
> ADC ch - 7
> 
> I've started off with something like this.
> 
>         adc0: adc@12D10000 {
>                 compatible = "samsung,exynos5250-adc";
>                 reg = <0x12D10000 0x100>;
>                 interrupts = <0 106 0>;
>                 #io-channel-cells = <1>;
>         };
> 
>         adc0: adc@12D10000 {
>                 vdd-supply = <&buck5_reg>;
> 
>                 ncp15wb473@0 {
>                         compatible = "ntc,ncp15wb473";
>                         io-channels = <&adc0 3>;
>                         io-channel-names = "adc3";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         id = <3>;
>                 };
> 
>                 ncp15wb473@1 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 4>;
>                         io-channel-names = "adc4";
>                         id = <4>;
>                 };
>                 ncp15wb473@2 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 5>;
>                         io-channel-names = "adc5";
>                         id = <5>;
>                 };
>                 ncp15wb473@3 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 6>;
>                         io-channel-names = "adc6";
>                         id = <6>;
>                 };
>         };
> 
> ADC driver will use of_platform_populate() to populate the child nodes
> (ntc thermistors in my case)
> 
> I've modified the NTC driver to support DT. in probe
> chan = iio_channel_get(&pdev->dev, "adcX");
> and using "id" field to use respective ADC channel to do the raw_read()
> 
> Issue:
> 1. I get weird device names for thermistors starting from ncp15wb473.2
> to ncp15wb473.5

I noticed that device IDs and names created when OF is active are sometimes
not as one would expect. I never managed to get the device IDs I tried to
configure. Ultimately, it did not matter and I never bothered to track it down.

Guenter

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Naveen Krishna Ch
	<naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Naveen Krishna Chatradhi
	<ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org
Subject: Re: iio: adc: add exynos5 adc driver under iio framwork
Date: Wed, 13 Feb 2013 07:51:00 -0800	[thread overview]
Message-ID: <20130213155100.GA7198@roeck-us.net> (raw)
In-Reply-To: <CAHfPSqAJN8C6d6Oa=1UDpJ+hTXbEOGBio4Ob__ZphsKq=Rvppg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Feb 13, 2013 at 06:46:01PM +0530, Naveen Krishna Ch wrote:
[ ... ]
> 
> Hello Guenter,
> 
> I've rebase my adc driver on top of your (OF for IIO patch)
> 
> My setup is like the below one. kindly, help me find the right device
> tree node params
> 
> One ADC controller with 8 channels,
>   4 NTC thermistors are connected to channel 3, 4, 5 and 6 of ADC respectively
> 
> ADC ch - 0
> ADC ch - 1
> ADC ch - 2
> ADC ch - 3 ------------------NTC
> ADC ch - 4 ------------------NTC
> ADC ch - 5 ------------------NTC
> ADC ch - 6 ------------------NTC
> ADC ch - 7
> 
> I've started off with something like this.
> 
>         adc0: adc@12D10000 {
>                 compatible = "samsung,exynos5250-adc";
>                 reg = <0x12D10000 0x100>;
>                 interrupts = <0 106 0>;
>                 #io-channel-cells = <1>;
>         };
> 
>         adc0: adc@12D10000 {
>                 vdd-supply = <&buck5_reg>;
> 
>                 ncp15wb473@0 {
>                         compatible = "ntc,ncp15wb473";
>                         io-channels = <&adc0 3>;
>                         io-channel-names = "adc3";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         id = <3>;
>                 };
> 
>                 ncp15wb473@1 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 4>;
>                         io-channel-names = "adc4";
>                         id = <4>;
>                 };
>                 ncp15wb473@2 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 5>;
>                         io-channel-names = "adc5";
>                         id = <5>;
>                 };
>                 ncp15wb473@3 {
>                         compatible = "ntc,ncp15wb473";
>                         pullup-uV = <1800000>;
>                         pullup-ohm = <47000>;
>                         pulldown-ohm = <0>;
>                         io-channels = <&adc0 6>;
>                         io-channel-names = "adc6";
>                         id = <6>;
>                 };
>         };
> 
> ADC driver will use of_platform_populate() to populate the child nodes
> (ntc thermistors in my case)
> 
> I've modified the NTC driver to support DT. in probe
> chan = iio_channel_get(&pdev->dev, "adcX");
> and using "id" field to use respective ADC channel to do the raw_read()
> 
> Issue:
> 1. I get weird device names for thermistors starting from ncp15wb473.2
> to ncp15wb473.5

I noticed that device IDs and names created when OF is active are sometimes
not as one would expect. I never managed to get the device IDs I tried to
configure. Ultimately, it did not matter and I never bothered to track it down.

Guenter

  parent reply	other threads:[~2013-02-13 15:50 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 13:37 [PATCH] iio: adc: add exynos5 adc driver under iio framwork Naveen Krishna Chatradhi
2013-01-21 13:37 ` Naveen Krishna Chatradhi
2013-01-22  9:44 ` Lars-Peter Clausen
2013-01-22  9:44   ` Lars-Peter Clausen
2013-01-22 14:03   ` Naveen Krishna Ch
2013-01-22 14:03     ` Naveen Krishna Ch
2013-01-22 14:27 ` Naveen Krishna Chatradhi
2013-01-23  4:58 ` Naveen Krishna Chatradhi
2013-01-23 12:52   ` Lars-Peter Clausen
2013-01-24  0:42     ` Doug Anderson
2013-01-24  0:42       ` Doug Anderson
2013-01-24  9:54       ` Lars-Peter Clausen
2013-01-24  9:54         ` Lars-Peter Clausen
2013-01-24 14:20         ` Naveen Krishna Ch
2013-01-24 14:20           ` Naveen Krishna Ch
2013-01-24 18:11           ` Lars-Peter Clausen
2013-01-24 16:12         ` Doug Anderson
2013-01-24 18:19           ` Lars-Peter Clausen
2013-01-24 18:19             ` Lars-Peter Clausen
2013-01-24 19:15             ` Tomasz Figa
2013-01-24 19:15               ` Tomasz Figa
2013-01-24 19:30               ` Lars-Peter Clausen
2013-02-12 21:07   ` Guenter Roeck
2013-02-13  2:48     ` Naveen Krishna Ch
2013-02-13  2:48       ` Naveen Krishna Ch
2013-02-13 11:05       ` Naveen Krishna Ch
2013-02-13 11:05         ` Naveen Krishna Ch
2013-02-13 13:16       ` Naveen Krishna Ch
2013-02-13 13:30         ` Lars-Peter Clausen
2013-02-13 13:53           ` Naveen Krishna Ch
2013-02-13 13:53             ` Naveen Krishna Ch
2013-02-13 14:05             ` Lars-Peter Clausen
2013-02-13 15:51         ` Guenter Roeck [this message]
2013-02-13 15:51           ` Guenter Roeck
2013-01-24  4:58 ` [PATCH] " Naveen Krishna Chatradhi
2013-01-24  4:58   ` Naveen Krishna Chatradhi
2013-01-26 10:57   ` Jonathan Cameron
2013-01-26 10:57     ` Jonathan Cameron
2013-01-30  6:02     ` Naveen Krishna Ch
2013-01-24  5:05 ` Naveen Krishna Chatradhi
2013-02-12  1:22   ` Olof Johansson
2013-02-14 12:11 ` [PATCH v6] iio: adc: add exynos " Naveen Krishna Chatradhi
2013-02-14 12:11   ` Naveen Krishna Chatradhi
2013-02-14 20:55   ` Lars-Peter Clausen
2013-02-14 20:55     ` Lars-Peter Clausen
2013-02-15  6:56   ` [PATCH v7] " Naveen Krishna Chatradhi
2013-02-15 13:13     ` Lars-Peter Clausen
2013-02-15 13:17       ` Naveen Krishna Ch
2013-02-15 13:17         ` Naveen Krishna Ch
2013-02-15 13:26         ` Lars-Peter Clausen
2013-02-15 13:35           ` Naveen Krishna Ch
2013-03-03 12:16             ` Jonathan Cameron
2013-03-03 12:16               ` 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=20130213155100.GA7198@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ch.naveen@samsung.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=naveenkrishna.ch@gmail.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 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.