mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Louvel" <paul.louvel@bootlin.com>
To: "Tzung-Bi Shih" <tzungbi@kernel.org>,
	"Paul Louvel" <paul.louvel@bootlin.com>
Cc: "Wim Van Sebroeck" <wim@linux-watchdog.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	<linux-watchdog@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v4 4/6] watchdog: w83627hf_wdt: Move register offsets into driver data
Date: Tue, 20 Oct 2026 09:58:11 +0200	[thread overview]
Message-ID: <DM9I84FGPQXP.15OTPO318B5N8@bootlin.com> (raw)
In-Reply-To: <atY15ssAjhTBz6kr@google.com>

On Mon Oct 19, 2026 at 5:23 PM CEST, Tzung-Bi Shih wrote:
> On Tue, Oct 13, 2026 at 03:58:48PM +0200, Paul Louvel wrote:
>> @@ -42,9 +42,6 @@
>>  #define WATCHDOG_TIMEOUT 60		/* 60 sec default timeout */
>>  
>>  static int wdt_io;
>> -static int cr_wdt_timeout;	/* WDT timeout register */
>> -static int cr_wdt_control;	/* WDT control register */
>> -static int cr_wdt_csr;		/* WDT control & status register */
> ...
>> +struct w83627hf_reg {
>> +	int control;
>> +	int timeout;
>> +	int csr;
>> +};
>> +
> ...
>> +static const struct w83627hf_reg w83627hf_default_regs = {
>> +	.control = W83627HF_WDT_CONTROL,
>> +	.timeout = W83627HF_WDT_TIMEOUT,
>> +	.csr = W836X7HF_WDT_CSR
>> +};
>> +
>> +static const struct w83627hf_reg w83627hf_nct61xx_regs = {
>> +	.timeout = NCT6102D_WDT_TIMEOUT,
>> +	.control = NCT6102D_WDT_CONTROL,
>> +	.csr = NCT6102D_WDT_CSR
>> +};
>> +
>> +static const struct w83627hf_reg w83627hf_w83697xx_regs = {
>> +	.timeout = W83697HF_WDT_TIMEOUT,
>> +	.control = W83697HF_WDT_CONTROL,
>> +	.csr = W836X7HF_WDT_CSR
>> +};
>
> Nit: the order is inconsistent.  It would be better to stick with
> the order timeout -> control -> csr.
>
>> @@ -489,6 +499,21 @@ static int wdt_probe(struct platform_device *pdev)
>>  	wdd->min_timeout = 1;
>>  	wdd->max_timeout = 255;
>>  
>> +	switch (chip) {
>> +	case nct6102:
>> +	case nct6116:
>> +	case nct6126:
>> +		data->reg = &w83627hf_nct61xx_regs;
>> +		break;
>> +	case w83697hf:
>> +	case w83697ug:
>> +		data->reg = &w83627hf_w83697xx_regs;
>> +		break;
>> +	default:
>> +		data->reg = &w83627hf_default_regs;
>> +		break;
>> +	};
>          ^
> Please remove the extra ';'.

ACK.

Thanks,
-- 
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2026-10-20  7:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 13:58 [PATCH v4 0/6] watchdog: w83627hf_wdt: Convert driver to the driver model and add minute support Paul Louvel
2026-10-13 13:58 ` [PATCH v4 1/6] watchdog: w83627hf_wdt: Fix watchdog identity truncation Paul Louvel
2026-10-19 15:22   ` Tzung-Bi Shih
2026-10-20  7:52     ` Paul Louvel
2026-10-13 13:58 ` [PATCH v4 2/6] watchdog: w83627hf_wdt: Replace magic numbers with descriptive macros Paul Louvel
2026-10-19 15:22   ` Tzung-Bi Shih
2026-10-20  7:54     ` Paul Louvel
2026-10-13 13:58 ` [PATCH v4 3/6] watchdog: w83627hf_wdt: Convert to platform driver model Paul Louvel
2026-10-19 15:22   ` Tzung-Bi Shih
2026-10-20  7:54     ` Paul Louvel
2026-10-13 13:58 ` [PATCH v4 4/6] watchdog: w83627hf_wdt: Move register offsets into driver data Paul Louvel
2026-10-19 15:23   ` Tzung-Bi Shih
2026-10-20  7:58     ` Paul Louvel [this message]
2026-10-13 13:58 ` [PATCH v4 5/6] watchdog: w83627hf_wdt: Store Super I/O configurations in platform data Paul Louvel
2026-10-19 15:23   ` Tzung-Bi Shih
2026-10-13 13:58 ` [PATCH v4 6/6] watchdog: w83627hf_wdt: Add minute mode counting Paul Louvel
2026-10-20  2:00 ` [PATCH v4 0/6] watchdog: w83627hf_wdt: Convert driver to the driver model and add minute support Guenter Roeck
2026-10-20  8:02   ` Paul Louvel

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=DM9I84FGPQXP.15OTPO318B5N8@bootlin.com \
    --to=paul.louvel@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzungbi@kernel.org \
    --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®