From: Artem Lapkin <email2tema@gmail.com>
To: narmstrong@baylibre.com
Cc: wim@linux-watchdog.org, linux@roeck-us.net, 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: [PATCH 2/5] watchdog: meson_gxbb_wdt: add timeout module param
Date: Wed, 23 Jun 2021 10:44:26 +0800 [thread overview]
Message-ID: <20210623024429.1346349-3-art@khadas.com> (raw)
In-Reply-To: <20210623024429.1346349-1-art@khadas.com>
Added timeout module param same as in other modules
Signed-off-by: Artem Lapkin <art@khadas.com>
---
drivers/watchdog/meson_gxbb_wdt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index 3f86530c33b0..ecd1fc6f48ba 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 unsigned int timeout = DEFAULT_TIMEOUT;
+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;
@@ -174,7 +179,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
data->wdt_dev.ops = &meson_gxbb_wdt_ops;
data->wdt_dev.max_hw_heartbeat_ms = GXBB_WDT_TCNT_SETUP_MASK;
data->wdt_dev.min_timeout = 1;
- data->wdt_dev.timeout = DEFAULT_TIMEOUT;
+ data->wdt_dev.timeout = timeout;
watchdog_set_drvdata(&data->wdt_dev, data);
/* Setup with 1ms timebase */
--
2.25.1
next prev parent reply other threads:[~2021-06-23 2:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 2:44 [PATCH 0/5 v2] watchdog: meson_gxbb_wdt: improve Artem Lapkin
2021-06-23 2:44 ` [PATCH 1/5] watchdog: meson_gxbb_wdt: remove watchdog_stop_on_reboot Artem Lapkin
2021-06-27 15:29 ` Guenter Roeck
2021-06-23 2:44 ` Artem Lapkin [this message]
2021-06-27 15:32 ` [PATCH 2/5] watchdog: meson_gxbb_wdt: add timeout module param Guenter Roeck
2021-06-23 2:44 ` [PATCH 3/5] watchdog: meson_gxbb_wdt: add nowayout " Artem Lapkin
2021-06-27 15:37 ` Guenter Roeck
2021-06-23 2:44 ` [PATCH 4/5] watchdog: meson_gxbb_wdt: add stop_on_unregister Artem Lapkin
2021-06-27 15:42 ` Guenter Roeck
2021-06-23 2:44 ` [PATCH 5/5] watchdog: meson_gxbb_wdt: add register device status notification Artem Lapkin
2021-06-27 15:45 ` Guenter Roeck
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=20210623024429.1346349-3-art@khadas.com \
--to=email2tema@gmail.com \
--cc=art@khadas.com \
--cc=christianshewitt@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=linux@roeck-us.net \
--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).