linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Cc: wim@linux-watchdog.org, joel@jms.id.au, andrew@aj.id.au,
	BMC-SW@aspeedtech.com, linux-watchdog@vger.kernel.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	openbmc@lists.ozlabs.org, Bonnie_Lo@wiwynn.com
Subject: Re: [PATCH] watchdog: aspeed_wdt: Reorder output signal register configuration
Date: Fri, 19 Aug 2022 04:44:49 -0700	[thread overview]
Message-ID: <20220819114449.GF3106213@roeck-us.net> (raw)
In-Reply-To: <20220819094905.1962513-1-chin-ting_kuo@aspeedtech.com>

On Fri, Aug 19, 2022 at 05:49:05PM +0800, Chin-Ting Kuo wrote:
> If the output driving type is push-pull mode, the output
> polarity should be selected in advance. Otherwise, an unexpected
> value will be output at the moment of changing to push-pull mode.
> Thus, output polarity, WDT18[31], must be configured before
> changing driving type, WDT18[30].
> 
> Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/aspeed_wdt.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
> index 436571b6fc79..a03e4ff812a2 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -325,18 +325,18 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
>  		u32 reg = readl(wdt->base + WDT_RESET_WIDTH);
>  
>  		reg &= config->ext_pulse_width_mask;
> -		if (of_property_read_bool(np, "aspeed,ext-push-pull"))
> -			reg |= WDT_PUSH_PULL_MAGIC;
> +		if (of_property_read_bool(np, "aspeed,ext-active-high"))
> +			reg |= WDT_ACTIVE_HIGH_MAGIC;
>  		else
> -			reg |= WDT_OPEN_DRAIN_MAGIC;
> +			reg |= WDT_ACTIVE_LOW_MAGIC;
>  
>  		writel(reg, wdt->base + WDT_RESET_WIDTH);
>  
>  		reg &= config->ext_pulse_width_mask;
> -		if (of_property_read_bool(np, "aspeed,ext-active-high"))
> -			reg |= WDT_ACTIVE_HIGH_MAGIC;
> +		if (of_property_read_bool(np, "aspeed,ext-push-pull"))
> +			reg |= WDT_PUSH_PULL_MAGIC;
>  		else
> -			reg |= WDT_ACTIVE_LOW_MAGIC;
> +			reg |= WDT_OPEN_DRAIN_MAGIC;
>  
>  		writel(reg, wdt->base + WDT_RESET_WIDTH);
>  	}
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-08-19 11:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  9:49 [PATCH] watchdog: aspeed_wdt: Reorder output signal register configuration Chin-Ting Kuo
2022-08-19 11:44 ` Guenter Roeck [this message]
2022-08-24  0:40   ` Bonnie Lo/WYHQ/Wiwynn
2022-08-24  0:46 ` Joel Stanley
2022-08-24  1:56   ` Chin-Ting Kuo

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=20220819114449.GF3106213@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=BMC-SW@aspeedtech.com \
    --cc=Bonnie_Lo@wiwynn.com \
    --cc=andrew@aj.id.au \
    --cc=chin-ting_kuo@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).