Thread (12 messages) 12 messages, 3 authors, 2023-10-06

RE: [PATCH v3 1/2] dt-bindings: backlight: Add MPS MP3309C

From: Flavio Suligoi <f.suligoi@asem.it>
Date: 2023-10-03 16:00:44
Also in: dri-devel, linux-devicetree, linux-leds, lkml

Hi Daniel,

...
quoted
quoted
quoted
+required:
+  - compatible
+  - reg
+  - max-brightness
Why is this mandatory?

There's no point in setting max-brightness when running in I2C mode
(max- brightness should default to 31 in that case).

quoted
+  - default-brightness
Again. I'm not clear why this needs to be mandatory.
Ok, you are right, I'll remove max-brightness and default-brightness
from required properties list. I think to change these properties, for
the pwm dimming, into a clearer:

- brightness-levels (uint32)
- default-brightness-levels (uint32).

For example:

  brightness-levels:
    description:
      Number of brightness levels. The actual brightness
      level (PWM duty cycle) will be interpolated from 0 to this value.
      0 means a  0% duty cycle (darkest/off), while the brightness-levels
represents
quoted
      a 100% duty cycle (brightest).
    $ref: /schemas/types.yaml#/definitions/uint32

  default-brightness-level:
    description:
      The default brightness level (from 0 to brightness-levels)
    $ref: /schemas/types.yaml#/definitions/uint32

Example:
brightness-levels = <10>;
default-brightness-level = <6>;

What do you think about this solution?
If you want to introduce a brightness-levels property then I would expect it to
be defined with the same meaning as pwm-backlight (it's not relevant to the
bindings but ideally it would be implemented by refactoring and reusing the
code from pwm_bl.c).
ok, I'll use the brightness-levels property as used in pwm-backlight
Same with default-brightness-level although I'm not sure why one wouldn't
just use default-brightness for new bindings (doesn't default-brightness-level
simply do exactly the same thing as default-brightness).
ok for default-brightness instead of default-brightness-level

Daniel.
Thanks an best regards,
Flavio
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help