On Thu, Oct 29, 2026 at 04:52:00AM -0400, Atharva Tiwari wrote:
> Add a watchdog driver for the SMC on Intel Macs. It can
> reset the machine if the system stops responding. It works
> on both newer and older SMC versions.
...
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1810,6 +1810,17 @@ config SIEMENS_SIMATIC_IPC_WDT
> To compile this driver as a module, choose M here: the module will be
> called simatic-ipc-wdt.
>
> +config MACSMC_WDT
> + tristate "Apple SMC Watchdog"
> + depends on X86 && MACSMC_ACPI
> + select WATCHDOG_CORE
> + help
> + This driver adds support for Watchdogs in Intel macs Using
> + Apple SMC.
> +
> + To compile this driver as a module, choose M here: the module will be
> + called macsmc_wdt.
> +
> # M68K Architecture
>
> config M54xx_WATCHDOG
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index 9ac406677..f142a5d8d 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -158,7 +158,7 @@ obj-$(CONFIG_NIC7018_WDT) += nic7018_wdt.o
> obj-$(CONFIG_MLX_WDT) += mlx_wdt.o
> obj-$(CONFIG_KEEMBAY_WATCHDOG) += keembay_wdt.o
> obj-$(CONFIG_SIEMENS_SIMATIC_IPC_WDT) += simatic-ipc-wdt.o
> -
> +obj-$(CONFIG_MACSMC_WDT) += macsmc_wdt.o
> # M68K Architecture
> obj-$(CONFIG_M54xx_WATCHDOG) += m54xx_wdt.o
In moth files the entries seems misplaced to me. Also, why did you touch
the blank line?
...
> +struct macsmc_wdt {
> + struct apple_smc *smc;
> + bool has_oswd; /* Newer version of watchdogs in macsmc */
> + struct watchdog_device wdd;
> +};
Try with `pahole`.
...
> + .probe = macsmc_wdt_probe,
> + .driver = {
> + .name = "macsmc-wdt"
Always add a comma to non-terminator entries in the initializers
(yes, there are some exceptions, but it's not the case here).
> + },
--
With Best Regards,
Andy Shevchenko