Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] leds: incorrect scaling for led-max-microamp constraints
--

commit 629a67ba3ff0e9f6e02a0fa733445881d67a7d0c
Author: Svyatoslav Ryhel <[email protected]>

dt-bindings: mfd: Document Skyworks AAT2870
    
Document Skyworks AAT2870 LED Backlight Driver and Multiple LDO Lighting
Management Unit.

> diff --git a/Documentation/devicetree/bindings/leds/skyworks,aat2870.yaml 
> b/Documentation/devicetree/bindings/leds/skyworks,aat2870.yaml
> new file mode 100644
> index 0000000000000..6dfcd1fa399ca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/skyworks,aat2870.yaml
> @@ -0,0 +1,127 @@
[ ... ]
> +  backlight:
> +    $ref: /schemas/leds/backlight/common.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      compatible:
> +        const: skyworks,aat2870-backlight
> +
> +      led-max-microamp:
> +        minimum: 450000
> +        maximum: 27900000
> +        default: 450000

[Severity: Medium]
Are these constraints for led-max-microamp mathematically correct? The values
range from 450,000 to 27,900,000 uA, which corresponds to 450 mA to 27.9 Amps.

Real hardware limits appear to be 0.45 mA to 27.9 mA, which would be 450 to
27,900 uA. Defining a physically correct value (e.g., <27900>) in a device
tree will fail schema validation.

> +
> +      max-brightness:
> +        default: 255
[ ... ]
> +            backlight {
> +                compatible = "skyworks,aat2870-backlight";
> +
> +                skyworks,channels = /bits/ 8 <0xff>;
> +                led-max-microamp = <27900000>;

[Severity: Medium]
Does this example propagate the erroneous 27.9 Amps value?

The follow-up driver patch (commit mfd: aat2870: Convert to use OF bindings)
propagates this incorrect scaling, meaning correct values will be wrongly
clamped to minimum brightness.

> +            };

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to