diff mbox series

[v4,1/3] watchdog: meson_gxbb_wdt: add nowayout parameter

Message ID 20210730041355.2810397-2-art@khadas.com (mailing list archive)
State New, archived
Headers show
Series watchdog: meson_gxbb_wdt: improve | expand

Commit Message

Artem Lapkin July 30, 2021, 4:13 a.m. UTC
Add nowayout module parameter

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Guenter Roeck July 30, 2021, 4:45 a.m. UTC | #1
On Fri, Jul 30, 2021 at 12:13:53PM +0800, Artem Lapkin wrote:
> Add nowayout module parameter
> 
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---

<Formletter>  
Change log goes here. If it is missing, I won't know what changed.
That means I will have to dig out older patch versions to compare.
That costs time and would hold up both this patch as well as all other
patches which I still have to review.

For this reason, I will not review patches without change log.
</Formletter>

The change is small and recent enough that I remember, so

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

but please keep this in mind for future submissions.

Thanks,
Guenter

>  drivers/watchdog/meson_gxbb_wdt.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index 5a9ca10fbcfa..5aebc3a09652 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -29,6 +29,11 @@
>  #define GXBB_WDT_TCNT_SETUP_MASK		(BIT(16) - 1)
>  #define GXBB_WDT_TCNT_CNT_SHIFT			16
>  
> +static bool nowayout = WATCHDOG_NOWAYOUT;
> +module_param(nowayout, bool, 0);
> +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="
> +		 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> +
>  struct meson_gxbb_wdt {
>  	void __iomem *reg_base;
>  	struct watchdog_device wdt_dev;
> @@ -175,6 +180,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>  	data->wdt_dev.max_hw_heartbeat_ms = GXBB_WDT_TCNT_SETUP_MASK;
>  	data->wdt_dev.min_timeout = 1;
>  	data->wdt_dev.timeout = DEFAULT_TIMEOUT;
> +	watchdog_set_nowayout(&data->wdt_dev, nowayout);
>  	watchdog_set_drvdata(&data->wdt_dev, data);
>  
>  	/* Setup with 1ms timebase */
> -- 
> 2.25.1
>
Artem Lapkin Nov. 9, 2021, 7:59 a.m. UTC | #2
hi Guenter Roeck
why still not merged to upstream ?

On Fri, Jul 30, 2021 at 12:45 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Fri, Jul 30, 2021 at 12:13:53PM +0800, Artem Lapkin wrote:
> > Add nowayout module parameter
> >
> > Signed-off-by: Artem Lapkin <art@khadas.com>
> > ---
>
> <Formletter>
> Change log goes here. If it is missing, I won't know what changed.
> That means I will have to dig out older patch versions to compare.
> That costs time and would hold up both this patch as well as all other
> patches which I still have to review.
>
> For this reason, I will not review patches without change log.
> </Formletter>
>
> The change is small and recent enough that I remember, so
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>
> but please keep this in mind for future submissions.
>
> Thanks,
> Guenter
>
> >  drivers/watchdog/meson_gxbb_wdt.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> > index 5a9ca10fbcfa..5aebc3a09652 100644
> > --- a/drivers/watchdog/meson_gxbb_wdt.c
> > +++ b/drivers/watchdog/meson_gxbb_wdt.c
> > @@ -29,6 +29,11 @@
> >  #define GXBB_WDT_TCNT_SETUP_MASK             (BIT(16) - 1)
> >  #define GXBB_WDT_TCNT_CNT_SHIFT                      16
> >
> > +static bool nowayout = WATCHDOG_NOWAYOUT;
> > +module_param(nowayout, bool, 0);
> > +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="
> > +              __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> > +
> >  struct meson_gxbb_wdt {
> >       void __iomem *reg_base;
> >       struct watchdog_device wdt_dev;
> > @@ -175,6 +180,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
> >       data->wdt_dev.max_hw_heartbeat_ms = GXBB_WDT_TCNT_SETUP_MASK;
> >       data->wdt_dev.min_timeout = 1;
> >       data->wdt_dev.timeout = DEFAULT_TIMEOUT;
> > +     watchdog_set_nowayout(&data->wdt_dev, nowayout);
> >       watchdog_set_drvdata(&data->wdt_dev, data);
> >
> >       /* Setup with 1ms timebase */
> > --
> > 2.25.1
> >
diff mbox series

Patch

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index 5a9ca10fbcfa..5aebc3a09652 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -29,6 +29,11 @@ 
 #define GXBB_WDT_TCNT_SETUP_MASK		(BIT(16) - 1)
 #define GXBB_WDT_TCNT_CNT_SHIFT			16
 
+static bool nowayout = WATCHDOG_NOWAYOUT;
+module_param(nowayout, bool, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="
+		 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+
 struct meson_gxbb_wdt {
 	void __iomem *reg_base;
 	struct watchdog_device wdt_dev;
@@ -175,6 +180,7 @@  static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 	data->wdt_dev.max_hw_heartbeat_ms = GXBB_WDT_TCNT_SETUP_MASK;
 	data->wdt_dev.min_timeout = 1;
 	data->wdt_dev.timeout = DEFAULT_TIMEOUT;
+	watchdog_set_nowayout(&data->wdt_dev, nowayout);
 	watchdog_set_drvdata(&data->wdt_dev, data);
 
 	/* Setup with 1ms timebase */