Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp410004lqh; Tue, 7 May 2024 03:01:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmoMJGMkkI1VHDD91NnErA+NGZyVB52cJHPVYR+UvtcaGP+gchPgsl1HwSwLoI23crfYlOX6LWMxMl/dLp3h2m2vsZ+3LQbbpdO4kiqA== X-Google-Smtp-Source: AGHT+IG9jleqOYuKZfUW+a0zzW7vLkC+NtGVmKSwcr3PfG7p07Qr+bh99dPmDrtzoOg+9+Lu5hW5 X-Received: by 2002:a05:6a00:9a5:b0:6ea:f05d:d2ec with SMTP id u37-20020a056a0009a500b006eaf05dd2ecmr14937676pfg.2.1715076069916; Tue, 07 May 2024 03:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715076069; cv=pass; d=google.com; s=arc-20160816; b=RP9O3fqjdgDIUm9f5c2UiAO8+owmouro0E27r6HCzDSQDJd1b7lITEGHSN1fgB9cEk PoZ0Poy4TXYHEPmt+SMmf2gzg7Bx6uTmnqUjKKjfwNqDuwO6CdlrsPHoG4b+n+YaUUGb R3jedhMxhBY/O0TGv2dqxYlqCD6SxkQN6318ITYte3GcaywYE1FUsqL8md789ThgpoJI L/I68KA6t6upMXFx/yr+DqyBTVI1Dr4FX6f7NT37VIG6E6tsL9lA6pvbrzPA3wJRpLLC IHjQFle0MTl+IC8DdsJeC9ODZ0l5R2ZNWn9t961n4PgxeR/mTk3nwcFEom7hLZ1iAvuS +SYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=bFSMri8IOp5B1+IxovMpqNQnX2FTTBoMbN3fnBfN5fs=; fh=hSIESfSxVbGLR/o0hJkfaAi3tA6ZKv+v+F97UlwckaA=; b=XmG/DJeYwg+Yu8bkQWDn1KfdJZ6fIAFGMedo5CLTG/GTQEym3PESPYwORs0dJp7m8Q lgMuXSYS9lEopuSOdq0o9CnFNPhSbbTGdiQjLiuid+WCWr03UNC1MPSIR5zQNz60kDHH T66v051iEzPZaoMekmDgYeTnIWyLCaRLofsbLx15i1h+XAzdqhxMb2rXd/7c1Vv6P1/u s3WzlGja5szjXSxYQNnPQURfUkMj7XVNZKxyEmpXxZkwE8CDzKZnWXYPQDZFYJRQz62h 2b4qt7Lw1tpPdKPvQPVa3m8bkBNQbUlwnm61ibVwomPRrosnht+W4XOmpJENBpDKqy1e IGSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sbZ0Oglq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-171055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bt27-20020a056a00439b00b006e65d654afbsi7427143pfb.32.2024.05.07.03.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sbZ0Oglq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-171055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C238F28366E for ; Tue, 7 May 2024 10:00:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97AE114D71E; Tue, 7 May 2024 10:00:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sbZ0Oglq" Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12B4714E2F0 for ; Tue, 7 May 2024 10:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715076025; cv=none; b=AWCtEFikhqW7yMdsnOcD90jr1/nEijM7R5g6FLtfAcvn8Fwo9fnsQSWpr1mE8a5F9EQQ9y7PIb0hhR79cQkb9zx2k56lSrC2j/gN+Q8Ecw1AqG3xzGUYhs6JZY8Tn2kVhZl9YkVy5VGYLYV2N4zenTlyGHBme9CuYb+Z+cQUMNk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715076025; c=relaxed/simple; bh=WctqNRdAkvs4yyN1XxR8U/bCnTGIZkl93cp13I5DYbs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NQobBxZp91o6zs1kEMxrx8qnfuJ/FsHdYNe1eyCIGzyR84mnW62Lcfa335hAIVDc08kFX5BYqJwH4rA8e3ByLYTzEfwVOeeG7oqz1rkv1gNnJzdlDnmdqbRwWr0iOBzcCcG1b9MpbPBqtfUo4C6WEc7bb9b3AF+QMVtjv8rv0NA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sbZ0Oglq; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-61bed738438so31430387b3.2 for ; Tue, 07 May 2024 03:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715076023; x=1715680823; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bFSMri8IOp5B1+IxovMpqNQnX2FTTBoMbN3fnBfN5fs=; b=sbZ0OglqdXpICj1NKcy/XdY7XiHVUSdwtcpxM9C92Y6s8Hxxmk4bhSbns6wr8BcCN0 XsDdAUhotCEd+KiPH0M4Q2QbKaNCXKIXtmUNKiQik8zLMotSc79fxXsn83N5xGwZCJIG vJBGV09EU9LrRRw2xliknZjfJxQAs+/HrZ++szNhvZUSRoEdnFXEQDZtbFm91zoGRfmc f1DjJNu41fFtNKU3mweVdPGuKrAQEdnkkOUX9B5hjr15Ccspqhq7uznOYI2xVCTX3neU TrQZ/NTqR5aZxctPUHfOn50fZnX+84eKHCVkQ4rMBR3KE/syY8pqqCYzTZLIVNfdDg6X zJxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715076023; x=1715680823; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bFSMri8IOp5B1+IxovMpqNQnX2FTTBoMbN3fnBfN5fs=; b=WmPsP83AE0eT55NC2gqEvPHC2irRoyzQ6esWEl3HrILgMjCAMo/Qq7XCFuOffUgAmk f7qXz/P1cp/9U3wrFRzUVtRQhweZlPVdmoZsEE/CTMVd742Erp7k3DQULY5IUIl2+eLf eUc3hCMj6yZIdshOh5P08XR3A5UOFKt9bOumGvsVpfbkQCT1OEXfGT0oS7bGum/jDVk0 9m9jDOhuHbuMNuFCgXNoSYxPYJ4c+hVkYyhqxAmToz98/cAG1RxUjGj/7FuhBNew+zyC TdVjz77GJnuxq8j6i/iHRzl2Po8+ZYYtS0ixDN9CVL59mOb9GYD5nWB/wANs0TPeb00W NXGA== X-Forwarded-Encrypted: i=1; AJvYcCV2+JsCVxGwQNXJtPYyGreBV1B7KxbYjNE7KTe7eICA/zldTZdiw2LUz/WVX4WcRRmW/y6K+cEneXiL7Y72Iz7DYm6C0R2IuL5Meixr X-Gm-Message-State: AOJu0YzSlYGiJVtV6wLzZhM1Vt/7mYAX91bdnIlbEdUf9GlbY9AJxNd7 QA2avQgWY6ppOomQXFuIdVCc/zL6Eeac3B0bxnIm5Ym0PcJLqj0O0lHGrONEEtVTxn/b7t6kv/i hqfs/EfEE14WEwAOuTAfcdmLkLLHzv9grkGM8GQ== X-Received: by 2002:a25:8e04:0:b0:de8:9348:b219 with SMTP id p4-20020a258e04000000b00de89348b219mr12156380ybl.6.1715076023009; Tue, 07 May 2024 03:00:23 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240429102510.2665280-1-andriy.shevchenko@linux.intel.com> <20240429102510.2665280-5-andriy.shevchenko@linux.intel.com> <20240507081441.GA6025@thinkpad> <20240507082822.GA6659@thinkpad> In-Reply-To: <20240507082822.GA6659@thinkpad> From: Linus Walleij Date: Tue, 7 May 2024 12:00:10 +0200 Message-ID: Subject: Re: [PATCH v3 4/5] PCI: imx6: Convert to agnostic GPIO API To: Manivannan Sadhasivam Cc: Andy Shevchenko , Frank Li , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Xiaowei Song , Binghui Wang , Thierry Reding , Jonathan Hunter , Thomas Petazzoni , =?UTF-8?Q?Pali_Roh=C3=A1r?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 7, 2024 at 10:28=E2=80=AFAM Manivannan Sadhasivam wrote: > On Tue, May 07, 2024 at 01:44:56PM +0530, Manivannan Sadhasivam wrote: > > On Mon, May 06, 2024 at 02:10:24PM +0200, Linus Walleij wrote: > > > On Mon, Apr 29, 2024 at 12:25=E2=80=AFPM Andy Shevchenko > > > wrote: > > > > > > > The of_gpio.h is going to be removed. In preparation of that conver= t > > > > the driver to the agnostic API. > > > > > > > > Reviewed-by: Manivannan Sadhasivam > > > > Reviewed-by: Frank Li > > > > Signed-off-by: Andy Shevchenko > > > > > > I think there is a bug here, the code is respecting the OF property > > > "reset-gpio-active-high" > > > but the code in drivers/gpio/gpiolib-of.h actually has a quirk for > > > this so you can just > > > delete all the active high handling and rely on 1 =3D asserted and 0 = =3D > > > deasserted when > > > using GPIO descriptors. > > > > > > > Wow... > > > > So this bug is present even before this series, right? > > > > > Just delete this thing: > > > imx6_pcie->gpio_active_high =3D of_property_read_bool(node, > > > "reset-gpio-active-high"); > > > > But this is just a bandaid IMO. The flag for the PERST# GPIO should be = properly > > set in the board dts as per the board design. > > > > Hmm, no. I was confused by the property. But this quirk in gpiolib-of.c i= s going > to be applied while changing the GPIO state also or just during request t= ime? It's applied permanentlt at request and then the descriptors maintain their polarity state over the course of their lifetime. Yours, Linus Walleij