Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] dt-bindings: display: ti,tpd12s015: gpios lacks minItems: 3 and is not 
required
--

commit 0e47bb58ccd4af1df6d3ff49895c7cf9fbc75cb8
Author: Chaosheng Qu <[email protected]>

dt-bindings: display: ti,tpd12s015: Convert to DT schema

Convert the TPD12S015 HDMI level shifter binding to DT schema.

> diff --git a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml 
> b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
> new file mode 100644
> index 0000000000000..1927da3bd7361
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
[ ... ]
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: ti,tpd12s015
> +      - items:
> +          - const: ti,tpd12s016
> +          - const: ti,tpd12s015
> +
> +  gpios:
> +    description:
> +      The CT CP HPD, LS OE and HPD GPIOs, in that order. The first controls
> +      the level shifter, the second enables the level shifter outputs and
> +      the third reads the hot-plug detect line.
> +    maxItems: 3

[Severity: Low]
Does this schema accurately reflect the requirements for the GPIOs?

If a device tree node defines fewer than 3 GPIOs or omits the property
entirely, it will pass schema validation since maxItems is set to 3 without
minItems: 3, and gpios is omitted from the required block below.

However, both the DRM and FBDEV drivers unconditionally fetch index 2 (the
HPD GPIO) and fail probe if it is missing:

drivers/gpu/drm/bridge/ti-tpd12s015.c:tpd12s015_probe() {
        ...
        gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2, GPIOD_IN);
        if (IS_ERR(gpio))
                return PTR_ERR(gpio);
        ...
}

Should the schema include minItems: 3 under gpios and add gpios to the
required list to ensure device tree configurations that pass validation don't
silently fail during driver probe?

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

Reply via email to