Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp27015lqd; Tue, 23 Apr 2024 13:23:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0kbwLgGaskN1oGl0KGHna9ZNbuBCfix65kYFEgXCs3ifn5afw6xvX2lDbDYmGsO7MisvsMiG/AH+YqJFrcwNZRD3iZ8dbYoMJo0GXfw== X-Google-Smtp-Source: AGHT+IGpAbQPLl87z6xhOhzeHdutopebxmazihq7aLp8BKPIWFZHYtUglKyH7eCfBnPD/05+aaSB X-Received: by 2002:a05:6512:38d1:b0:51a:f362:ab30 with SMTP id p17-20020a05651238d100b0051af362ab30mr425443lft.7.1713903834612; Tue, 23 Apr 2024 13:23:54 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jg25-20020a170907971900b00a52122ea65csi8006996ejc.459.2024.04.23.13.23.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Yt3hXkHe; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-155846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 245331F240F1 for ; Tue, 23 Apr 2024 20:23:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55EB414290F; Tue, 23 Apr 2024 20:23:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Yt3hXkHe" Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2073.outbound.protection.outlook.com [40.107.104.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE3AF1422D4; Tue, 23 Apr 2024 20:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.73 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713903823; cv=fail; b=mxaAnATLZJB5haXJD31kykO/mVLpZysvrvjtpjhL/sq6z+v3f/I6P8yOViVwE8mEA1b1/8BaQU0oMNkyHTTIhlmqXQpKCdRNxtCsM3FPvjCVqnqyw8sBQLDwhyfghqIM2pU96001/GXmqN36W70txMeRQUsbBgVjLge9QREjWAo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713903823; c=relaxed/simple; bh=an/TOhL7pUB+lrpojGg9hnMakXSMAoH/2NFRqr5loLQ=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=FMO0GDFsdto996tv1cbXp4tPBRnLRLLnjuYDsmOxqK7f6HN6za2XfFmB2ynG22X3IuV6yhSixkqeyL1/L5Mw7UUNa73PiQjl3AY+c4/XvOnyFzRf1qX/yxKAy8VwtFMUtC2Zqg12LdVTxFepHoeicsyRInCjtB7+mz9bZ92STBA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=Yt3hXkHe; arc=fail smtp.client-ip=40.107.104.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=la4cMJVwnN9PppJFaYEy089LlDDTdD5sXHWUN0ghzsTt60fWmLPH3nWkSm7wbKaDpf/gum9PUGMtzPP6Zj7onC8L+F/LD2I6d+lTs2UN+WfLui2p7sIuG2wuwvUfukT4W/+Dy2vfdqW/0gfut6Bu6J1RigMx4moPY9ceJArmek8PYPYERKHP7FwV5FQXzOQRh4v0o41XW4zjmbvlreYRoxd0Unp4dtk00frzJLL5bfo/3hk5c+BT/3pGhIAij0mj8CN6ZtrGHMd1irtx6vcZuEuRYfJwocppq69MJzlRasFAPAGR7o7g7SL9tMAbhLVClUp9VDBLUi9dWO49HWtmEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0a+Js7elHfVkkwA5LmfROcELMrGjeCLb2qiC5suCJTY=; b=jxIjdmy/HqMH0wyjGnjIA3zh8M33qStMjscm6mL+pCLvC26tirRRuoHbI8ECQJm4isn+VIEv+ww7Zc2gO6K3k0Cib/innRa8bxGSlrKxeUrxNDemT0dUXktiCJa0FAzaLnywgU32CiQ/C2vyovS0GktbAne4iCDI4LZilJo9nHKMGTTSXCA3ypQUme3vVS/D7MqDjM0wBKRvr+j5q9px7xQjJIaYaI+4/LiwNDXfqEh9zmp1u78GdeJxUwtpBBSOTSo2mv8knR0j5J2fV50FLnu/UGiM4ay09ZWS0WgOkkc6clgaYPzjIxI0g9KYu22jBWCMtnhLL/QvXE2jxrIi/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0a+Js7elHfVkkwA5LmfROcELMrGjeCLb2qiC5suCJTY=; b=Yt3hXkHeuvv/4tHMGEgGIln1dWSH/1npmXCJcS6F5YIi/GcUWx+g2lyr7XFzAZLGIjWg7kSIMW39mj5Vv1yFw5i7QVLef1H04FTKgTXHyQDqhLOk9EfxjCL0OfJJv7PSKEDdAK2EzYw6AEFzAduQA/G1YnveHOS9p/Qi3vZb4QU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA1PR04MB10169.eurprd04.prod.outlook.com (2603:10a6:102:465::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Tue, 23 Apr 2024 20:23:18 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7472.044; Tue, 23 Apr 2024 20:23:18 +0000 Date: Tue, 23 Apr 2024 16:23:06 -0400 From: Frank Li To: Andy Shevchenko Cc: Manivannan Sadhasivam , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , 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 , Krzysztof =?utf-8?Q?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 , Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH v2 3/4] PCI: imx6: Convert to agnostic GPIO API Message-ID: References: <20240423172208.2723892-1-andriy.shevchenko@linux.intel.com> <20240423172208.2723892-4-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SJ0PR03CA0224.namprd03.prod.outlook.com (2603:10b6:a03:39f::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PA1PR04MB10169:EE_ X-MS-Office365-Filtering-Correlation-Id: b64f75f9-a092-45f4-26f5-08dc63d3367b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8yiShEKiyqqkUtcMv+qMciDg7kemd2oIZTMPYmmHG1/rtYkAoNqc0fF4IiIv?= =?us-ascii?Q?dmi1P0/gJpe/SMNK/vDn+oYFbgBZHmf3/oHdKD2rJx7piGtR2JYzqamvZWzT?= =?us-ascii?Q?D4NxIW6YsB4qRup09Gwv5ofRTjcCxqrb/1EUk3VSAgFCzVRzPShEoL8KOX/h?= =?us-ascii?Q?nWPxb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ffn1IDQnsCBv/WlwR?= =?us-ascii?Q?oAyj5wmv6G5EqbE04CAhpKdFs9ejflZKCYcyEtgEqjYejNex6voNrOXkurUg?= =?us-ascii?Q?6xSEOlkL99KG/jUvqZvqP5yOJsNhLXcGz4rc0FSwHcW8gWurSTdBHmtTefg0?= =?us-ascii?Q?mvKJh8hA0nVeVLA6xvgqcidkfni7pxD1BXkvYbzVHflatfkL908Y7ClW+A8e?= =?us-ascii?Q?tTzLea4ggngFLiO8KvRR7KZTK/8w3vlp+nsRSnSpYG4nazJtQSQKlror5ByY?= =?us-ascii?Q?9ZB56ypBDy413lA6IDyk9iL6zwRwssiSxlnQCAhZ8hgcCg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(52116005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?r3T4Wpt/g/Y5f1wZ25LCK8fqTUkl/jJt+frZcf/rKPvIC+wWisSPVKrW+Pg6?= =?us-ascii?Q?DnfhsZJUSp7vJr0mYjE8aTLVnnLdeq9m+UhczihiIG8Nciqj5eaWoJYKdQnw?= =?us-ascii?Q?4wNLcCWxe0Wn1aR7K3mAEX0dchVImAC2cMq/cLTfywYuPqmERe1r/s0dQ3mt?= =?us-ascii?Q?V2WTlWi9V4tiW7UGqWeExjO6ojTW6pMFybUvxK29wYn9iRGKZ9nMB1XW6FHK?= =?us-ascii?Q?BMo+28ku+7MDtOlUIPlLVmzIfBBKehpPdeYmXR9JQp/crZSgbXs3Tsvoaj3m?= =?us-ascii?Q?ZoIhcEiFRILEeuh5tnJpdX5gZLbEusLqit/QuQ+mE8KxRlELgRMIRFavjgt9?= =?us-ascii?Q?bb02zTbi7SQFI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K4jhcrUbk1Rfsfa?= =?us-ascii?Q?stAQGshZLdwarLYTa4m3zlanUmUeDaUFtKY2r/XGQCaC2gUwpRorKAm20Zka?= =?us-ascii?Q?UWc65MclVOiD8yi6DVag9Ps3gab4lPpzDFBab853L7BraKUJm06NjHuIKVWy?= =?us-ascii?Q?szQgQf9KvHdqApuGK7vSsuXtnEYp4fAHfxdFASVfR/HvfYdJAVdhAfKRX+HC?= =?us-ascii?Q?jERadBedpndCTNaeLijLh7/jflfGZ7Husg7EjLk3u1hZOv8aBGfp5ctfS4eC?= =?us-ascii?Q?eKsS+9Krm9hIlMkUkj4B0oZzbg8eNRnMZ8Kn094acVheU6E+UzW0OnABE4M2?= =?us-ascii?Q?yoVRNR0M9J68JEuj1DRCr6NLYYv1/iUoRJFiR2+Y?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b64f75f9-a092-45f4-26f5-08dc63d3367b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 20:23:18.4883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KTx85ekG1/Rq6NQFinYUq8AUqIOVahBwkxIH9KZq1gz4DunP1A9QcR65w3bi1iKmBJqaBdoB/bhDgKhyp04Stw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10169 On Tue, Apr 23, 2024 at 04:16:36PM -0400, Frank Li wrote: > On Tue, Apr 23, 2024 at 11:03:59PM +0300, Andy Shevchenko wrote: > > On Tue, Apr 23, 2024 at 03:56:56PM -0400, Frank Li wrote: > > > On Tue, Apr 23, 2024 at 08:19:06PM +0300, Andy Shevchenko wrote: > > > > ... > > > > > > + imx6_pcie->reset_gpiod = > > > > + devm_gpiod_get_optional(dev, "reset", > > > > + imx6_pcie->gpio_active_high ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW); > > > > + if (IS_ERR(imx6_pcie->reset_gpiod)) > > > > + return dev_err_probe(dev, PTR_ERR(imx6_pcie->reset_gpiod), > > > > + "unable to get reset gpio\n"); > > > > > > Small problem here. err message "unable to get reset gpio\n" will print > > > when -EPROBE_DEFER happen. EPROBE_DEFER is quite common when use i2c > > > expand gpio chip. > > > > I'm not sure how you come to this conclusion. Can you elaborate, please? > > P.S> I do not see a problem as described. > > If i2c gpio-expander driver have not load when imx6_pcie probe, I supposed > devm_gpiod_get_optional() will return -EPROBE_DEFER, > > if (IS_ERR(imx6_pcie->reset_gpiod)) should be true. then dev_err_probe() > will run and print "unable to get reset gpio\n" with error code > -EPROBE_DEFER. Sorry for that. dev_err_probe() already consider this. Please forget my comments. dev_err_probe() { if (err != -EPROBE_DEFER) { dev_err(dev, "error %pe: %pV", ERR_PTR(err), &vaf); } } So: Reviewed-by: Frank Li > > driver framework will retry imx6_pcie probe again when a new device appear. > it may retry sevial times utill i2c gpio-expander driver probe success or > timeout. > > Frank > > > > > -- > > With Best Regards, > > Andy Shevchenko > > > >