Re: [PATCH v2 7/9] char: misc: Allocate 4 more fixed minors for watchdog

From: Zijun Hu
Date: Wed Jul 02 2025 - 08:16:25 EST


On 2025/7/2 02:45, Arnd Bergmann wrote:
> On Tue, Jul 1, 2025, at 17:24, Zijun Hu wrote:
>> From: Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx>
>>
>> There are drivers which needs more fixed minors for watchdog, but
>> watchdog only has one fixed minor currently, it causes hardcoded and
>> unregistered fixed minors are used by these drivers.
>>
>> Allocate 4 more fixed minors and apply for these drivers.
>
> Missing signoff?

my mistake. thank you for pointing out.

>
>
> I don't think this is the right fix here, these drivers implement
> the normal watchdog API, so they should not even call misc_register
> but should instead call watchdog_dev_register().
>

agree

Documentation/watchdog/convert_drivers_to_kernel_api.rst indeed suggests
convert old watchdog implementation to new one using watchdog framework.

> Obviously doing this right is a bigger change, so maybe the simpler
> answer is to use dynamic minors instead of the nonstandard ones.
>
yes. it is feasible.

> FWIW, I double-checked to see whether there are any in-tree
> references to these two drivers, and there is one each:
>
> drivers/i2c/busses/i2c-i801.c: { "Hermes", DMI_DEV_TYPE_OTHER, 0x73, "fscher" },
> drivers/i2c/busses/i2c-i801.c: { "Hades", DMI_DEV_TYPE_OTHER, 0x73, "fschds" },
> drivers/i2c/busses/i2c-i801.c: { "Syleus", DMI_DEV_TYPE_OTHER, 0x73, "fscsyl" },
> arch/powerpc/boot/dts/fsl/t4240rdb.dts: compatible = "winbond,w83793";
>
> These were added in 2009 and 2016, respectively, so the hardware
> is probably around somewhere but quite hard to find.
>

let me drop this change in next revision.
may try to convert them by following the guidance at my spare time.

> Arnd