devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Cc: "grant.likely@linaro.org" <grant.likely@linaro.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"rob@landley.net" <rob@landley.net>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH] iio: adc: Add bindigs documentation for twl6030 GPADC
Date: Tue, 20 Aug 2013 10:12:28 +0100	[thread overview]
Message-ID: <20130820091228.GW3719@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1376911765-7821-1-git-send-email-oleksandr.kozaruk@ti.com>

Hi Oleksandr,

[Adding Jonathan Cameron and Guenter Roeck to Cc]

Apologies for the delay replying to this. In attempting to verify this
made sense I went and read the IIO bindings documentation, and I'm
somewhat confused by the model.

As far as I can see, the only consumer of IIO channels is the
"iio-hwmon" binding, which seems to be a binding for Linux-specific
infrastructure rather than any actual device. This runs counter to the
way DT is supposed to function (describing the hardware rather than how
it's used). As far as I can see, this linkage is described because only
a subset of the ADCs on the device are actually wired to something?

I also see a couple of IIO bindings ("adi,adf435x*, and "adi,ad7303")
which don't describe any iio channel cells at all, so I'm somewhat
confused by what the IIO channels actually represent, and why they must
be consumed elsewhere. As far as I can see, an IIO channel represents a
single ADC's registers in an IIO device, so I'm not sure why this must
be exported via the channel concept -- it's not physically wired.

Have I misunderstood something here?

Thanks,
Mark.

On Mon, Aug 19, 2013 at 12:29:25PM +0100, Oleksandr Kozaruk wrote:
> Add required documentation for twl6030 GPADC device tree
> bindings.
> 
> Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
> ---
>  .../devicetree/bindings/iio/adc/twl6030-gpadc.txt  | 45 ++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/twl6030-gpadc.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/twl6030-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/twl6030-gpadc.txt
> new file mode 100644
> index 0000000..6cd3ef3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/twl6030-gpadc.txt
> @@ -0,0 +1,45 @@
> +Texas Instruments twl6030/twl6032 GPADC device driver
> +
> +Required properties:
> +	- compatible: must be "ti,twl6030-gpadc" for TWL6030 or
> +	  "ti,twl6032-gpadc" for TWL6032
> +	- interrupts: interrupt number associated with it
> +	- #io-channel-cells: must be <1> - multiple IIO outputs are present
> +	  iio consumers can use following io-channels:
> +		twl6030:
> +			0 - battery type
> +			1 - battery temperature resistor value
> +			2 - audio accessory/general purpose
> +			3 - general purpose
> +			4 - temperature/general purpose
> +			5 - general purpose
> +			6 - general purpose
> +			7 - main battery
> +			8 - backup battery
> +			9 - charger input
> +			10 - VBUS
> +			11 - VBUS charging current
> +			14 - USB ID
> +		twl6032:
> +			0 - battery type
> +			1 - battery temperature resistor value
> +			2 - audio accessory/general purpose
> +			3 - temperature with external diode/general purpose
> +			4 - temperature/general purpose
> +			5 - general purpose
> +			6 - general purpose
> +			7 - system supply
> +			8 - backup battery
> +			9 - charger input
> +			10 - VBUS
> +			11 - VBUS charging current
> +			14 - USB ID
> +			17 - battery charging current
> +			18 - battery voltage
> +
> +Example:
> +	adc {
> +		compatible = "ti,twl6030-gpadc";
> +		interrupts = <3>;
> +		#io-channel-cells = <1>;
> +	};
> -- 
> 1.8.1.2
> 
> 

  reply	other threads:[~2013-08-20  9:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 11:29 [PATCH] iio: adc: Add bindigs documentation for twl6030 GPADC Oleksandr Kozaruk
2013-08-20  9:12 ` Mark Rutland [this message]
2013-08-20 11:40   ` Oleksandr Kozaruk
2013-08-20 15:34   ` Guenter Roeck
2013-08-21  9:14     ` Mark Rutland
2013-08-21 15:41       ` Guenter Roeck
2013-08-21 16:22         ` Mark Rutland
2013-08-21 17:02           ` Guenter Roeck
2013-08-21 21:03             ` Jonathan Cameron
2013-08-22  7:14               ` 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=20130820091228.GW3719@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=jic23@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=oleksandr.kozaruk@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.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 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).