Message ID | 20240208105817.2619703-1-claudiu.beznea.uj@bp.renesas.com |
---|---|
Headers | show |
Series | watchdog: rzg2l_wdt: Add support for RZ/G3S | expand |
Hi Claudiu, On Thu, Feb 8, 2024 at 1:26 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the > clocks are enabled though pm_runtime_* specific APIs). To avoid building > a driver that doesn't work make explicit the dependency on CONFIG_PM. > > Suggested-by: Guenter Roeck <linux@roeck-us.net> > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > --- > > Changes in v6: > - update patch description > - fixed the dependency on COMPILE_TEST previously introduced Thanks for the update! > --- a/drivers/watchdog/Kconfig > +++ b/drivers/watchdog/Kconfig > @@ -911,6 +911,7 @@ config RENESAS_RZN1WDT > config RENESAS_RZG2LWDT > tristate "Renesas RZ/G2L WDT Watchdog" > depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST > + depends on PM depends on PM || COMPILE_TEST > select WATCHDOG_CORE > help > This driver adds watchdog support for the integrated watchdogs in the Gr{oetje,eeting}s, Geert
Hi, Geert, On 08.02.2024 14:53, Geert Uytterhoeven wrote: > Hi Claudiu, > > On Thu, Feb 8, 2024 at 1:26 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >> >> The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the >> clocks are enabled though pm_runtime_* specific APIs). To avoid building >> a driver that doesn't work make explicit the dependency on CONFIG_PM. >> >> Suggested-by: Guenter Roeck <linux@roeck-us.net> >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >> --- >> >> Changes in v6: >> - update patch description >> - fixed the dependency on COMPILE_TEST previously introduced > > Thanks for the update! > >> --- a/drivers/watchdog/Kconfig >> +++ b/drivers/watchdog/Kconfig >> @@ -911,6 +911,7 @@ config RENESAS_RZN1WDT >> config RENESAS_RZG2LWDT >> tristate "Renesas RZ/G2L WDT Watchdog" >> depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST >> + depends on PM > > depends on PM || COMPILE_TEST Isn't "depends on PM" enough? As of [1] ("If multiple dependencies are defined, they are connected with '&&'") the above: depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST depends on PM are translated into: depends on (ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST) && PM Please let me know if I'm wrong. Thank you, Claudiu Beznea [1] https://www.kernel.org/doc/html/next/kbuild/kconfig-language.html > >> select WATCHDOG_CORE >> help >> This driver adds watchdog support for the integrated watchdogs in the > > Gr{oetje,eeting}s, > > Geert >
Hi Claudiu, On Fri, Feb 9, 2024 at 1:25 PM claudiu beznea <claudiu.beznea@tuxon.dev> wrote: > On 08.02.2024 14:53, Geert Uytterhoeven wrote: > > On Thu, Feb 8, 2024 at 1:26 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: > >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > >> > >> The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the > >> clocks are enabled though pm_runtime_* specific APIs). To avoid building > >> a driver that doesn't work make explicit the dependency on CONFIG_PM. > >> > >> Suggested-by: Guenter Roeck <linux@roeck-us.net> > >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > >> --- > >> > >> Changes in v6: > >> - update patch description > >> - fixed the dependency on COMPILE_TEST previously introduced > > > > Thanks for the update! > > > >> --- a/drivers/watchdog/Kconfig > >> +++ b/drivers/watchdog/Kconfig > >> @@ -911,6 +911,7 @@ config RENESAS_RZN1WDT > >> config RENESAS_RZG2LWDT > >> tristate "Renesas RZ/G2L WDT Watchdog" > >> depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST > >> + depends on PM > > > > depends on PM || COMPILE_TEST > > Isn't "depends on PM" enough? As of [1] ("If multiple dependencies are > defined, they are connected with '&&'") the above: > > depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST > depends on PM > > are translated into: > depends on (ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST) && PM > > Please let me know if I'm wrong. That is correct. But you still can compile-test this driver when compiling for a different platform, and CONFIG_PM is disabled. Gr{oetje,eeting}s, Geert
Hi, Geert, On 14.02.2024 17:26, Geert Uytterhoeven wrote: > Hi Claudiu, > > On Fri, Feb 9, 2024 at 1:25 PM claudiu beznea <claudiu.beznea@tuxon.dev> wrote: >> On 08.02.2024 14:53, Geert Uytterhoeven wrote: >>> On Thu, Feb 8, 2024 at 1:26 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: >>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >>>> >>>> The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the >>>> clocks are enabled though pm_runtime_* specific APIs). To avoid building >>>> a driver that doesn't work make explicit the dependency on CONFIG_PM. >>>> >>>> Suggested-by: Guenter Roeck <linux@roeck-us.net> >>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >>>> --- >>>> >>>> Changes in v6: >>>> - update patch description >>>> - fixed the dependency on COMPILE_TEST previously introduced >>> >>> Thanks for the update! >>> >>>> --- a/drivers/watchdog/Kconfig >>>> +++ b/drivers/watchdog/Kconfig >>>> @@ -911,6 +911,7 @@ config RENESAS_RZN1WDT >>>> config RENESAS_RZG2LWDT >>>> tristate "Renesas RZ/G2L WDT Watchdog" >>>> depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST >>>> + depends on PM >>> >>> depends on PM || COMPILE_TEST >> >> Isn't "depends on PM" enough? As of [1] ("If multiple dependencies are >> defined, they are connected with '&&'") the above: >> >> depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST >> depends on PM >> >> are translated into: >> depends on (ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST) && PM >> >> Please let me know if I'm wrong. > > That is correct. But you still can compile-test this driver when > compiling for a different platform, and CONFIG_PM is disabled. Ok, I see, thank you! > > Gr{oetje,eeting}s, > > Geert >
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Hi, Series adds watchdog support for Renesas RZ/G3S (R9A08G045) SoC. Patches do the following: - patch 1/9 makes the driver depend on ARCH_RZG2L || ARCH_R9A09G011 - patch 2/9 makes the driver depend on PM - patches 3-7/9 adds fixes and cleanups for the watchdog driver - patch 8/9 adds suspend to RAM to the watchdog driver (to be used by RZ/G3S) - patch 9/9 documents the RZ/G3S support Thank you, Claudiu Beznea Changes in v6: - update patch 2/9 description - fixed the dependency on COMPILE_TEST previously introduced in patch 2/9 Changes in v5: - updated description of patch 2/9 - simplify the code in patch 2/9 by using on a new line: depends on PM || COMPILE_TEST Changes in v4: - added patch "watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011" - collected tags Changes in v3: - make driver depend on PM not select it - drop patches already accepted (patches 1, 10, 11 from v2) - re-arranged the tags in patch 8/8 as they were messed by b4 am/shazam Changes in v2: - added patch "watchdog: rzg2l_wdt: Select PM" - propagate the return status of rzg2l_wdt_start() to it's callers in patch "watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get()" - propagate the return status of rzg2l_wdt_stop() to it's callers in patch "watchdog: rzg2l_wdt: Check return status of pm_runtime_put()" - removed pm_ptr() from patch "watchdog: rzg2l_wdt: Add suspend/resume support" - s/G2UL/G2L in patch "dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support" - collected tags Claudiu Beznea (9): watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 watchdog: rzg2l_wdt: Make the driver depend on PM watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() watchdog: rzg2l_wdt: Check return status of pm_runtime_put() watchdog: rzg2l_wdt: Remove reset de-assert on probe/stop watchdog: rzg2l_wdt: Remove comparison with zero watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset watchdog: rzg2l_wdt: Add suspend/resume support dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support .../bindings/watchdog/renesas,wdt.yaml | 1 + drivers/watchdog/Kconfig | 3 +- drivers/watchdog/rzg2l_wdt.c | 111 ++++++++++-------- 3 files changed, 64 insertions(+), 51 deletions(-)