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

commit fc9c522935b9c669ac75f93cec8daaa7860a7102
Author: Chaosheng Qu <[email protected]>

dt-bindings: display: ti,tpd12s015: Convert to DT schema
    
Convert the TPD12S015 HDMI level shifter binding to DT schema.
The TI TPD12S015 is an HDMI companion chip that combines a level shifter
and ESD protection circuitry. Document the two ports it exposes between
the HDMI transmitter and the connector.

> 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..5955f2e6421c6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
[ ... ]
> +  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
> +
> +  ports:

[Severity: Medium]
Is it possible this schema should enforce a minimum item count and require the
gpios property?

If a device tree omits gpios or provides fewer than 3 items, the schema
validation will pass because it only defines maxItems: 3 and omits gpios from
the required list.

However, the driver unequivocally requires the third GPIO item (index 2).
If absent, the probe fails:

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 enforce minItems: 3 and add gpios to the required list to
match the driver's mandatory requirement?

Additionally, due to a preexisting bug in the driver, if this probe aborts it
will leak the tpd->bridge.next_bridge module reference.

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

Reply via email to