Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3440643pxb; Mon, 16 Nov 2020 15:02:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh5L0WJ6c2XLgEjAlGnGiD3hXy3WuuSs3qf8uwTjr6Ym2UVZbU+Top69+XTsp/nWYupyKj X-Received: by 2002:aa7:db8a:: with SMTP id u10mr18317135edt.204.1605567754093; Mon, 16 Nov 2020 15:02:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605567754; cv=none; d=google.com; s=arc-20160816; b=RNi821+apKTRR7wCsw5gOJZ3PJGGNEyml3KsuxjqZ6lkc70zIOcgSuSwyjaOJc+bSY NN7mKuhX3PP9fTOgxRJsMGNNRLGEixYe3Glt5W2rC7RE84PsP66lq1RQDLxvHAO2Z4Kc ixczMYwHkt/52vr4U2tvjKOeU9xchq5nHQRihYj5u6Rul8NpvnlCk/93RWQoYGOvHphf /rdmisbJSt5PV8JYJDLqnvxrBtMHzh68YaC0PtkjrG4UDWkCF4sg2fTMYQdPKP8BTrdG MMCXsvorq/1efbnMTR0NMfwiuPypied/ijAHsigE0l0iMdQsbEnMAdA99cxvJtF3oneg pHDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Jg+RxZauwnh0dh6jwmWN33Uz7KM6ODP2EAS1nPOc80g=; b=ZvdWcOLAEsb2zGIA6xjstQoPhP1+I0EJytjKYo19ZAKKcEFCbj4NnNhHBHXpBEFuAF J7C99Kqnf6GgpVsmYpOJZnR4SIkcKAVkIJXBZ7hmAggyxhZBzjuTscHDIpgLCcID3swc 0Vh8nP9lfZjb/30cf+brGYqPeeAyY/vE2oOyS8/YqfNSaTzSIUga1n4r6kBfgcEkWhwM iNBO5H8fRiZTovVFZ2WvrT/qCzmeKmtXXc1YVN0BeXpjhd41LYAXRreANgPmTXIekU3U XaI+ROFaV7hb4eB3cowL+Vj3tervF0fiJmq0HYAHJmPqBztEzsWixvdX2sMWWOi1tzXm zFOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=a1EDH7nm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si5473422ejs.534.2020.11.16.15.02.08; Mon, 16 Nov 2020 15:02:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=a1EDH7nm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729592AbgKPWX2 (ORCPT + 99 others); Mon, 16 Nov 2020 17:23:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729558AbgKPWX2 (ORCPT ); Mon, 16 Nov 2020 17:23:28 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D1EC0613CF for ; Mon, 16 Nov 2020 14:23:27 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id 131so4985719pfb.9 for ; Mon, 16 Nov 2020 14:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=Jg+RxZauwnh0dh6jwmWN33Uz7KM6ODP2EAS1nPOc80g=; b=a1EDH7nmrkcfUkrAK0WbDmN7WIfCbWZYgHrBM3PUdAvKMxC2bmcVAIFL+7yfT/AqFQ +0rJupnpRu86I/Wefkhvdpj+7U9JZ1D2tWNASzt4rz/zBvfSOtIbzlFbNvBq0ZX6H0XW iett+I0NFCqPpJdCUpbwS9HPvc0YjGWEenxZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Jg+RxZauwnh0dh6jwmWN33Uz7KM6ODP2EAS1nPOc80g=; b=bcv6FV3CFzGv8Utuq7V22brE4RiVRYfXWpJXGffUHaWj9QZIMIIaenz6kW8osQA2H6 DKY3E+0eH+2MdxB9jR26ljbeCtf5Il52DmnRFnM/X189xm0odwpa4grZbYjNyNbEcJXr Abg7cipL4x8s6J+ub9jqNvVNXzEpqDNAMo8bWH10ujhxO8bzcMXmAlHtxolGc9+Kwc+p PSoK63wb/dTKcl86l9vPNexH8CnhWr+vAMKcsoRH6Zq0EK3waV7VRTYHFu3Ch4LD1zWz qzjEdFEOft2gkKXnoU9LrtxyO8cNRnrplWiS7DoyxBtAuPikifrsgbUZ5fH75Ai38h1D W5Xw== X-Gm-Message-State: AOAM531SFH+HDEEr/g9uks2Wd0gjZVwOSlhvJEVNo3KVJg1mj+JPxHUR m83Dx4RMCAXd3587OczIsDVFVWOAb/tjcnu3jTdEMf3idgaOpuwKvEw5Hs7yrCeBHKqFKenbk/K X40AjE/MY/7pnb3xqQmXHAcxCbAYT3kPUKaCw2CqZsQown/minyE5LQRfLLU/Y7GrKWFM7bvB67 LcxAYbgg== X-Received: by 2002:a63:df58:: with SMTP id h24mr1123205pgj.206.1605565406795; Mon, 16 Nov 2020 14:23:26 -0800 (PST) Received: from [10.136.8.243] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id mt2sm462274pjb.7.2020.11.16.14.23.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 14:23:26 -0800 (PST) Subject: Re: [PATCH] pinctrl: bcm: pinctrl-iproc-gpio: Fix setting GPIO as output To: Mark Tomlinson , rjui@broadcom.com, sbranden@broadcom.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201116215842.29488-1-mark.tomlinson@alliedtelesis.co.nz> From: Ray Jui Message-ID: <2d0ed323-d2c4-b60c-7f10-a313458e4656@broadcom.com> Date: Mon, 16 Nov 2020 14:23:24 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201116215842.29488-1-mark.tomlinson@alliedtelesis.co.nz> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000c5fbfb05b440d3f5" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000c5fbfb05b440d3f5 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/16/2020 1:58 PM, Mark Tomlinson wrote: > When setting a GPIO pin to an output, it is important to set the value > correctly before enabling the output so that a glitch is not seen on the > pin. This glitch may be very short, but can be important if this is a > reset signal. > > Fixes: b64333ce769c ("pinctrl: cygnus: add gpio/pinconf driver") > Signed-off-by: Mark Tomlinson > --- > drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > index e2bd2dce6bb4..cadcf5eb0466 100644 > --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > @@ -348,8 +348,8 @@ static int iproc_gpio_direction_output(struct gpio_chip *gc, unsigned gpio, > unsigned long flags; > > raw_spin_lock_irqsave(&chip->lock, flags); > - iproc_set_bit(chip, IPROC_GPIO_OUT_EN_OFFSET, gpio, true); > iproc_set_bit(chip, IPROC_GPIO_DATA_OUT_OFFSET, gpio, !!(val)); > + iproc_set_bit(chip, IPROC_GPIO_OUT_EN_OFFSET, gpio, true); > raw_spin_unlock_irqrestore(&chip->lock, flags); > > dev_dbg(chip->dev, "gpio:%u set output, value:%d\n", gpio, val); > Thanks. The fix looks good. Would you be able to also help fix this in pinctrl-nsp-gpio.c ? Acked-by: Ray Jui --000000000000c5fbfb05b440d3f5 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQMwYJKoZIhvcNAQcCoIIQJDCCECACAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2IMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5xh9wjx9sScVpGR5wkTg1 fgJIXTlrGESmaqXIdPRd9YQ+Yx9xRIIIPu3Jp/bpbiZBKYDJSbr/2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