Re: [PATCH v4 2/2] watchdog: Add driver for Gunyah Watchdog
From: Krzysztof Kozlowski
Date: Fri Oct 31 2025 - 08:39:17 EST
On 31/10/2025 13:11, Pavan Kondeti wrote:
> On Fri, Oct 31, 2025 at 12:48:18PM +0100, Krzysztof Kozlowski wrote:
>> On 31/10/2025 11:18, Hrishabh Rajput via B4 Relay wrote:
>>> +
>>> +static DEFINE_SIMPLE_DEV_PM_OPS(gunyah_wdt_pm_ops, gunyah_wdt_suspend, gunyah_wdt_resume);
>>> +
>>> +static struct platform_driver gunyah_wdt_driver = {
>>> + .probe = gunyah_wdt_probe,
>>> + .driver = {
>>> + .name = "gunyah-wdt",
>>> + .pm = pm_sleep_ptr(&gunyah_wdt_pm_ops),
>>> + },
>>> +};
>>> +
>>> +static int __init gunyah_wdt_init(void)
>>> +{
>>> + return platform_driver_register(&gunyah_wdt_driver);
>>> +}
>>> +
>>> +module_init(gunyah_wdt_init);
>>
>>
>> Heh, what was my last message? If I see module_init() I will NAK it.
>>
>> At v3 you really ignored entire feedback and this one here continues the
>> pattern.
>>
>> NAK, please read how Linux driver model is works.
>
> You mentioned in your previous reply that
>
> ```
> If you call any module_init other than module_foo_driver I will keep
> NAKing your patch because it is wrong. I explained why wrong already
> multiple times in previous threads and other discussions.
> ```
>
> If you are referring to why module_platform_driver() is not called here,
> Hrishabh answered that already previously. Please see
> https://lore.kernel.org/all/ndwwddd7vzjpgvzg55whdno4ondfxvyg25p2jbdsvy4lmzsfyy@jnn3wywc7xtp/
>
Your commit msg does not explain why this cannot be unloaded. What you
want - intended to be a persistent module - is not relevant here. I want
it to be a proper and regular driver module and I said it last time.
Best regards,
Krzysztof