From: Guenter Roeck <linux@roeck-us.net>
To: Artem Lapkin <email2tema@gmail.com>, narmstrong@baylibre.com
Cc: wim@linux-watchdog.org, khilman@baylibre.com,
jbrunet@baylibre.com, christianshewitt@gmail.com,
martin.blumenstingl@googlemail.com,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
art@khadas.com, nick@khadas.com, gouwa@khadas.com
Subject: Re: [PATCH] watchdog: meson_gxbb_wdt: add timeout parameter
Date: Thu, 29 Jul 2021 07:14:35 -0700 [thread overview]
Message-ID: <33af8802-1a24-27af-0c21-08741707be83@roeck-us.net> (raw)
In-Reply-To: <20210729072308.1908904-3-art@khadas.com>
On 7/29/21 12:23 AM, Artem Lapkin wrote:
> Add timeout module parameter
>
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
> 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 5aebc3a09..3f3866878 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -34,6 +34,11 @@ module_param(nowayout, bool, 0);
> MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="
> __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
>
> +static unsigned int timeout = DEFAULT_TIMEOUT;
DEFAULT_TIMEOUT is already set below. The default for the module parameter
should be 0. This way the watchdog core takes the value from devicetree
unless a module parameter is provided.
Guenter
> +module_param(timeout, uint, 0);
> +MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds="
> + __MODULE_STRING(DEFAULT_TIMEOUT) ")");
> +
> struct meson_gxbb_wdt {
> void __iomem *reg_base;
> struct watchdog_device wdt_dev;
> @@ -180,6 +185,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_init_timeout(&data->wdt_dev, timeout, dev);
> watchdog_set_nowayout(&data->wdt_dev, nowayout);
> watchdog_set_drvdata(&data->wdt_dev, data);
>
>
next prev parent reply other threads:[~2021-07-29 14:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 7:23 [PATCH 0/3 v3] watchdog: meson_gxbb_wdt: improve Artem Lapkin
2021-07-29 7:23 ` [PATCH] watchdog: meson_gxbb_wdt: add nowayout parameter Artem Lapkin
2021-07-29 7:23 ` [PATCH] watchdog: meson_gxbb_wdt: add timeout parameter Artem Lapkin
2021-07-29 14:14 ` Guenter Roeck [this message]
2021-07-29 7:23 ` [PATCH] watchdog: meson_gxbb_wdt: remove stop_on_reboot Artem Lapkin
2021-07-29 14:23 ` Guenter Roeck
2021-07-30 2:09 ` Art Nikpal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33af8802-1a24-27af-0c21-08741707be83@roeck-us.net \
--to=linux@roeck-us.net \
--cc=art@khadas.com \
--cc=christianshewitt@gmail.com \
--cc=email2tema@gmail.com \
--cc=gouwa@khadas.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=nick@khadas.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).