ramips: fix Netgear R6220 package selection
[oweals/openwrt.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 diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
30 new file mode 100644
31 index 0000000..ac38472
32 --- /dev/null
33 +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
34 @@ -0,0 +1,60 @@
35 +Device Tree Bindings for LED support on MT6323 PMIC
36 +
37 +MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
38 +controllers are defined as the subnode of the function node provided by MT6323
39 +PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
40 +using shared bus called PMIC wrapper for each subfunction to access remote
41 +MT6323 PMIC hardware.
42 +
43 +For MT6323 MFD bindings see:
44 +Documentation/devicetree/bindings/mfd/mt6397.txt
45 +For MediaTek PMIC wrapper bindings see:
46 +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
47 +
48 +Required properties:
49 +- compatible : Must be "mediatek,mt6323-led"
50 +- address-cells : Must be 1
51 +- size-cells : Must be 0
52 +
53 +Each led is represented as a child node of the mediatek,mt6323-led that
54 +describes the initial behavior for each LED physically and currently only four
55 +LED child nodes can be supported.
56 +
57 +Required properties for the LED child node:
58 +- reg : LED channel number (0..3)
59 +
60 +Optional properties for the LED child node:
61 +- label : See Documentation/devicetree/bindings/leds/common.txt
62 +- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt
63 +- default-state: See Documentation/devicetree/bindings/leds/common.txt
64 +
65 +Example:
66 +
67 +       mt6323: pmic {
68 +               compatible = "mediatek,mt6323";
69 +
70 +               ...
71 +
72 +               mt6323led: leds {
73 +                       compatible = "mediatek,mt6323-led";
74 +                       #address-cells = <1>;
75 +                       #size-cells = <0>;
76 +
77 +                       led@0 {
78 +                               reg = <0>;
79 +                               label = "LED0";
80 +                               linux,default-trigger = "timer";
81 +                               default-state = "on";
82 +                       };
83 +                       led@1 {
84 +                               reg = <1>;
85 +                               label = "LED1";
86 +                               default-state = "off";
87 +                       };
88 +                       led@2 {
89 +                               reg = <2>;
90 +                               label = "LED2";
91 +                               default-state = "on";
92 +                       };
93 +               };
94 +       };