mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	linux-arm-kernel@lists.infradead.org
Cc: Support Opensource <support.opensource@diasemi.com>,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Andrej Picej <andrej.picej@norik.com>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] watchdog: da9062: Correct the timeout values
Date: Fri, 3 Dec 2021 08:52:12 -0800	[thread overview]
Message-ID: <dc6a432c-79a3-881c-eac4-32620040d11b@roeck-us.net> (raw)
In-Reply-To: <20211203163539.91870-1-cniedermaier@dh-electronics.com>

On 12/3/21 8:35 AM, Christoph Niedermaier wrote:
> I measured the timeout values of my DA9061 chip. According to the
> information in the data sheet the formula should be:
> 
> timeout = 2.048 * 2^(regval - 1)
> 
> But my measured values differ from that.
> Accoring to my measured values the formula must be:
> 
> timeout = 3.2 * 2^(regval - 1)
> 
> Is there something wrong with my chip, or has anyone else noticed this as well?

The driver assumes a static and well defined clock rate. Maybe that rate
is different in your system (if that is possible) ?

Guenter

> 
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Cc: Support Opensource <support.opensource@diasemi.com>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Andrej Picej <andrej.picej@norik.com>
> Cc: linux-watchdog@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
>   drivers/watchdog/da9062_wdt.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
> index f02cbd530538..d2576aba9ca5 100644
> --- a/drivers/watchdog/da9062_wdt.c
> +++ b/drivers/watchdog/da9062_wdt.c
> @@ -20,7 +20,8 @@
>   #include <linux/regmap.h>
>   #include <linux/of.h>
>   
> -static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
> +static const unsigned int wdt_timeout[] = { 0, 3, 6, 12, 25, 51, 102, 204 };
> +
>   #define DA9062_TWDSCALE_DISABLE		0
>   #define DA9062_TWDSCALE_MIN		1
>   #define DA9062_TWDSCALE_MAX		(ARRAY_SIZE(wdt_timeout) - 1)
> 


  reply	other threads:[~2021-12-03 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 16:35 Christoph Niedermaier
2021-12-03 16:52 ` Guenter Roeck [this message]
     [not found]   ` <4bfb6ab512cd45ee81c55361525987b7@dh-electronics.com>
2021-12-06  7:29     ` Andrej Picej
2021-12-06  7:47       ` Christoph Niedermaier
2021-12-06 16:37         ` Adam Thomson

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=dc6a432c-79a3-881c-eac4-32620040d11b@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=andrej.picej@norik.com \
    --cc=cniedermaier@dh-electronics.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=support.opensource@diasemi.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

all inboxes | Powered by JetHome®