kernel: update kernel 4.9 to 4.9.29
[openwrt/staging/wigyori.git] / target / linux / mediatek / patches-4.9 / 0085-pmic-led0.patch
1 From patchwork Mon Mar 20 06:47:24 2017
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 Subject: [v6,1/4] dt-bindings: leds: Add document bindings for leds-mt6323
6 From: sean.wang@mediatek.com
7 X-Patchwork-Id: 9633073
8 Message-Id: <1489992447-13007-2-git-send-email-sean.wang@mediatek.com>
9 To: <rpurdie@rpsys.net>, <jacek.anaszewski@gmail.com>, <lee.jones@linaro.org>,
10 <matthias.bgg@gmail.com>, <pavel@ucw.cz>, <robh+dt@kernel.org>,
11 <mark.rutland@arm.com>
12 Cc: devicetree@vger.kernel.org, keyhaede@gmail.com,
13 Sean Wang <sean.wang@mediatek.com>, linux-kernel@vger.kernel.org,
14 linux-mediatek@lists.infradead.org, linux-leds@vger.kernel.org,
15 linux-arm-kernel@lists.infradead.org
16 Date: Mon, 20 Mar 2017 14:47:24 +0800
17
18 From: Sean Wang <sean.wang@mediatek.com>
19
20 This patch adds documentation for devicetree bindings for LED support on
21 MT6323 PMIC.
22
23 Signed-off-by: Sean Wang <sean.wang@mediatek.com>
24 ---
25 .../devicetree/bindings/leds/leds-mt6323.txt | 60 ++++++++++++++++++++++
26 1 file changed, 60 insertions(+)
27 create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
28
29 --- /dev/null
30 +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
31 @@ -0,0 +1,60 @@
32 +Device Tree Bindings for LED support on MT6323 PMIC
33 +
34 +MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
35 +controllers are defined as the subnode of the function node provided by MT6323
36 +PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
37 +using shared bus called PMIC wrapper for each subfunction to access remote
38 +MT6323 PMIC hardware.
39 +
40 +For MT6323 MFD bindings see:
41 +Documentation/devicetree/bindings/mfd/mt6397.txt
42 +For MediaTek PMIC wrapper bindings see:
43 +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
44 +
45 +Required properties:
46 +- compatible : Must be "mediatek,mt6323-led"
47 +- address-cells : Must be 1
48 +- size-cells : Must be 0
49 +
50 +Each led is represented as a child node of the mediatek,mt6323-led that
51 +describes the initial behavior for each LED physically and currently only four
52 +LED child nodes can be supported.
53 +
54 +Required properties for the LED child node:
55 +- reg : LED channel number (0..3)
56 +
57 +Optional properties for the LED child node:
58 +- label : See Documentation/devicetree/bindings/leds/common.txt
59 +- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt
60 +- default-state: See Documentation/devicetree/bindings/leds/common.txt
61 +
62 +Example:
63 +
64 + mt6323: pmic {
65 + compatible = "mediatek,mt6323";
66 +
67 + ...
68 +
69 + mt6323led: leds {
70 + compatible = "mediatek,mt6323-led";
71 + #address-cells = <1>;
72 + #size-cells = <0>;
73 +
74 + led@0 {
75 + reg = <0>;
76 + label = "LED0";
77 + linux,default-trigger = "timer";
78 + default-state = "on";
79 + };
80 + led@1 {
81 + reg = <1>;
82 + label = "LED1";
83 + default-state = "off";
84 + };
85 + led@2 {
86 + reg = <2>;
87 + label = "LED2";
88 + default-state = "on";
89 + };
90 + };
91 + };