Re: [PATCH v3 4/4] dt-bindings: rtc: ti,omap-rtc: Convert to DT schema

[email protected]
Newsgroups org.kernel.vger.linux-rtc,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The `pattern` constraint on `pins` is bypassed because it is applied directly to an array property, rather than its items.
- [Low] The example contains an undefined label `ext_wakeup`, causing a dtc compilation error.
--

--- Patch [4]: [PATCH v3 4/4] dt-bindings: rtc: ti,omap-rtc: Convert to DT schema ---
commit 37b8c1cde7af9ea6b7fed4b7f431ec999b775ef6
Author: Bhargav Joshi <[email protected]>

dt-bindings: rtc: ti,omap-rtc: Convert to DT schema

Convert the Texas Instruments OMAP Real Time Clock (RTC) binding from
the legacy text format to the DT schema. Mark 'ti,hwmods' as deprecated
as it is no longer used, it is kept to support legacy boards.

> diff --git a/Documentation/devicetree/bindings/rtc/ti,omap-rtc.yaml b/Documentation/devicetree/bindings/rtc/ti,omap-rtc.yaml
> new file mode 100644
> index 0000000000000..02b3c23cf4350
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/ti,omap-rtc.yaml
[ ... ]
> +patternProperties:
> +  "^ext-wakeup(-[0-9]+)?$":
> +    type: object
> +
> +    description:
> +      Child node describing external wakeup pin configuration.
> +
> +    properties:
> +      pins:
> +        pattern: '^ext_wakeup[0-3]$'

[Severity: Low]
Does this pattern constraint actually apply? Because pins is a string-array,
the pattern keyword directly on the property is ignored by the JSON schema
validator. It needs to be nested under items: { pattern: '^ext_wakeup[0-3]$' }
to validate the array elements.

[ ... ]
> +  - |
> +    rtc@0 {
> +        compatible = "ti,am3352-rtc", "ti,da830-rtc";
> +        reg = <0x0 0x1000>;
> +        interrupts = <75>, <76>;
> +        system-power-controller;
> +        clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
> +        clock-names = "ext-clk", "int-clk";
> +
> +        pinctrl-0 = <&ext_wakeup>;
> +        pinctrl-names = "default";
> +
> +        ext-wakeup {
> +            pins = "ext_wakeup0";

[Severity: Low]
Will this example compile with dtc? The pinctrl-0 property references
<&ext_wakeup>, but the ext-wakeup subnode here is missing the ext_wakeup:
label that was present in the legacy text binding, which will cause a dtc
compilation error.

> +            input-enable;
> +            ti,active-high;
> +        };
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.