Re: [PATCH v3 1/5] dt-bindings: rtc: Add pinctrl for S35390A

[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 3 potential issue(s) to consider:
- [Medium] The schema describes a hardware constraint for the 'pmin2' function but fails to enforce it programmatically in the YAML logic.
- [Medium] The patch makes an undocumented, unrelated modification to the MAINTAINERS file by adding a non-existent directory.
- [Medium] The pinctrl child node pattern `-pins$` requires the `function` property but omits the `pins` property from the `required` list.
--

--- Patch [1]: [PATCH v3 1/5] dt-bindings: rtc: Add pinctrl for S35390A ---
commit 7fb91877359a278935b0893edcef6e5ae7d9c6a2
Author: Markus Probst <[email protected]>

    dt-bindings: rtc: Add pinctrl for S35390A
    
    Synology NAS devices use the output pin for interrupt signal 1 to wake up
    the system. Move devicetree bindings for sii,s35390a into its own file.
    Add necessary properties to configure the individual pins via pinctrl,
    which allows the interrupt signal 1 to be used for wakeup alarm.

> diff --git a/Documentation/devicetree/bindings/rtc/sii,s35390a.yaml b/Documentation/devicetree/bindings/rtc/sii,s35390a.yaml
> new file mode 100644
> index 0000000000000..0355f17f233a3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/sii,s35390a.yaml
[ ... ]
> +          function:
> +            $ref: /schemas/types.yaml#/definitions/string
> +            description: |
> +              Pin function:
> +              - ignore:  Preserve the previous state.
> +              - disable: Disable pin output.
> +              - wakeup:  Output wakes up the system.
> +              - clock:   Output clock pulse.
> +              - pmin1:   Minute periodical output with 50% duty.
> +              - pmin2:   Minute periodical output L for 7.81 ms.
> +                         Can only be used with pin int1.

[Severity: Medium]
Could this hardware constraint be enforced programmatically in the YAML schema?

As currently written, a device tree specifying function = "pmin2" for 
pins = "int2" would silently pass dt_binding_check validation despite violating 
the documented hardware constraints. Should this be enforced using conditional 
schema logic?

> +            enum:
> +              - ignore
> +              - disable
> +              - wakeup
> +              - clock
> +              - pmin1
> +              - pmin2
> +
> +        required:
> +          - function

[Severity: Medium]
Should the pins property also be required here?

If a developer creates a pinmux child node specifying a function but omits the 
mandatory pins identifier, the incomplete node will silently pass 
dt_binding_check validation but fail to configure the hardware correctly in 
the driver.

> +
> +        additionalProperties: false
> +
> +    additionalProperties: false
[ ... ]
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 15011f5752a99..46a19a0873e06 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -22690,6 +22690,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
>  F:	Documentation/admin-guide/rtc.rst
>  F:	Documentation/devicetree/bindings/rtc/
>  F:	drivers/rtc/
> +F:	include/dt-bindings/rtc/

[Severity: Medium]
Is this addition to the MAINTAINERS file intentional?

This introduces an undocumented and unrelated modification adding a directory 
that does not actually exist in the kernel tree, which may cause maintainer 
scripts to fail or behave unexpectedly.

>  F:	include/linux/rtc.h
>  F:	include/linux/rtc/
>  F:	include/uapi/linux/rtc.h

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
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.