All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: 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 v5 3/5] watchdog: w83627hf_wdt: Move register offsets into driver data
Date: Tue, 20 Oct 2026 13:44:31 +0000	[thread overview]
Message-ID: <atdwPzZNF61JjOKp@google.com> (raw)
In-Reply-To: <20261020-w83627hf_wdt-improvements-v5-3-90b226684fc7@bootlin.com>

On Tue, Oct 20, 2026 at 10:11:56AM +0200, Paul Louvel wrote:
> Register offsets for the watchdog timer, control, and status registers
> differ across Super I/O chip variants. Store them in the driver data
> instead of global variables.
> 
> Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>

With a nit fixed,

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>

>  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 */
>  static int wdt_cfg_enter = 0x87;/* key to unlock configuration space */
>  static int wdt_cfg_leave = 0xAA;/* key to lock configuration space */
...
> +struct w83627hf_reg {
> +	int control;
> +	int timeout;
> +	int csr;
> +};
...
> > +static const struct w83627hf_reg w83627hf_default_regs = {
> +	.timeout = W83627HF_WDT_TIMEOUT,
> +	.control = W83627HF_WDT_CONTROL,
> +	.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
> +};

To be consistent and neat, I'd expect the order in the declaration of
struct w83627hf_reg to also be: timeout -> control -> csr.

  reply	other threads:[~2026-10-20 13:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  8:11 [PATCH v5 0/5] watchdog: w83627hf_wdt: Convert driver to the driver model and add minute support Paul Louvel
2026-10-20  8:11 ` [PATCH v5 1/5] watchdog: w83627hf_wdt: Replace magic numbers with descriptive macros Paul Louvel
2026-10-20  8:11 ` [PATCH v5 2/5] watchdog: w83627hf_wdt: Convert to platform driver model Paul Louvel
2026-10-20  8:59   ` sashiko-bot
2026-10-20 13:29   ` Tzung-Bi Shih
2026-10-20  8:11 ` [PATCH v5 3/5] watchdog: w83627hf_wdt: Move register offsets into driver data Paul Louvel
2026-10-20 13:44   ` Tzung-Bi Shih [this message]
2026-10-20  8:11 ` [PATCH v5 4/5] watchdog: w83627hf_wdt: Store Super I/O configurations in platform data Paul Louvel
2026-10-20  8:11 ` [PATCH v5 5/5] watchdog: w83627hf_wdt: Add minute mode counting Paul Louvel
2026-10-20 14:08   ` Tzung-Bi Shih
2026-10-20 15:42     ` Guenter Roeck
2026-10-20 16:28     ` 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=atdwPzZNF61JjOKp@google.com \
    --to=tzungbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=paul.louvel@bootlin.com \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.