Re: [PATCH v5 5/6] rtc: s35390a: Add pinctrl

[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 1 potential issue(s) to consider:
- [High] Adding `depends on PINCTRL` to an existing RTC peripheral driver breaks backward compatibility for platforms without pinctrl.
--

--- Patch [5]: [PATCH v5 5/6] rtc: s35390a: Add pinctrl ---
commit 83e265d25d4e043f28a3074886c0f8157885c331
Author: Markus Probst <[email protected]>

    rtc: s35390a: Add pinctrl

    Allow configuration of pin functions, including keeping the previous
    configured function, disabling output, waking up the system, and
    minute periodical interrupt. If no function has been configured,
    fallback to previous behaviour.

> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 01def82318731..2d79710c48375 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -668,7 +668,9 @@ config RTC_DRV_RC5T619
>  
>  config RTC_DRV_S35390A
>  	tristate "Seiko Instruments S-35390A"
> +	depends on PINCTRL

[Severity: High]
Does adding this hard dependency on PINCTRL break backward compatibility for
existing platforms that do not use the pinctrl subsystem?

For users building the kernel for systems that have the S-35390A RTC but
without CONFIG_PINCTRL enabled, the new Kconfig dependency will silently
drop the driver.

To avoid link errors for pinctrl core functions while preserving RTC
functionality on all platforms, should the pinctrl-specific code within the
driver be conditionally compiled using #if IS_ENABLED(CONFIG_PINCTRL) instead?

>  	select BITREVERSE
> +	select GENERIC_PINCONF

[ ... ]

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