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

Markus Probst <[email protected]>
Newsgroups org.kernel.vger.linux-rtc,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
On Wed, 2026-08-05 at 20:21 +0000, [email protected] wrote:
> 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
I cannot add further restrictions in an if statement to the property,
than disabling or requiring it afaik.

> 
> [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.
Yes.


> 
> > +
> > +        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?
It isn't.

> 
> 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
signature.asc (application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE-----

iQJPBAABCAA5FiEEgnQYxPSsWOdyMMRzNHYf+OetQ9IFAmp7Vl4bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJEDR2H/jnrUPSSDIP/1qPbdVD96WWsrvK3XZi
m4orKp2ETQYeHnboOl3+uIuFQrZYOY6nl34oVjhhJ4yrB4qe1LbkDJ97T70WTc5a
J5PdfJ9ZY13wjVWD6p4vOFMIjENOxKmmy62AjOFy6QU4DfPZt2MNS3uShqyeZ+6z
/YTezWmr2LbbPl+Mc92N72H9prMY82ZxtUwHGG0eVqiCZhYws7gvHS9ockgKA+CQ
WS0WLOVYFtZqxnbPDqXW11LkBIPWYJXe+GIdYpgixuxA0Luo/UP0j6YVPbaavVWv
Xi8UQeuSQgVs6YdgcihIMfVmcz/Hde1jBX6+OaVnLff9RSABcjeAd6/L2w7KJiu/
TMW24qJ0Won5R5ndJRDj/P22sc2FuJiHnyzlF8uqrXbBi7nNdpJWtaSS7KOl8nMB
bPo4MxLddxC99dpnRgId1vRJRjOl9CSflgClKgbT6LaBeYFBuqQRjc3yQkaeCXLw
xuoGcITBU33O9Ix0mO1KwogZG1+Gp0f4Atd82AGv7mxkXfbkX5SuTYkb/JnfI0nW
iisBB4D0Zi3MWkjYajZzmCmUE/lQNYrSLs8v4L3Mv8c78Fu1CxVbFieL/pyQRZ5w
B11R6UyT8nsPT7m6PkRO1OZ7T6l/FK/+XciIu3f1N32jN65AuM53veR3jv65gDfs
jPZ3PglS+7yMQZipvoNwj0LY
=aw9u
-----END PGP SIGNATURE-----
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.