Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp69274lqo; Tue, 7 May 2024 12:23:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvVNil3TPAbeZXZJo7HPonY5zY+ctsP+XSq11UuEXlVUeDkccu8ug3mgWbZrkMu9PNY8Y90mIuuA9U9cjFRNOpbi9SyZvWYvV2d/g8Og== X-Google-Smtp-Source: AGHT+IFKuALec7XeM9Vw+ENmNzI6dfqW/UAjPLAmFhYPJHJuVCg0m+FoUrDHzsi8sz0yLWRQ3hvT X-Received: by 2002:a17:902:8f91:b0:1e7:eeb3:e295 with SMTP id d9443c01a7336-1eeb09a21afmr5517735ad.69.1715109814488; Tue, 07 May 2024 12:23:34 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n8-20020a170902f60800b001e0be222e6dsi11188748plg.189.2024.05.07.12.23.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172059-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TvNowXeD; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-172059-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172059-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DAEEF28A326 for ; Tue, 7 May 2024 19:23:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B77016DECA; Tue, 7 May 2024 19:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="TvNowXeD" Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2044.outbound.protection.outlook.com [40.107.8.44]) (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 B8AE016D9BC; Tue, 7 May 2024 19:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109772; cv=fail; b=juNV2n+zWS0CG6oSvTp8wTIUuagGGyTZlNM7cFRFc4PlZ8n379yOx1rDEouJTNJEMD4D0Sbofb4CNnI0svk81n0fjk2MuXDk76ijagX4OJb994chgnPsjYexBfX8EHUBQKv92ms9jMN0Tgxcrr9Xeb+kIcBPZOzT9XFOEKDj+p4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109772; c=relaxed/simple; bh=iZTXBOjSett8kqVNXkIPncZQsEXyngZBd6C+nPStJyQ=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=apYkM313iX5U28SZ3GpP6CaDj16X5e8oL9PVyDr0OvOZFsuyFvzWLjvy3y1zL/o7deGWnoK0Lj/UhpfqW6Ao5eBmgyIJLEKWAZRTue7YI7EOHgbsv2HafEPyUV/6Y9PBVVtgmIBNzokv+PZs4E7sw4dfbj4XJoEpFA+zhcG62j4= 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=TvNowXeD; arc=fail smtp.client-ip=40.107.8.44 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=cre5xAfeynLZqxjm79JUBaGKLrr7OaQhVAr4VPENxTVwhLnMJvG4osH4i05wJCBKSYRAc8SipQ8zB9I01fQfffgwo86wdTNEGkP26r4dpQqD2zcYMvtaDhh9GWz7StLDdwfCvowL4PnwVeFfG1aXYJloAHmzf4sjd3oxS+exueZk6a5fy/01gkgO0aEM+eJ8Ek+RGAdvJKCxnJr4hpGnhOX5FZaJrSWC3JaQGZA8QrWI5v2zk1+DUkeDDYtJUIY4hdOaTH4YOcU6Evs0u63f9Eg0yQcYFEUH0m4Ql2l1pcOz1zLccDGlQhn+2CG65nnt3VK6YrereI0QXGbT4q/guA== 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=0JRYekvafAkFsK+ewCfN7nzNDf9LkDH0Bxxo9KPvwtc=; b=JyNa5CSwOf7rcnX/VnAhocQF8yHujt39dJAm85Ur2Ex9eZ3HB6CkZYTKGQ0EALpuXT33mzxkGIAd+ivmM4Ny5yVKoxFQBfNG81oNFPz2h+UCL482NoiAeaKUbyZhra7aAZ0wvyra58CkGBlj2ul/z4hrUe4xoFnN2wQqLEcd7nL0/It4lUDfXuLbnoXQ+rKEY9e16N+mWxwxaabzpWpStIOYegJ/JNXdTM52TMTyxw+RqTbNuYTadqcKyJUyQTDrr9EO0kTKVuc/j41D4k4TMTlPdmCOdhnvsJCPXOPZVsVlyAwknCPiAFU7XsqkXHFVvwUWdn1EvpkmP2Av8ByEMw== 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=0JRYekvafAkFsK+ewCfN7nzNDf9LkDH0Bxxo9KPvwtc=; b=TvNowXeDUaKfIZR+PcfKkzX6cEcc7QBia2FNwCjxQTS0Mi94z+Kg3zxSLvsYAwaoFmf4GI+nnc/BUZcQknOf57OdofwrYztu3aW/XGW6vCWNlJj4hAGtzl0POpy9a3PcdZ/PimUGf4fkfyVADhY+qR2mXsasNC9khM6nHwTwHRU= 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 AS8PR04MB8785.eurprd04.prod.outlook.com (2603:10a6:20b:42c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 7 May 2024 19:22:46 +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.7544.041; Tue, 7 May 2024 19:22:45 +0000 Date: Tue, 7 May 2024 15:22:33 -0400 From: Frank Li To: Andy Shevchenko Cc: Manivannan Sadhasivam , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , 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?= , Linus Walleij Subject: Re: [PATCH v4 4/5] PCI: imx6: Convert to agnostic GPIO API Message-ID: References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> <20240506142142.4042810-5-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240506142142.4042810-5-andriy.shevchenko@linux.intel.com> X-ClientProxiedBy: BYAPR06CA0007.namprd06.prod.outlook.com (2603:10b6:a03:d4::20) 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_|AS8PR04MB8785:EE_ X-MS-Office365-Filtering-Correlation-Id: 6de290e8-cb74-4f59-55c3-08dc6ecb1320 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|52116005|7416005|366007|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sP0e7g2haWoqj7fKp+3/kkYAHDGeTtJaegYjIzddy4SqZs5C9rcsRZ5/pE5j?= =?us-ascii?Q?vzJZWaokNLCZOO72ts1zpuoDkk0vYsavz/sKUjKEMrBYxke2AUypvsKrP2FO?= =?us-ascii?Q?hSE6iYb7JrgIEZHeOpQR1c9LjljrTVvC5hLWjstO/JUMddX4h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Sw1y4WhFmx7XFAcEefBEhxl5OYK3Affx0V9DgRHObTZX1EP?= =?us-ascii?Q?taSE76APY1ex+u+3JxjtoLBhtg/AK5vT4AS4gLz54i0LRERhZjnXAR0BT/ab?= =?us-ascii?Q?Ra9zVIrORIeuQS52W5UFV2hPrqVIoVcFrqLsNGZs7NchXE82E/FSwqVT+vTK?= =?us-ascii?Q?fhHU3E3ovBy0ULK9JIU+AhFD66GqZ1FhNZH0/Cei3pFy6IWcHtwxu8V0kGHm?= =?us-ascii?Q?7XbwxVqhrkn+oT1WNBzynUnuVQNkIoKIteKsSIKhrw=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)(376005)(52116005)(7416005)(366007)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?QVSUFJpCCxnhUy9On/PuB0lev0fxURNHnOTIZgDiTtPCzf2QcVTQ9mfUyBzj?= =?us-ascii?Q?CwtndArE/H/enKpfKQfQpM+n6R/1g0PDPmF+HqWCb11hjlIsrAkwQ4I2Oqdr?= =?us-ascii?Q?qMt3hZDETwWtqHUxtxJT6P+4hdiSzD4tUl19YLCadgVzZ43xpZtmm8dpytVv?= =?us-ascii?Q?ZwGSW0mdmBamfHLV3xb0X7LhkMqUk2JTNZ1CnCdBB9A8BaXSH2U485pvkBVv?= =?us-ascii?Q?Uwg2JQfYyYM6BfQa35hR8G3xB4Tqjd46LoOhFOfR2v4mx1Dt1ktz6O9QnoGv?= =?us-ascii?Q?izIuq485WsN0ROBicwfFCbGpiKbFyfIyRFIZxsL8obtkOiTftVoQRClpHOwL?= =?us-ascii?Q?49qqzluF1tfe4eRdFuVtul4fGY3NMgkiVf8Q3xveobFb725CpzCVkhQhJWqR?=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MeT6p49hZBRPXTYiPFm5XV+mBiS?= =?us-ascii?Q?fFNaNYWXdGoTu6fXovrOcqp6oG7ARRkUGf71Vf/19PH+0Y9piyg6VbeUIIPo?= =?us-ascii?Q?PZiQ3n6zAoOD6WwpA1GcMqAuFh1gUaSxmLTfi5cAse1SLIC+hX2RvemKHobQ?= =?us-ascii?Q?WIRf2ECbZAWDr6SoV0ZrtItzfK4DVJ9+qx9MG3x/dx0/KO4LkVhyCtdzJT3c?= =?us-ascii?Q?HwKYOEd/hu/2m3LPURsPowflthjOU9CCqzdofCrh1GLsAHyCsent3Ybfhzt1?= =?us-ascii?Q?Xk/jjXZHHVyAD/dcarFvHYqIKnNB9dm+7EovzZ+M?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6de290e8-cb74-4f59-55c3-08dc6ecb1320 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 19:22:45.9085 (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: BQpxN1R6HGpaMCb0b0Y/2A4XtPD1z2J59DmS2qkcRcfCKfTofhp96Ma7smkcdXkz4SOaY5ZRbpl7IbKtc/5W7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8785 On Mon, May 06, 2024 at 05:20:40PM +0300, Andy Shevchenko wrote: > The of_gpio.h is going to be removed. In preparation of that convert > the driver to the agnostic API. > > Reviewed-by: Manivannan Sadhasivam > Reviewed-by: Frank Li > Signed-off-by: Andy Shevchenko > --- Can I include your patch in my imx6 pci improvement patches https://lore.kernel.org/linux-pci/20240507-pci2_upstream-v4-0-e8c80d874057@nxp.com/T/#t There is patch, which rename function from imx6 -> imx. That will avoid conflict. Frank Li > drivers/pci/controller/dwc/pci-imx6.c | 36 ++++++++------------------- > 1 file changed, 10 insertions(+), 26 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 917c69edee1d..62a4994c5501 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -11,14 +11,13 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > #include > #include > #include > -#include > #include > #include > #include > @@ -107,8 +106,7 @@ struct imx6_pcie_drvdata { > > struct imx6_pcie { > struct dw_pcie *pci; > - int reset_gpio; > - bool gpio_active_high; > + struct gpio_desc *reset_gpiod; > bool link_is_up; > struct clk_bulk_data clks[IMX6_PCIE_MAX_CLKS]; > struct regmap *iomuxc_gpr; > @@ -721,9 +719,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) > } > > /* Some boards don't have PCIe reset GPIO. */ > - if (gpio_is_valid(imx6_pcie->reset_gpio)) > - gpio_set_value_cansleep(imx6_pcie->reset_gpio, > - imx6_pcie->gpio_active_high); > + gpiod_set_value_cansleep(imx6_pcie->reset_gpiod, 1); > } > > static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) > @@ -771,10 +767,9 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) > } > > /* Some boards don't have PCIe reset GPIO. */ > - if (gpio_is_valid(imx6_pcie->reset_gpio)) { > + if (imx6_pcie->reset_gpiod) { > msleep(100); > - gpio_set_value_cansleep(imx6_pcie->reset_gpio, > - !imx6_pcie->gpio_active_high); > + gpiod_set_value_cansleep(imx6_pcie->reset_gpiod, 0); > /* Wait for 100ms after PERST# deassertion (PCIe r5.0, 6.6.1) */ > msleep(100); > } > @@ -1285,22 +1280,11 @@ static int imx6_pcie_probe(struct platform_device *pdev) > return PTR_ERR(pci->dbi_base); > > /* Fetch GPIOs */ > - imx6_pcie->reset_gpio = of_get_named_gpio(node, "reset-gpio", 0); > - imx6_pcie->gpio_active_high = of_property_read_bool(node, > - "reset-gpio-active-high"); > - if (gpio_is_valid(imx6_pcie->reset_gpio)) { > - ret = devm_gpio_request_one(dev, imx6_pcie->reset_gpio, > - imx6_pcie->gpio_active_high ? > - GPIOF_OUT_INIT_HIGH : > - GPIOF_OUT_INIT_LOW, > - "PCIe reset"); > - if (ret) { > - dev_err(dev, "unable to get reset gpio\n"); > - return ret; > - } > - } else if (imx6_pcie->reset_gpio == -EPROBE_DEFER) { > - return imx6_pcie->reset_gpio; > - } > + imx6_pcie->reset_gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); > + if (IS_ERR(imx6_pcie->reset_gpiod)) > + return dev_err_probe(dev, PTR_ERR(imx6_pcie->reset_gpiod), > + "unable to get reset gpio\n"); > + gpiod_set_consumer_name(imx6_pcie->reset_gpiod, "PCIe reset"); > > if (imx6_pcie->drvdata->clks_cnt >= IMX6_PCIE_MAX_CLKS) > return dev_err_probe(dev, -ENOMEM, "clks_cnt is too big\n"); > -- > 2.43.0.rc1.1336.g36b5255a03ac >