Return-Path: Received: from sauhun.de ([88.99.104.3]:39765 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbdGSI2F (ORCPT ); Wed, 19 Jul 2017 04:28:05 -0400 From: Wolfram Sang To: linux-watchdog@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Takeshi Kihara , Wolfram Sang Subject: [PATCH v2 0/5] watchdog: renesas_wdt: improve precision Date: Wed, 19 Jul 2017 10:27:50 +0200 Message-Id: <20170719082755.21733-1-wsa+renesas@sang-engineering.com> Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: Currently, the renesas-rwdt driver is not precise with input clocks which have a remainder after the clock divisors are applied. This series should fix the situation and also pays attention to ensure variables have proper types and are divided properly. As a cherry on top, we also get a new divider value to allow for higher max_timeout :) Originally brought to attention by this BSP patch: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git/commit/?id=7d56256a4d189a83e278ec2013eb1f3648bc7411 Tested with a Salvator-X (R-Car M3-W) and the clock driver hacked to supply the internal clock of 32552 Hz instead of the externally supplied 32768 Hz. A branch can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/watchdog-fixes Please comment or apply... Thanks, Wolfram Changes since V1: * add Guenter's Reviewed-by * in patch 1, use proper type also in the private struct Wolfram Sang (5): watchdog: renesas_wdt: avoid (theoretical) type overflow watchdog: renesas_wdt: check rate also for upper limit watchdog: renesas_wdt: don't round closest with get_timeleft watchdog: renesas_wdt: apply better precision watchdog: renesas_wdt: add another divider option drivers/watchdog/renesas_wdt.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) -- 2.11.0