From patchwork Fri Apr 3 20:26:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 6159911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B8AFBF4A6 for ; Fri, 3 Apr 2015 20:29:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 356B720353 for ; Fri, 3 Apr 2015 20:28:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 437B3202FF for ; Fri, 3 Apr 2015 20:28:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ye8BD-0003hA-6z; Fri, 03 Apr 2015 20:27:03 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ye8Ay-0003RC-3Y for linux-arm-kernel@lists.infradead.org; Fri, 03 Apr 2015 20:26:49 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id DD4BC81F07; Fri, 3 Apr 2015 22:26:25 +0200 (CEST) Date: Fri, 3 Apr 2015 22:26:24 +0200 From: Pavel Machek To: Sakari Ailus Subject: [PATCHv6] media: i2c/adp1653: Documentation for devicetree support for adp1653 Message-ID: <20150403202624.GA4308@amd> References: <20150402143846.GA11687@amd> <20150402203417.GA6336@amd> <20150403083353.GA21070@amd> <20150403113216.GK20756@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150403113216.GK20756@valkosipuli.retiisi.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150403_132648_410276_7428B29A X-CRM114-Status: GOOD ( 16.25 ) X-Spam-Score: -2.3 (--) Cc: Andrew Morton , devicetree@vger.kernel.org, ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, sre@debian.org, aaro.koskinen@iki.fi, kernel list , sre@ring0.de, galak@codeaurora.org, bcousson@baylibre.com, pali.rohar@gmail.com, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , m.chehab@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Documentation for adp1653 binding. --- > Please split this as Javier suggested. I'd think both could go through > the media-tree unless someone objects. Please apply. > > + - power-gpios: Reference to the GPIO that controls the power for the chip. > > You're using power-gpios in documentation only. Which is ok, because generic code adds "-gpios" itself. > The spec refers to this by "EN". How about "en-gpios" instead? This > definitely isn't about power, but about resetting the chip. It gets the > power through another pin. It controls power of the chip. Noone gets _power_ through gpios, hopefully. Yes, I can rename it. "en-gpios" is too ugly to live. Sebastian suggested "enable". Hope that's okay with you. Pavel new file mode 100644 index 0000000..da9934a --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/adp1653.txt @@ -0,0 +1,37 @@ +* Analog Devices ADP1653 flash LED driver + +Required Properties: + + - compatible: Must contain be "adi,adp1653" + + - reg: I2C slave address + + - power-gpios: Reference to the GPIO that controls the power for the chip. + +There are two LED outputs available - flash and indicator. One LED is +represented by one child node, nodes need to be named "flash" and "indicator". + +Required properties of the LED child node: +- max-microamp : see Documentation/devicetree/bindings/leds/common.txt + +Required properties of the flash LED child node: + +- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt +- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt + +Example: + + adp1653: led-controller@30 { + compatible = "adi,adp1653"; + reg = <0x30>; + power-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>; /* 88 */ + + flash { + flash-timeout-us = <500000>; + flash-max-microamp = <320000>; + max-microamp = <50000>; + }; + indicator { + max-microamp = <17500>; + }; + };