Re: [v4,1/1] hwmon: (nct7904) Add watchdog function

From: Geert Uytterhoeven
Date: Tue Jun 02 2020 - 04:01:55 EST


Hi Yuechao,

On Tue, Mar 31, 2020 at 7:30 AM <yuechao.zhao@xxxxxxxxxxxxxxxx> wrote:
> From: Yuechao Zhao <yuechao.zhao@xxxxxxxxxxxxxxxx>
>
> implement watchdong functionality into the "hwmon/nct7904.c"
>
> Signed-off-by: Yuechao Zhao <yuechao.zhao@xxxxxxxxxxxxxxxx>

Thanks for your patch, which is now commit 77849a552d142ef5 ("hwmon:
(nct7904) Add watchdog function").

> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1340,10 +1340,12 @@ config SENSORS_NCT7802
>
> config SENSORS_NCT7904
> tristate "Nuvoton NCT7904"
> - depends on I2C
> + depends on I2C && WATCHDOG
> + select WATCHDOG_CORE

This makes the driver unselectable if WATCHDOG is not set.

Is there a use case for using this driver without watchdog functionality?
If yes, it might make sense to make the watchdog support optional,
protected by #ifdef CONFIG_WATCHDOG, and change the above to

depends on I2C
select WATCHDOG_CORE if WATCHDOG

If no, please ignore my email.

> help
> If you say yes here you get support for the Nuvoton NCT7904
> - hardware monitoring chip, including manual fan speed control.
> + hardware monitoring chip, including manual fan speed control
> + and support for the integrated watchdog.
>
> This driver can also be built as a module. If so, the module
> will be called nct7904.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds