Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1158248imm; Wed, 17 Oct 2018 14:31:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ilprHWyDdmbq7k/eZX5UpMZ8Tgo9nzWuXJWm9bJI8cwWYtdcf1yQjsm0JUCLliUmtKH1x X-Received: by 2002:a65:5508:: with SMTP id f8-v6mr25959057pgr.240.1539811882121; Wed, 17 Oct 2018 14:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539811882; cv=none; d=google.com; s=arc-20160816; b=JPb9i/3WHDv82vEWtg3tCf1iip6izU1aAkYP997Qms6FR+W8qi890T8zbG0SSwETG0 XsT5y7D5uzC9Pat3R43DAj3lO6667m6zKygZW2pq66OKUXi0wkJiD2xZiTKoiOTLf+Q2 2qzF0m1+RHGjRaKF+1WwWsEj0iS8giMrLa5MPd5k/1DhtVehjfeh1cDwuPjpujCXOukv JvQpwnsIpKQtQmbF7vnppv8aVUqXFSPrDVkvMcolpNUc06iccjVc2ghxWoiqk/zKt4AI d1tjAfwJn981tAjhIm2Sy5DBow8fwyUGryuo9j3Lu4oWHccv3TdRXHozsfhIdfpoaVA1 7T9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=O15kTxbgzt/RIOqNWgHWoDpGet/SMUenjSK030XOI+8=; b=wiVQILsjgbqulhncy/4jSSEzpFbeq1KHw68SeC8Lfc/2dB21XCcD7I/mh+LjxOM7iO eT2xzyt+rKB/crEO/SBD8d5kIe+GjNPN3H0CZgEhETSfdpvpl1e1ypu5dSpds17VnVyd 217IE7DMQsPHlHeZ6XBWjctxPy9o9yF87WnGuUEnWHzWOcP/HxuWHBH9qk0RkKq6GFYA zqNl13RLfWHLHmbbRoNid3yvpMozWcZrbDBvS4XpdDU6qTxvG84b9BnkkNrylXtJFyeQ NKHGLSJqD/J7fKfrKj1IOLdED/DXjoTmrJNTQgkeTP5gHZcoCk8PMK9PuVTJvWfox18w Jbaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PUZo9laP; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be12-v6si18193728plb.347.2018.10.17.14.31.06; Wed, 17 Oct 2018 14:31:22 -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=pass header.i=@google.com header.s=20161025 header.b=PUZo9laP; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbeJRF2S (ORCPT + 99 others); Thu, 18 Oct 2018 01:28:18 -0400 Received: from mail-vs1-f74.google.com ([209.85.217.74]:45789 "EHLO mail-vs1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbeJRF2R (ORCPT ); Thu, 18 Oct 2018 01:28:17 -0400 Received: by mail-vs1-f74.google.com with SMTP id s13so10653498vsi.12 for ; Wed, 17 Oct 2018 14:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=O15kTxbgzt/RIOqNWgHWoDpGet/SMUenjSK030XOI+8=; b=PUZo9laPeV4bhwyEP3usfNc6fTdv9KZD+MzcnTK8peypN9NDF7s4u6t5NgYxWmH+Be D5P1VWwwJLS7jWlWHl1oEYc5Pd5bXcko6OwIAZiDQUlO/iaZYvFWjEV72dDH1+a/3zs4 bFASN+k1OejoFycg1srGKdkPxSb3Ox9JsiCTvCo1+MLMiIZsc1LtJkYpHLFhKSgLoz6m 8tmfqih1jjiRtSNsxQNCNdwI0PW+3FXKfbEZfxdvAiDJH10CA6oEcmfDXT7EZNWLLnbg UwObES4meMFFvqIHxsm3wlYv2gl7A4QOykJK9QjFz1NMi+dQtmKibqH8PVj6Q+Y8EB8V mrSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=O15kTxbgzt/RIOqNWgHWoDpGet/SMUenjSK030XOI+8=; b=JpZAPnj1T49PMrr84bhOk0ws5zQngbfOPDLThQHK4FP+eNvRUkL0wrGvTRSRoniUwT YpK2N3H4EWd7D8KZFVFo3eHbn/5tLnClWU/iMXVLlw75q79TxJnaA0oM51CG7XPLIbwI lEHtnMMe0t6Dk2M1JYDSSRM9179nZlQ7E4M3CMu2UJ77yvfIZYaZiRJGqeYunmp/NcbR DnGiZzCv2mAqpETvKnnGSv8DIbCMQRfCm8eWs9YhamVwMjW5BWUudt0jP/7WVAsaAhjj NXvgLpUsxXRbBmW2nYncxNedmTklaxKL8jfbtZhJLBNOfGNBESD9mFEmycSaai8CFhaQ u1TQ== X-Gm-Message-State: ABuFfohpbU7t5UcMYBoFf7+gnLtvftah0Wfjuep169qBGBDvygcoH0CX tXFFu8AqkNzwul99REVKqWEvfaLfhA== X-Received: by 2002:a1f:85cd:: with SMTP id h196mr3075269vkd.2.1539811841656; Wed, 17 Oct 2018 14:30:41 -0700 (PDT) Date: Wed, 17 Oct 2018 14:30:12 -0700 In-Reply-To: <20181017213012.233957-1-kunyi@google.com> Message-Id: <20181017213012.233957-3-kunyi@google.com> Mime-Version: 1.0 References: <20181017213012.233957-1-kunyi@google.com> X-Mailer: git-send-email 2.19.1.331.ge82ca0e54c-goog Subject: [PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG From: Kun Yi To: linus.walleij@linaro.org, linux-gpio@vger.kernel.org, tmaimon77@gmail.com Cc: linux-kernel@vger.kernel.org, avifishman70@gmail.com, openbmc@lists.ozlabs.org, Kun Yi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Indicate that the pins are both controlled by the pinctrl driver and the generic GPIO driver, thus GPIO driver should read the register value before updating, instead of using the stored shadow register values. Signed-off-by: Kun Yi --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 7ad50d9268aa..ac7b69d53aff 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -1904,7 +1904,8 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl) NULL, pctrl->gpio_bank[id].base + NPCM7XX_GP_N_IEM, - BGPIOF_READ_OUTPUT_REG_SET); + BGPIOF_READ_OUTPUT_REG_SET | + BGPIOF_VOLATILE_REG); if (ret) { dev_err(pctrl->dev, "bgpio_init() failed\n"); return ret; -- 2.19.1.331.ge82ca0e54c-goog