Re: [PATCH] rtc: add prefix modalias for rtc modules

From: Krzysztof Kozlowski
Date: Tue Oct 15 2024 - 03:52:43 EST


On 15/10/2024 04:43, huanglei814 wrote:
> From: huanglei <huanglei@xxxxxxxxxx>
>
> When these rtc drivers is built as a module, To wire it up to udev,
> and let the module be loaded automatically, we need to export these
> alias from the modules.
>
> Signed-off-by: huanglei <huanglei@xxxxxxxxxx>
> ---
> drivers/rtc/rtc-ds1302.c | 1 +
> drivers/rtc/rtc-ds1307.c | 1 +
> drivers/rtc/rtc-ds1343.c | 1 +
> drivers/rtc/rtc-ds1347.c | 1 +
> drivers/rtc/rtc-ds1374.c | 1 +
> drivers/rtc/rtc-ds1672.c | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
> index ecc7d0307932..cc82f8e6326b 100644
> --- a/drivers/rtc/rtc-ds1302.c
> +++ b/drivers/rtc/rtc-ds1302.c
> @@ -211,3 +211,4 @@ module_spi_driver(ds1302_driver);
> MODULE_DESCRIPTION("Dallas DS1302 RTC driver");
> MODULE_AUTHOR("Paul Mundt, David McCullough");
> MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("spi:rtc-ds1302");

NAK. That's neither correct, nor necessary. Driver has proper tables and
is loaded automatically in correct setup. I assume your setup is just
incorrect, but without description tricky to say how.

Best regards,
Krzysztof