devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Naveen Krishna Chatradhi
	<ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	MyungJoo Ham
	<myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Anton Vorontsov <cbou-JGs/UdohzUI@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: Re: [PATCH v4 2/2] iio: Add OF support
Date: Wed, 6 Feb 2013 17:53:46 -0800	[thread overview]
Message-ID: <20130207015346.GA15240@roeck-us.net> (raw)
In-Reply-To: <5112B101.7040709-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Wed, Feb 06, 2013 at 07:37:37PM +0000, Jonathan Cameron wrote:
> On 02/06/2013 06:29 PM, Guenter Roeck wrote:
> > Provide bindings and parse OF data during initialization.
> > 
> > Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> looks good to me.  Couple of little queries inline.
> 
[ ... ]

> > +
> > +Example for a configuration with trigger:
> > +
> > +	adc@35 {
> > +		compatible = "maxim,max1139";
> > +		reg = <0x35>;
> > +
> > +		adc: iio-device {
> > +			#io-channel-cells = <1>;
> > +		};
> > +		trigger: iio-trigger {
> > +			#io-channel-cells = <1>;
> Why would the trigger have channel-cells?
> So far we don't have any device tree stuff for the triggers.

I thought about keeping the example and adding a note that trigger support is
not currently implemented, but a better idea is to replace it with a second iio
device. I'll do that unless someone objects.

	adc@35 {
		compatible = "some-vendor,some-adc";
		reg = <0x35>;

		adc1: iio-device@0 {
			#io-channel-cells = <1>;
			/* other properties */
		};
		adc2: iio-device@1 {
			#io-channel-cells = <1>;
			/* other properties */
		};
	};

> > +
> > +==Example==
> > +
> > +	adc: max1139@35 {
> > +		compatible = "maxim,max1139";
> > +		reg = <0x35>;
> > +		#io-channel-cells = <1>;
> > +	};
> > +
> > +	...
> > +
> > +	iio_hwmon {
> > +		compatible = "iio-hwmon";
> > +		io-channels = <&adc 0>, <&adc 1>, <&adc 2>,
> > +			<&adc 3>, <&adc 4>, <&adc 5>,
> > +			<&adc 6>, <&adc 7>, <&adc 8>,
> > +			<&adc 9>, <&adc 10>, <&adc 11>;
> > +		io-channel-names = "vcc", "vdd", "vref", "1.2V";
> This example still seems a little odd. Why give one where there are
> more channels than names?

I replaced the example with

	iio_hwmon {
		compatible = "iio-hwmon";
		io-channels = <&adc 0>, <&adc 1>, <&adc 2>,
			<&adc 3>, <&adc 4>, <&adc 5>,
			<&adc 6>, <&adc 7>, <&adc 8>,
			<&adc 9>;
		}; 

	some_consumer {
		compatible = "some-consumer";
		io-channels = <&adc 10>, <&adc 11>;
		io-channel-names = "adc1", "adc2";
	};

Guenter

  parent reply	other threads:[~2013-02-07  1:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 20:26 [PATCH v3 0/2] iio: Devicetree support Guenter Roeck
     [not found] ` <1360009566-26347-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-04 20:26   ` [PATCH 1/2] iio: Update iio_channel_get API to use consumer device pointer as argument Guenter Roeck
     [not found]     ` <1360009566-26347-2-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-04 21:38       ` Anton Vorontsov
2013-02-04 23:57       ` Chanwoo Choi
     [not found]         ` <51104AE7.2020909-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-02-06 19:30           ` Jonathan Cameron
2013-02-04 20:26   ` [PATCH v3 2/2] iio: Add OF support Guenter Roeck
     [not found]     ` <1360009566-26347-3-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-05  5:20       ` Guenter Roeck
2013-02-05 15:22       ` Guenter Roeck
2013-02-06 18:29       ` [PATCH v4 " Guenter Roeck
     [not found]         ` <20130206182923.GA14417-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-06 19:37           ` Jonathan Cameron
     [not found]             ` <5112B101.7040709-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-06 20:05               ` Guenter Roeck
     [not found]                 ` <20130206200513.GA18135-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-06 20:12                   ` Tomasz Figa
2013-02-07  1:53               ` Guenter Roeck [this message]
     [not found]                 ` <20130207015346.GA15240-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-07  9:00                   ` 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=20130207015346.GA15240@roeck-us.net \
    --to=linux-0h96xk9xttrk1umjsbkqmq@public.gmane.org \
    --cc=cbou-JGs/UdohzUI@public.gmane.org \
    --cc=ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@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).