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: 6130411 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4BDC9F1BE for ; Tue, 31 Mar 2015 13:58:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02F98200DF for ; Tue, 31 Mar 2015 13:58:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DE572015E for ; Tue, 31 Mar 2015 13:58:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754996AbbCaN6s (ORCPT ); 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-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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>; + }; +};