From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8983C4345F for ; Thu, 2 May 2024 11:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/CGLE11ad4S5lAibJGcVJ/R9H6M/j/jg7ItQIk0iH+U=; b=S5yUcHXD+xhpdS AyGI3kRW+WNZym63XcjTGQ2T9GP06SCdHpnQ89rQw9Y+Ecx8bjCNJQsBEnM7BNIg98UG7XxOdRbsC mT2AP7jIk8jqWn+7ozaPN/sHsvG0tUNdVramibwhTplSAWeDZn7PKR0s4Yxzby0CXhUnqgZHbVA65 e7+aUoC5LvTofJKNdN3ipdinekOLWh5NK3/0YSMPZ/Jz8+x5TwbaGHtfZbSzZYh2DDe9PMyXIsNCE IFLxwBeMZQFV/uubUD2Y8QxikWvmH6PukHX36q4GNtXpRwLqW6+LFc4F/Gc858bz6g1i3CoSybidi BC0Y7L3hVvqm1zKTjOrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2UFA-0000000CSEY-2nHM; Thu, 02 May 2024 11:04:52 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2UF8-0000000CSDG-1azB for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 11:04:51 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1ecddf96313so6374955ad.2 for ; Thu, 02 May 2024 04:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714647889; x=1715252689; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2gWPGa41ZJS/xXBUGG8sBlT//2oX2yPG20qE0bIPU4E=; b=PnScq3Db3VAEHj5xX5k70GaHpFb6j50jSgXq5oqUGGzFVIOPpyKduJYQBWQOCftA0l 9IcTosN/yPiVVCmMAd0dUNsexOek5xzaKfBLDuD7zXRGnIs4ZQmKe0ORrHy7y9cP/9Ld ovSjhzsYVz8/WvALuH2xW7aCQ7Ck+dEqOJxS+cB3aWCsmbxoEv/R8MIs5ziLb96xg813 8KF2mmz5YO0OaKKRKgXC8o8AVfFJpN26o7HhxD2z9JqLJQXjuXJ3NY8GuuT7o03emesb kRfCGtvy3hAfjpsh7I+8jWT7SYFEbDH91kpL0bP2IT+VNqvC1veV6MOgoiocPVYMY/RA MeHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714647889; x=1715252689; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2gWPGa41ZJS/xXBUGG8sBlT//2oX2yPG20qE0bIPU4E=; b=QOmxDRXcCNUUG4mNr1RtrDPJ78cemJbIiXvgFWkj8V7af5/ssiA4UQAnSP0aBfEZaG bwLKTZS3IETm3ahP+4S0Olmt82FupFNHFlFxPy3qvkBXPaPHpWDXcr9RgrKbEKEIQfxm FF2Xk1s4KOaDOhh8+davCjVk5AL90JB4hkidK8ExZwwi0Uc0qk+GPQ6AtrMCUcyaeqcE xHJ3Vvi1k5g/eiMgAyYFww65BvmYymfOBPTzBW/OZh8Ok0k5pxbCCsLAsKunBZXAeexY Qxq/xJmpPyEgUYOLkwvmUPwVmixnRgTlIOXTUvK4fhJVBxvw/atm9yYR2Df19MJ22Yhp NZhA== X-Forwarded-Encrypted: i=1; AJvYcCWlUoU1gQGqM/RqXzGjH3H0guhk9YbYGoK23jPytKbvpg+BM/Px7zatLbqzekj4QglmhZ4AsFKiYiYz8TY+6MO+IbEP8ZchqDF9mLc386xnMgq7kFU= X-Gm-Message-State: AOJu0YzB1Nt7YQgaQSUFBWMygUFb1PMLlvu2wPAJVY20RZqo1Hev3Mg+ T4bK2DyqM3THeTsQ/VmFArDO2Kzm/C71MTEcSEBlCyJJLqMrdzS7 X-Google-Smtp-Source: AGHT+IGCIKqSw6L/w+4gnPbAE8ruEpDuz3KbL9xnQAuQQLdbKWtXn29S30EOE3G7TPDp51OxMFPJ0Q== X-Received: by 2002:a17:902:c084:b0:1eb:1240:1aea with SMTP id j4-20020a170902c08400b001eb12401aeamr1714131pld.20.1714647888767; Thu, 02 May 2024 04:04:48 -0700 (PDT) Received: from rigel (14-200-166-65.static.tpgi.com.au. [14.200.166.65]) by smtp.gmail.com with ESMTPSA id t4-20020a170902a5c400b001e7b82f33eesm992557plq.291.2024.05.02.04.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:04:48 -0700 (PDT) Date: Thu, 2 May 2024 19:04:42 +0800 From: Kent Gibson To: Stefan Wahren Cc: Linus Walleij , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Ray Jui , Scott Branden , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski , Phil Elwell Subject: Re: [PATCH] pinctrl: bcm2835: Make pin freeing behavior configurable Message-ID: <20240502110442.GA315256@rigel> References: <20240419204057.86078-1-wahrenst@gmx.net> <9a7fe0d8-ff44-4904-84cd-7b133f40a74b@gmx.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9a7fe0d8-ff44-4904-84cd-7b133f40a74b@gmx.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_040450_458424_A4A84EBD X-CRM114-Status: GOOD ( 20.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 02, 2024 at 12:22:07PM +0200, Stefan Wahren wrote: > Am 19.04.24 um 22:40 schrieb Stefan Wahren: > > Until now after a bcm2835 pin was freed its pinmux was set to GPIO_IN. > > So in case it was configured as GPIO_OUT before the configured output > > level also get lost. As long as GPIO sysfs was used this wasn't > > actually a problem because the pins and their possible output level > > were kept by sysfs. > > > > Since more and more Raspberry Pi users start using libgpiod they are > > confused about this behavior. So make the pin freeing behavior of > > GPIO_OUT configurable via module parameter. In case > > pinctrl-bcm2835.strict_gpiod is set to 0, the output level is kept. > > > > This patch based on the downstream work of Phil Elwell. > > > > Link: https://github.com/raspberrypi/linux/pull/6117 > > Signed-off-by: Stefan Wahren > > --- > > drivers/pinctrl/bcm/pinctrl-bcm2835.c | 20 ++++++++++++++++---- > > 1 file changed, 16 insertions(+), 4 deletions(-) > Gentle ping ... I can't comment on the substance of the change as pinctrl is outside my wheelhouse, but the "strict_gpiod" name could be better. The point is to make GPIO outputs persist, right? The name should better reflect that. Cheers, Kent. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel