Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2874522rdb; Wed, 15 Nov 2023 13:12:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9wKuMHcWVHjRtzJr87BPb247WT5DTb/gksjyhY8Lv98pHid6AXUMGG3nLCy2J4DtW2DKm X-Received: by 2002:a17:90b:38c2:b0:280:22e2:60ea with SMTP id nn2-20020a17090b38c200b0028022e260eamr11737547pjb.3.1700082756192; Wed, 15 Nov 2023 13:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700082756; cv=none; d=google.com; s=arc-20160816; b=fE3ULfh4Udp6pCFChXYrQh334Y4mngW/511hKBeIOV2G4VIFMhzDkg27h5WokVQdGT Umwb2wtLaiyXUOuZMSRq4sYIDkA4K7uYTC/IUqx924Bk1L9w+8uh8mD1VI1vA4Ihzix3 8IwrZvTzbGkrduhxyIw98uMl8D/FB3KgiBiIWmozpQ3aHPwoxiLfh4DKdUNzZAbDy/Kp l2g0JRc7H8vNFVTQgGbcCpHt4StbC9M4fCfLEuHvwZkHhQvlLRA+EATcFjIQRxWK3Yga X3IWqg7TZMTq6ruSIT1Zbc0IGfOoihH03q7YOmuCkJdoHP5pOOvRnOSl6B6chlNyjrCl dGiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=D7sCUwcBlF+LnWvSB7Jm+r2N1IF61ZdXk6HmmnXauaI=; fh=bJCcfA0Cs3/WojEJY9PigsmJtqB+pJPNGy5g/SiVMdk=; b=fJsfHs+xiVVtQ6ocWwuTPFmlgfUScQuef8f3m2k8Yr7Q3oXJb0kDNdU5ZI62NDVz27 3gLJfBKBZxncYS6Fxi8IODXcazKoUVelf+55BQZihfonDMIwFLxTLa258PiIkZlwTVJT f1gwZugIbYNHhJQpx4RZ7WwEdUFV8v/YSHzHTf1iZz0NvVsdFdS3eWSH4LwyJhoPYK85 Z7rG744DgTrolelLpJWWHl8KgOrcSk4pq8dSS1gwxia/jV9ZkX7ZVlEtALYsWUTFMWWu 3RNPWJV0bK3JBc4N1LzbLdNJ47RsQbAbMlHttayNuYHGz5Cgkw7lhXTGvh/KU66cvViJ d1Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b=QK1rzMQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id lp10-20020a17090b4a8a00b00280feff8f0fsi481070pjb.127.2023.11.15.13.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:12:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b=QK1rzMQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DC02780320CC; Wed, 15 Nov 2023 13:12:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235612AbjKOVMX (ORCPT + 99 others); Wed, 15 Nov 2023 16:12:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235622AbjKOVMU (ORCPT ); Wed, 15 Nov 2023 16:12:20 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E38198 for ; Wed, 15 Nov 2023 13:12:16 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5bda105206fso78330a12.3 for ; Wed, 15 Nov 2023 13:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20230601.gappssmtp.com; s=20230601; t=1700082736; x=1700687536; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=D7sCUwcBlF+LnWvSB7Jm+r2N1IF61ZdXk6HmmnXauaI=; b=QK1rzMQpEQfokpZtS8QHgHQB157NrIBwE/14/tLK6GxytHJ2+V0/i6KgOAJqwqP+Yv aAb1B5W8nPqNbOURF3bm8C/0eBSZuezShDgYofKvdK443HUC9TDumdzSO8UEnG7yEzvL QCT8U3j5sfc/KeBjdJRndkd0ZASzRcEvX91SxWGepjOF41gkH6uNyb8SDys1XgKFIIlp gKEBZkAvNnNdADi5FdZXFLw0uk2+0zC4UqOd96nf3sgrgyXCUbjUXn1z1o7dHHR2bKnw JFXdFyCaXKMQiSqRMswPTfK5TfyfO7u9XPBFHS+9KVRO3kZ+ES5ldsgdQvO+zWxRFwi3 jrfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700082736; x=1700687536; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D7sCUwcBlF+LnWvSB7Jm+r2N1IF61ZdXk6HmmnXauaI=; b=kxsKZgiycw5J5tzqG/pza52rhilKs8GkpZM5aRKvT9F4gFiVJRNNS/Bn72fveqswVP Yx9xn2O91kZIdgk05WY/QY45Np5ixaYqEsfh9q0IBt9J3yIdXrjfZutRsYFhnapVV95H 3VMtnzlLG7vrSBosjbYldzc/Gr3LH3/Luup19RiPm4gPeop9tuIoQK4yyod5LDQFwG4M 0w/Er2IVz0CyIyAATdXT4acksSqDyyIBW7Noj23cC9op8M6eGWSw0UDeSxw/fqaFwcEm RZ9przkcuBGJ57QqCPlPffh02HE56Q1UQHtWtmQFCNJL0XDxlkBe8DPt3HI8HYAY2sLX zD0g== X-Gm-Message-State: AOJu0Yy/XEXVhp5qnTOV+TkbjSXTI9CcO8D/+CmksGS28RH34sZ+SOvw 0HtR30Z1311N9BSdYchpfP0nziKKeCw+ir/hGk8vCQ== X-Received: by 2002:a05:6a21:47c7:b0:187:a945:8372 with SMTP id as7-20020a056a2147c700b00187a9458372mr597323pzc.23.1700082736303; Wed, 15 Nov 2023 13:12:16 -0800 (PST) Received: from wak-linux.svl.corp.google.com ([2620:15c:2a3:200:c624:fd:194b:791a]) by smtp.gmail.com with ESMTPSA id e16-20020a62ee10000000b006c31c0dfb69sm3163912pfi.188.2023.11.15.13.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:12:15 -0800 (PST) From: "William A. Kennington III" To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com, linus.walleij@linaro.org, joel@jms.id.au Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, "William A . Kennington III" Subject: [PATCH] pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high Date: Wed, 15 Nov 2023 13:12:09 -0800 Message-ID: <20231115211209.1683449-1-william@wkennington.com> X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:12:34 -0800 (PST) From: Tomer Maimon Enable GPIO output after setting the output value to prevent a glitch when pinctrl driver sets gpio pin to output high and the pin is in the default state (high->low->high). Signed-off-by: Tomer Maimon Signed-off-by: William A. Kennington III --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 1e658721aaba..62a46d824b46 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -1790,8 +1790,8 @@ static int npcm7xx_config_set_one(struct npcm7xx_pinctrl *npcm, bank->direction_input(&bank->gc, pin % bank->gc.ngpio); break; case PIN_CONFIG_OUTPUT: - iowrite32(gpio, bank->base + NPCM7XX_GP_N_OES); bank->direction_output(&bank->gc, pin % bank->gc.ngpio, arg); + iowrite32(gpio, bank->base + NPCM7XX_GP_N_OES); break; case PIN_CONFIG_DRIVE_PUSH_PULL: npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_OTYP, gpio); -- 2.43.0.rc0.421.g78406f8d94-goog