2020-05-13 11:26:07

by yuechao.zhao(赵越超)

[permalink] [raw]
Subject: [v1,1/1] watchdog: (nct7904) Fix enable watchdog incorrectly

From: Yuechao Zhao <[email protected]>

Use incorrect register to enable watchdog in nct7904_wdt_ping()

Signed-off-by: Yuechao Zhao <[email protected]>
---
drivers/hwmon/nct7904.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
index 04f2a8e..18c95be 100644
--- a/drivers/hwmon/nct7904.c
+++ b/drivers/hwmon/nct7904.c
@@ -979,7 +979,7 @@ static int nct7904_wdt_ping(struct watchdog_device *wdt)
return ret;

/* Enable soft watchdog timer */
- return nct7904_write_reg(data, BANK_0, WDT_TIMER_REG, WDT_SOFT_EN);
+ return nct7904_write_reg(data, BANK_0, WDT_LOCK_REG, WDT_SOFT_EN);
}

static unsigned int nct7904_wdt_get_timeleft(struct watchdog_device *wdt)
--
1.8.3.1


2020-05-13 13:21:20

by Guenter Roeck

[permalink] [raw]
Subject: Re: [v1,1/1] watchdog: (nct7904) Fix enable watchdog incorrectly

On 5/13/20 4:00 AM, [email protected] wrote:
> From: Yuechao Zhao <[email protected]>
>
> Use incorrect register to enable watchdog in nct7904_wdt_ping()
>

I assume you mean 'correct'.

Guenter

> Signed-off-by: Yuechao Zhao <[email protected]>
> ---
> drivers/hwmon/nct7904.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
> index 04f2a8e..18c95be 100644
> --- a/drivers/hwmon/nct7904.c
> +++ b/drivers/hwmon/nct7904.c
> @@ -979,7 +979,7 @@ static int nct7904_wdt_ping(struct watchdog_device *wdt)
> return ret;
>
> /* Enable soft watchdog timer */
> - return nct7904_write_reg(data, BANK_0, WDT_TIMER_REG, WDT_SOFT_EN);
> + return nct7904_write_reg(data, BANK_0, WDT_LOCK_REG, WDT_SOFT_EN);
> }
>
> static unsigned int nct7904_wdt_get_timeleft(struct watchdog_device *wdt)
>

2020-05-13 15:28:47

by Guenter Roeck

[permalink] [raw]
Subject: Re: [v1,1/1] watchdog: (nct7904) Fix enable watchdog incorrectly

On Wed, May 13, 2020 at 11:00:15AM +0000, [email protected] wrote:
> From: Yuechao Zhao <[email protected]>
>
> Use incorrect register to enable watchdog in nct7904_wdt_ping()
>
> Signed-off-by: Yuechao Zhao <[email protected]>

I merged this patch into the patch introducing watchdog support.

Thanks,
Guenter

> ---
> drivers/hwmon/nct7904.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
> index 04f2a8e..18c95be 100644
> --- a/drivers/hwmon/nct7904.c
> +++ b/drivers/hwmon/nct7904.c
> @@ -979,7 +979,7 @@ static int nct7904_wdt_ping(struct watchdog_device *wdt)
> return ret;
>
> /* Enable soft watchdog timer */
> - return nct7904_write_reg(data, BANK_0, WDT_TIMER_REG, WDT_SOFT_EN);
> + return nct7904_write_reg(data, BANK_0, WDT_LOCK_REG, WDT_SOFT_EN);
> }
>
> static unsigned int nct7904_wdt_get_timeleft(struct watchdog_device *wdt)
> --
> 1.8.3.1
>