From patchwork Fri Aug 16 12:48:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Kozaruk X-Patchwork-Id: 2845654 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EF0DC9F239 for ; Fri, 16 Aug 2013 12:49:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECE7520218 for ; Fri, 16 Aug 2013 12:49:18 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B651220163 for ; Fri, 16 Aug 2013 12:49:17 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAJSt-0005XB-AN; Fri, 16 Aug 2013 12:49:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAJSr-0001B1-33; Fri, 16 Aug 2013 12:49:13 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAJSm-0001AF-Nv for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2013 12:49:09 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7GCmXIF004853; Fri, 16 Aug 2013 07:48:34 -0500 Received: from DNCE71.ent.ti.com (dnce71.ent.ti.com [137.167.131.20]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7GCmX3T020565; Fri, 16 Aug 2013 07:48:33 -0500 Received: from DNCE04.ent.ti.com ([fe80::50a2:cda3:1471:a76]) by DNCE71.ent.ti.com ([fe80::7d60:3983:a688:ea7d%20]) with mapi id 14.02.0342.003; Fri, 16 Aug 2013 14:48:33 +0200 From: "Kozaruk, Oleksandr" To: Mark Rutland Subject: RE: [PATCH v8 0/2] TWL6030, TWL6032 GPADC driver Thread-Topic: [PATCH v8 0/2] TWL6030, TWL6032 GPADC driver Thread-Index: AQHOmZePlU54UJBg2Ui+gbUHbnKlYJmV+U4AgAAgbgCAAFPUAIAA9Q2LgAAFKQCAAGKPrA== Date: Fri, 16 Aug 2013 12:48:32 +0000 Message-ID: <2A7ABDFCE21540479A5AEB0244A684D5E3EEC2@DNCE04.ent.ti.com> References: <1374758813-6539-1-git-send-email-oleksandr.kozaruk@ti.com> <20130815091216.GB28366@e106331-lin.cambridge.arm.com> <520CB566.2050201@kernel.org> <20130815125906.GA32421@e106331-lin.cambridge.arm.com> <520D16EC.90604@kernel.org> <2A7ABDFCE21540479A5AEB0244A684D5E3EE9C@DNCE04.ent.ti.com>, <20130816085440.GF32421@e106331-lin.cambridge.arm.com> In-Reply-To: <20130816085440.GF32421@e106331-lin.cambridge.arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.247.5.41] x-exclaimer-md-config: f9c360f5-3d1e-4c3c-8703-f45bf52eff6b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130816_084908_948158_D2044DAB X-CRM114-Status: GOOD ( 17.08 ) X-Spam-Score: -9.6 (---------) Cc: "linux-arm-kernel@lists.infradead.org" , "Kim, Milo" , "lars@metafoo.de" , "sameo@linux.intel.com" , "devicetree@vger.kernel.org" , "tony@atomide.com" , "Nayak, Rajendra" , "poeschel@lemonage.de" , "linux-kernel@vger.kernel.org" , "rob.herring@calxeda.com" , "ABRAHAM, KISHON VIJAY" , "Ujfalusi, Peter" , "linux-iio@vger.kernel.org" , "Krishnamoorthy, Balaji T" , "jic23@cam.ac.uk" , "grant.likely@linaro.org" , "benoit.cousson@linaro.org" , "linux-omap@vger.kernel.org" , "ch.naveen@samsung.com" , Jonathan Cameron , "gg@slimlogic.co.uk" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP >On Fri, Aug 16, 2013 at 07:39:35AM +0100, Kozaruk, Oleksandr wrote: >>>On 08/15/13 13:59, Mark Rutland wrote: >>>> On Thu, Aug 15, 2013 at 12:03:02PM +0100, Jonathan Cameron wrote: >>>>> >>>>>>> The changes to the original driver: >>>>>>> - device tree adaptation; >>>>>> >>>>>> I couldn't see a binding document in this series or in mainline. Have I >>>>>> looked in the wrong places? >>>>> >>>>> Nothing explicit supplied, but does it need one given it is doing only >>>>> iio bindings (bindings/iio/iio-bindings.txt) >>>>> plus twl child bindings >>>>> (bindings/mfd/twl-family.txt) >>>> >>>> Every binding needs to be documented. >>>> >>>>> >>>>> If it does, I guess absolutely everything does, then fair enough! >>>>> I guess that would make sense as there is no way for someone writing >>>>> a device tree to know that there is nothing else to be specified. >>>> >>>> Yup, that's why. Also, Linux isn't necessarily the only consumer, and >>>> other consumers shouldn't need to read Linux code to figure out how a >>>> particular binding is supposed to look. >>>> >>>Fair enough. Thanks for clearing that up. >>> >>>Oleksandr, could you send a follow up patch adding the required documentation? >>>(mostly a cut and paste job from similar elements by the look of it). >>> >> >>Hello, >> >>Is this good enough? >> >>From 211e81ff4a146d9ec27443696a429e795c58dc30 Mon Sep 17 00:00:00 2001 >>From: Oleksandr Kozaruk >>Date: Thu, 15 Aug 2013 16:14:11 +0300 >>Subject: [PATCH] iio: adc: Add bindigs documentation for twl6030 GPADC >> >>Add required documentation for twl6030 GPADC device tree >>bindings. >> >>Signed-off-by: Oleksandr Kozaruk >>--- >> .../devicetree/bindings/iio/adc/twl6030-gpadc.txt | 14 ++++++++++++++ >> 1 file changed, 14 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..6829420 >>--- /dev/null >>+++ b/Documentation/devicetree/bindings/iio/adc/twl6030-gpadc.txt >>@@ -0,0 +1,14 @@ >>+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 > >There should be a desscription of valid values for the io-channel-cells >as used by consumers. > >Otherwise, this looks fine. > >Thanks, >Mark. > >> + >> +Example: >> + adc { >> + compatible = "ti,twl6030-gpadc"; >> + interrupts = <3>; >> + #io-channel-cells = <1>; >> + }; >> Hi Mark, Thank you for the review. Here is new version. From 167b0aab359a9c38dfb2fd11bc3f810d1c403952 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozaruk Date: Thu, 15 Aug 2013 16:14:11 +0300 Subject: [PATCH] iio: adc: Add bindigs documentation for twl6030 GPADC Add required documentation for twl6030 GPADC device tree bindings. Signed-off-by: Oleksandr Kozaruk --- .../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>; + };