Add the binding description and the corresponding driver for
the MPS MP3326.
Signed-off-by: Yuxi Wang <[email protected]>
Changes in V2:
- Fix patch format error
Yuxi Wang (2):
dt-bindings: leds: add mps mp3326 LED
leds: add mp3326 driver
.../devicetree/bindings/leds/mps,mp3326.yaml | 146 ++++
drivers/leds/Kconfig | 9 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-mp3326.c | 697 ++++++++++++++++++
4 files changed, 853 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/mps,mp3326.yaml
create mode 100644 drivers/leds/leds-mp3326.c
--
2.39.2
Document mps mp3326 LED driver devicetree bindings.
Signed-off-by: Yuxi Wang <[email protected]>
diff --git a/Documentation/devicetree/bindings/leds/mps,mp3326.yaml b/Documentation/devicetree/bindings/leds/mps,mp3326.yaml
new file mode 100644
index 000000000000..09833df692ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/mps,mp3326.yaml
@@ -0,0 +1,146 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/mps,mp3326.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MPS MP3326 RGB/White LED Driver
+
+maintainers:
+ - Yuxi Wang <[email protected]>
+
+description: |
+ The MP3326 is a RGB/White LED driver with I2C interface.
+
+ For more product information please see the link below:
+ https://www.monolithicpower.com/en/products/mp3326.html
+
+properties:
+ compatible:
+ const: mps,mp3326
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '^multi-led@[0-4]$':
+ type: object
+ $ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+ reg:
+ minimum: 0
+ maximum: 4
+ description: Index of the RGB module.
+
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ description: Index of the LED.
+ minimum: 0
+ maximum: 15
+
+ required:
+ - reg
+ - color
+
+ required:
+ - "#address-cells"
+ - "#size-cells"
+ - reg
+
+ "^led@[0-9a-f]+$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ description: Index of the LED.
+ minimum: 0
+ maximum: 15
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@30 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "mps,mp3326";
+ reg = <0x30>;
+ multi-led@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ color = <LED_COLOR_ID_RGB>;
+ reg = <0>;
+ label = "multi-led1";
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+ };
+
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ led-controller@30 {
+ compatible = "mps,mp3326";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ label = "red0";
+ reg= <0>;
+ color = <LED_COLOR_ID_WHITE>;
+ };
+ };
+ };
--
2.39.2
On 11/06/2024 10:32, Yuxi Wang wrote:
> Add the binding description and the corresponding driver for
> the MPS MP3326.
>
> Signed-off-by: Yuxi Wang <[email protected]>
>
> Changes in V2:
> - Fix patch format error
Only this? So all other feedback - like 10 comments - were ignored?
Sorry, please go to previous discussion and implement entire feedback.
Then document in changelog what did you do.
Best regards,
Krzysztof
> On 11/06/2024 10:32, Yuxi Wang wrote:
> > Add the binding description and the corresponding driver for
> > the MPS MP3326.
> >
> > Signed-off-by: Yuxi Wang <[email protected]>
> >
> > Changes in V2:
> > - Fix patch format error
>
> Only this? So all other feedback - like 10 comments - were ignored?
>
> Sorry, please go to previous discussion and implement entire feedback.
> Then document in changelog what did you do.
>
> Best regards,
> Krzysztof
Hi krzysztof,
I think previous discussions can be summarized by this log.
Ok, I will write all my changes in the next version.
Best Regards
On 12/06/2024 04:26, Yuxi (Yuxi) Wang wrote:
>
>> On 11/06/2024 10:32, Yuxi Wang wrote:
>>> Add the binding description and the corresponding driver for
>>> the MPS MP3326.
>>>
>>> Signed-off-by: Yuxi Wang <[email protected]>
>>>
>>> Changes in V2:
>>> - Fix patch format error
>>
>> Only this? So all other feedback - like 10 comments - were ignored?
>>
>> Sorry, please go to previous discussion and implement entire feedback.
>> Then document in changelog what did you do.
>>
>> Best regards,
>> Krzysztof
> Hi krzysztof,
>
> I think previous discussions can be summarized by this log.
No, it cannot. It tells me nothing.
>
> Ok, I will write all my changes in the next version.
Best regards,
Krzysztof