Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5554500img; Wed, 27 Mar 2019 10:34:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFKl0pr6x2lMptxxyFpMSoLyEoHeC8PaSG9CTtkAJWn4ZlzI1536mHmW5N9f7AiYRTDlTQ X-Received: by 2002:a17:902:aa92:: with SMTP id d18mr36580359plr.278.1553708090617; Wed, 27 Mar 2019 10:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553708090; cv=none; d=google.com; s=arc-20160816; b=WhOaEn12a3ZSY95dyxxCL1S34rdbP53OE49KaQ2tkf6QklTtmKbBKXS6gUOVfjcC5b luimPFk54ah1t2PJmbvkbCvwJWy6JK+mscmuS2CMhUhgm1QA6r3XW44wbTSvjGupycCs nqlRqRqBMjFHQHyOd/7rx7gkFvE6Y/TfMcJxTJk3M9rPwdKAlcN9NABRuaWMQkSnQiNE xirK5geRrGWGevliEFPnJdsmLqWOGfiGGdqR39oPtkS+tAHj0y7PrSgBK1UbUlZdF6p4 4glZyta4JeeITWbNmF2LXpXUzvQVJeYYZp+9Eg23E5GyD9Oi/LrOGzPQV9pgClyFc7s0 cynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=K2w0GVPkq96+VGwbnSZt6SJKIz1CPqDIVXcS3isgzuo=; b=AxN+XPpBFDwUbSjMYFJoChp8Q9DqjbrLHF5o8pL0ysCtD1v4dzmO9Y+teGtZZV6I3L uq5jlWigGbP2Qf+GHD/9fUPxVt634RceZ/piWTAbyeEdiDL0nCp38A4UIsCagSVybeRN UXAXGfE/liTT82DRkPkQ15M5zvs4MZiPLaWypRwI4+hsoVFw7Q0NEc2dDO+PVgaBe+TM v2972yug/MFviNQZWnz9ofKDKcFtHzc/AomeRWXSFee1ahq3po18sbKOHt8PKCA9CU7w HYJMpz4+r/cVeGUiuqnd3yHwbZ/VvoXj212lKdHk4I6z6LrSyJXej8xxIQDN6xNAnG5z /9Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qGyg7HQW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p66si19908798pfp.231.2019.03.27.10.34.34; Wed, 27 Mar 2019 10:34:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qGyg7HQW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728221AbfC0Rcm (ORCPT + 99 others); Wed, 27 Mar 2019 13:32:42 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34236 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbfC0Rcl (ORCPT ); Wed, 27 Mar 2019 13:32:41 -0400 Received: by mail-pg1-f195.google.com with SMTP id v12so10293681pgq.1; Wed, 27 Mar 2019 10:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K2w0GVPkq96+VGwbnSZt6SJKIz1CPqDIVXcS3isgzuo=; b=qGyg7HQWh6WncLYFIwMySycS2BygxFEPbGBWQlgYfbAhfUsOcy4dzKA9+uvLloUncg CVIiCZ05WuL/aEXv2zqh1xd7sF4bOs9cEjWc8G7sRVAgL2LZ54eknMGLRGnm9Ylzvl6K /iS5rSkwN410eo8CfI9Qw706QXF/49J/K/2uPl7RbqZSL3KeCZeVBEdHyC3jLB8KlT24 j8ut+ksLPP/n4PDIO4Xv0wd6iVz7D2eyLZuHIao5b1CwNxWtxIXOOwKOxBKv4DlofC5i 9XQ/ygVMvmBmT4Yy7Jwg1cw7THroWEU1tNu5FYF2XdarpjMX6NYqY/yPZqfnJtHYZabi Xu3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=K2w0GVPkq96+VGwbnSZt6SJKIz1CPqDIVXcS3isgzuo=; b=BMulb3lnk/a0PA+rQWVdF8n4xEKLKbNUrB1xTBtYpujOrAj4hJFOe0zwyVPVK0uBSS +vmOGrRpH18ili1qGmn28xNKmnKirLwu4Qyt/YbzGH7XDU9HfSPVDqF57rxj98Z5DDl+ VB6gUPNF3v555hHOEfyVflfl5hU+q+UYVuwjxJfNW9jNPdlnYwC1M2f/dhRNcDwSrV8o 4kkZozAJNpUwqTnWaJ1QpBjTm//w168ylTipi8Y3iLpwmi0ZfduzkGbFrBgohHnUt1sm vYJrsHHUSHiFnmtX9XrssDUdl0n9pa3UyD8TCRi5qvw24z8Jqw0s7ssNSHN7g7/8lEI6 P57Q== X-Gm-Message-State: APjAAAXBu5CLmsrKbihn+cEZ+g+kknBHNYEhIvrU2gF3521i93/EptaX ykE3++9AoFC2vi+1blW63Q4= X-Received: by 2002:a65:4247:: with SMTP id d7mr17257752pgq.114.1553707961297; Wed, 27 Mar 2019 10:32:41 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id k83sm79122645pfj.178.2019.03.27.10.32.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 10:32:40 -0700 (PDT) Date: Wed, 27 Mar 2019 10:32:39 -0700 From: Guenter Roeck To: "Ji-Ze Hong (Peter Hong)" Cc: peter_hong@fintek.com.tw, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, "Ji-Ze Hong (Peter Hong)" Subject: Re: [PATCH V2 2/2] watchdog: f71808e_wdt: fix F81866 bit operation Message-ID: <20190327173239.GC9951@roeck-us.net> References: <1553668971-18801-1-git-send-email-hpeter+linux_kernel@gmail.com> <1553668971-18801-2-git-send-email-hpeter+linux_kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553668971-18801-2-git-send-email-hpeter+linux_kernel@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 02:42:51PM +0800, Ji-Ze Hong (Peter Hong) wrote: > Fix error bit operation in watchdog_start() > > Fixes: 14b24a88a3660 ("watchdog: f71808e_wdt: Add F81866 support") > Signed-off-by: Ji-Ze Hong (Peter Hong) Reviewed-by: Guenter Roeck > --- > drivers/watchdog/f71808e_wdt.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c > index bd2ced9f39f4..afd1446241b3 100644 > --- a/drivers/watchdog/f71808e_wdt.c > +++ b/drivers/watchdog/f71808e_wdt.c > @@ -339,6 +339,7 @@ static int f71862fg_pin_configure(unsigned short ioaddr) > static int watchdog_start(void) > { > int err; > + u8 tmp; > > /* Make sure we don't die as soon as the watchdog is enabled below */ > err = watchdog_keepalive(); > @@ -388,19 +389,18 @@ static int watchdog_start(void) > break; > > case f81866: > - /* Set pin 70 to WDTRST# */ > - superio_clear_bit(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL, > - BIT(3) | BIT(0)); > - superio_set_bit(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL, > - BIT(2)); > /* > * GPIO1 Control Register when 27h BIT3:2 = 01 & BIT0 = 0. > * The PIN 70(GPIO15/WDTRST) is controlled by 2Ch: > * BIT5: 0 -> WDTRST# > * 1 -> GPIO15 > */ > - superio_clear_bit(watchdog.sioaddr, SIO_F81866_REG_GPIO1, > - BIT(5)); > + tmp = superio_inb(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL); > + tmp &= ~(BIT(3) | BIT(0)); > + tmp |= BIT(2); > + superio_outb(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL, tmp); > + > + superio_clear_bit(watchdog.sioaddr, SIO_F81866_REG_GPIO1, 5); > break; > > default: > -- > 2.7.4 >