Re: [PATCH v2 2/2] watchdog: Add new arm_smc_wdt watchdog driver

From: Julius Werner
Date: Wed Apr 22 2020 - 18:22:36 EST


> > Yes I think you are correct. I got some reviews about the compatible name,
> > but I think I misinterpreted those, and arm,smc-wdt would work. I did wonder
> > if Xingyu from amlogic needed to modify the driver more, EG with different
> > SMCWD_enum values for the amlogic chip, he could then just add an
> > amlogic compatible
> > and keep our devices running with the other compatible. Although of
> > course it would be nicer if
> > the amlogic firmware could copy the values here.
> Using DTS property(arm,smc-id) or vendor's compatible to specify the
> Function ID is available for the meson-A1.The generic "arm, smc-wdt"
> looks nicer for MTK and Amlogic sec wdt, but the driver may not cover
> the other vendor's platform-specific differences in the future, so the
> platform-specific compatible string may be introduced eventually.

I think having a shared driver is only really useful if firmware
sticks to the same API anyway. Once we start implementing special
cases where every vendor uses a different SMC API, we might as well
make that totally different drivers then. For now it sounds like we
can fit existing MediaTek Chromebooks and Meson into the same API, so
let's do that (with a single arm,smc-wdt compatible string) and then
hopefully future vendors will see this interface and design their
firmware APIs to match it from the get go.