From: dann frazier <dannf@hp.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-kernel@vger.kernel.org,
Thomas Mingarelli <thomas.mingarelli@hp.com>,
dann frazier <dannf@hp.com>
Subject: [PATCH 2/3] hpwdt: allow full range of timer values supported by hardware
Date: Wed, 2 Jun 2010 16:23:40 -0600 [thread overview]
Message-ID: <1275517421-10544-2-git-send-email-dannf@hp.com> (raw)
In-Reply-To: <1275517421-10544-1-git-send-email-dannf@hp.com>
The hpwdt timer is a 16 bit value with 128ms resolution.
Let applications use this entire range.
Signed-off-by: dann frazier <dannf@hp.com>
---
drivers/watchdog/hpwdt.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index af61fb6..e3bf645 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -50,6 +50,8 @@
#define HPWDT_VERSION "1.1.1"
#define SECS_TO_TICKS(secs) ((secs) * 1000 / 128)
+#define TICKS_TO_SECS(ticks) ((ticks) * 128 / 1000)
+#define HPWDT_MAX_TIMER TICKS_TO_SECS(65535)
struct bios32_service_dir {
u32 signature;
@@ -443,8 +445,7 @@ static void hpwdt_ping(void)
static int hpwdt_change_timer(int new_margin)
{
- /* Arbitrary, can't find the card's limits */
- if (new_margin < 5 || new_margin > 600) {
+ if (new_margin < 1 || new_margin > HPWDT_MAX_TIMER) {
printk(KERN_WARNING
"hpwdt: New value passed in is invalid: %d seconds.\n",
new_margin);
--
1.7.1
next prev parent reply other threads:[~2010-06-02 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 22:23 [PATCH 1/3] hpwdt: Introduce SECS_TO_TICKS() macro dann frazier
2010-06-02 22:23 ` dann frazier [this message]
2010-06-02 22:23 ` [PATCH 3/3] hpwdt: implement WDIOC_GETTIMELEFT dann frazier
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=1275517421-10544-2-git-send-email-dannf@hp.com \
--to=dannf@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.mingarelli@hp.com \
--cc=wim@iguana.be \
/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).