From patchwork Fri Feb 24 18:47:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 9590991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C60E56020A for ; Fri, 24 Feb 2017 18:49:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFD0826E91 for ; Fri, 24 Feb 2017 18:49:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A30DB288DD; Fri, 24 Feb 2017 18:49:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 25CD726E91 for ; Fri, 24 Feb 2017 18:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G3Oxm0IWBZsdWAzRcX22chWpJw92rvbKUbcCrbvj+X0=; b=Yv9pQ07woAQ4yt u7GBXnAS5WzVtudcWA5wVFl0nySSHVGivKBGnH3Ii6zN0s7Zwkhz22SShKfAvsDtvqmNCBSYKntK4 PKW6cMZRHH0aYk3Zjs9YZmZi35eZj7aQlBvjRitOCcLGqmOQrzTZlDc1fb0R6Bn44vMekGD2fis3j EV2gKt19LsAZKTyxqYrlHixX7iNkWWkl6VISdZt37yfVoBVlBcY09+3v4MhPlUY7wwCfRMCInAM9V UE7pOPKcbQa6CmAGZ+QTw6eDnUv/uM44pQh+WPWs/fHLv//GzJU1OX0+mh1j5qbQOWxLOoOaBsH11 LOgaPKI55PHIVkMzzf0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1chKvO-0003Ed-3T; Fri, 24 Feb 2017 18:49:02 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1chKuP-0002tc-3o; Fri, 24 Feb 2017 18:48:03 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1248503456; Sat, 25 Feb 2017 02:47:37 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Sat, 25 Feb 2017 02:47:36 +0800 From: To: , , , , , , Subject: [PATCH v4 1/4] Documentation: devicetree: Add document bindings for leds-mt6323 Date: Sat, 25 Feb 2017 02:47:18 +0800 Message-ID: <1487962041-6548-2-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1487962041-6548-1-git-send-email-sean.wang@mediatek.com> References: <1487962041-6548-1-git-send-email-sean.wang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170224_104801_395349_826CC169 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, keyhaede@gmail.com, Sean Wang , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang This patch adds documentation for devicetree bindings for LED support on MT6323 PMIC Signed-off-by: Sean Wang --- .../devicetree/bindings/leds/leds-mt6323.txt | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt new file mode 100644 index 0000000..950b8c6 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt @@ -0,0 +1,64 @@ +Device Tree Bindings for LED support on MT6323 PMIC + +MT6323 LED controller is subfunction provided by +MT6323 PMIC, so the LED controllers are defined as +the subnode of the function node provided by MT6323 +PMIC controller that is being defined as one kind of +Muti-Function Device (MFD) using shared bus called +PMIC wrapper for each subfunction to access remote +MT6323 PMIC hardware. + +For MT6323 MFD bindings see: +Documentation/devicetree/bindings/mfd/mt6397.txt +For MediaTek PMIC wrapper bindings see: +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt + +There's sub-node for the LED controller that describes +the initial behavior for each LED physically and currently +only four LED sub-nodes can be supported. + +Required properties: +- compatible : Must be "mediatek,mt6323-led" +- reg : LED channel number (0..3) + +Optional properties: +- label : (optional) + see Documentation/devicetree/bindings/leds/common.txt +- linux,default-trigger : (optional) + see Documentation/devicetree/bindings/leds/common.txt +- default-state: (optional) The initial state of the LED + see Documentation/devicetree/bindings/leds/common.txt + +Example: + +&pwrap { + pmic: mt6323 { + compatible = "mediatek,mt6323"; + interrupt-parent = <&pio>; + interrupts = <150 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + + mt6323led: mt6323led{ + compatible = "mediatek,mt6323-led"; + + led0: isink0 { + reg = <0>; + label = "LED0" + linux,default-trigger = "timer"; + default-state = "on"; + }; + led1: isink1 { + reg = <1>; + label = "LED1"; + default-state = "on"; + }; + led2: isink2 { + reg = <2>; + label = "LED2"; + linux,default-trigger = "timer"; + default-state = "off"; + }; + }; + }; +};