Skip to content

Commit 87f33a1

Browse files
flavio-suligoilag-linaro
authored andcommitted
dt-bindings: backlight: mp3309c: Remove two required properties
The two properties: - max-brightness - default brightness are not really required, so they can be removed from the "required" section. The "max-brightness" is no longer used in the current version of the driver (it was used only in the first version). The "default-brightness", if omitted in the DT, is managed by the device driver, using a default value. This value depends on the dimming mode used: - for the "analog mode", via I2C commands, this value is fixed by hardware (=31) - while in case of pwm mode the default used is the last value of the brightness-levels array. Also the brightness-levels array is not required: - in "analog mode", via I2C commands, the brightness-level array is fixed by hardware (0..31).; - in pwm dimming mode, the driver uses a default array of 0..255 and the "default-brightness" is the last one, which is "255" NOTE: there are no compatibility problems with the previous version, since the device driver has not yet been included in any kernel. Only this dt-binding yaml file is already included in the current v6.7.0-rc1 kernel version. No developer may have used it. Other changes: - improve the backlight working mode description, in the "description" section - update the example, removing the "max-brightness" and introducing the "brightess-levels" property Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20231116105319.957600-2-f.suligoi@asem.it Signed-off-by: Lee Jones <lee@kernel.org>
1 parent b85ea95 commit 87f33a1

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ description: |
1414
programmable switching frequency to optimize efficiency.
1515
It supports two different dimming modes:
1616
17-
- analog mode, via I2C commands (default)
18-
- PWM controlled mode.
17+
- analog mode, via I2C commands, as default mode (32 dimming levels)
18+
- PWM controlled mode (optional)
1919
2020
The datasheet is available at:
2121
https://www.monolithicpower.com/en/mp3309c.html
@@ -50,8 +50,6 @@ properties:
5050
required:
5151
- compatible
5252
- reg
53-
- max-brightness
54-
- default-brightness
5553

5654
unevaluatedProperties: false
5755

@@ -66,8 +64,8 @@ examples:
6664
compatible = "mps,mp3309c";
6765
reg = <0x17>;
6866
pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
69-
max-brightness = <100>;
70-
default-brightness = <80>;
67+
brightness-levels = <0 4 8 16 32 64 128 255>;
68+
default-brightness = <6>;
7169
mps,overvoltage-protection-microvolt = <24000000>;
7270
};
7371
};

0 commit comments

Comments
 (0)