From patchwork Tue Mar 31 13:57:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 29059 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Ycwgu-0006Ob-CU; Tue, 31 Mar 2015 15:58:52 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-8) with esmtp id 1Ycwgs-0004o9-kJ; Tue, 31 Mar 2015 15:58:52 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754996AbbCaN6s (ORCPT + 1 other); Tue, 31 Mar 2015 09:58:48 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48144 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752858AbbCaN6r (ORCPT ); Tue, 31 Mar 2015 09:58:47 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NM200DDMXHXRWC0@mailout1.samsung.com>; Tue, 31 Mar 2015 22:58:45 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-1c-551aa815e8dc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id FC.D2.20081.518AA155; Tue, 31 Mar 2015 22:58:45 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NM20079DXGBD140@mmp2.samsung.com>; Tue, 31 Mar 2015 22:58:45 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com, Jacek Anaszewski , devicetree@vger.kernel.org Subject: [PATCH v4 12/12] DT: aat1290: Document handling external strobe sources Date: Tue, 31 Mar 2015 15:57:45 +0200 Message-id: <1427810265-25651-3-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1427810265-25651-1-git-send-email-j.anaszewski@samsung.com> References: <1427810265-25651-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t9jQV3RFVKhBpM2SFkc3TmRyWL+kXOs Fr1XnzNanG16w26x9c06RoueDVtZLe6eOspmsXvXU1aLw2/aWS3O7F/J5sDlsXPWXXaPw18X snjsmf+D1aNvyypGjxWrv7N7fN4kF8AWxWWTkpqTWZZapG+XwJXRsOQbY8Ei8YqXc/ezNzBO Fe5i5OSQEDCR6Jy8ghnCFpO4cG89WxcjF4eQwHRGiY6Gz0wQzk9GiTVf7oBVsQkYSvx88ZoJ xBYRsJaYdWg6C4jNLHCGUeLfPm0QW1ggQOLh0RtAkzg4WARUJQ6s8gMJ8wp4SOz6v5IRJCwh oCAxZ5INSJhTwFPiz5IjYNOFgEpuXN3CNIGRdwEjwypG0dSC5ILipPRcQ73ixNzi0rx0veT8 3E2M4NB7JrWDcWWDxSFGAQ5GJR7eC/ckQ4VYE8uKK3MPMUpwMCuJ8P6cKBUqxJuSWFmVWpQf X1Sak1p8iFGag0VJnFfJvi1ESCA9sSQ1OzW1ILUIJsvEwSnVwGh9MfRP7Z5CYZMb8vOSy99G VhY/kdzuo+UY/rD5wOosW9egfYc7J0mUXVXlu6Tlz7R8joS813RR/asv5tfZCC7aUn4t6+DW b07MEnzzdOevePGAaVGg2mmVwwuXmzfX6zaYeuacOr33+/uHD25/X6gx2SVu3pX3PlNfNL81 XFtZv+Fm6ve74WVKLMUZiYZazEXFiQAk/i0xOQIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.3.31.135121 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CHILD_EX_X3 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_NAME_BODY 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' This patch adds documentation for a pinctrl-names property. The property, when present, is used for switching the source of the strobe signal for the device. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Bryan Wu Cc: Richard Purdie Cc: Sakari Ailus Cc: devicetree@vger.kernel.org --- .../devicetree/bindings/leds/leds-aat1290.txt | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/leds/leds-aat1290.txt b/Documentation/devicetree/bindings/leds/leds-aat1290.txt index 6893eb1..c3df4e9 100644 --- a/Documentation/devicetree/bindings/leds/leds-aat1290.txt +++ b/Documentation/devicetree/bindings/leds/leds-aat1290.txt @@ -2,7 +2,9 @@ The device is controlled through two pins: FL_EN and EN_SET. The pins when, asserted high, enable flash strobe and movie mode (max 1/2 of flash current) -respectively. +respectively. In order to add a capability of selecting the strobe signal source +(e.g. GPIO or ISP) there is an additional switch required, independent of the +flash chip. The switch is controlled with pin control. Required properties: @@ -10,6 +12,13 @@ Required properties: - flen-gpios : Must be device tree identifier of the flash device FL_EN pin. - enset-gpios : Must be device tree identifier of the flash device EN_SET pin. +Optional properties: +- pinctrl-names : Must contain entries: "default", "host", "isp". Entries + "default" and "host" must refer to the same pin configuration + node, which sets the host as a strobe signal provider. Entry + "isp" must refer to the pin configuration node, which sets the + ISP as a strobe signal provider. + A discrete LED element connected to the device must be represented by a child node - see Documentation/devicetree/bindings/leds/common.txt. @@ -27,14 +36,35 @@ Optional properties of the LED child node: Example (by Ct = 220nF, Rset = 160kohm and exynos4412-trats2 board with a switch that allows for routing strobe signal either from host or from ISP): +#include "exynos4412.dtsi" + aat1290 { compatible = "skyworks,aat1290"; flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>; enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default", "host", "isp"; + pinctrl-0 = <&camera_flash_host>; + pinctrl-1 = <&camera_flash_host>; + pinctrl-2 = <&camera_flash_isp>; + camera_flash: flash-led { label = "aat1290-flash"; flash-max-microamp = <1012500>; flash-timeout-us = <1940000>; }; }; + +&pinctrl_0 { + camera_flash_host: camera-flash-host { + samsung,pins = "gpj1-0"; + samsung,pin-function = <1>; + samsung,pin-val = <0>; + }; + + camera_flash_isp: camera-flash-isp { + samsung,pins = "gpj1-0"; + samsung,pin-function = <1>; + samsung,pin-val = <1>; + }; +};