From patchwork Mon May 6 14:20:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655563 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 6F78813DDC9 for ; Mon, 6 May 2024 14:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005316; cv=none; b=kEJKo5oYm3hm7iIZtDGH15IVQ0rpBZ5psWDKM9iPBYibmoeN2dkDiKh7RcUhsSL8bW2PGEz6/LZ+2KOMY0H3DQAfP8lq49Vgc3FhWIAPhXnpg2RmRr/2n7QR00Sluni74tjZ2xpQwOANPSEoEB7n7w2iFdWXTeEDcOfQhGYgttg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005316; c=relaxed/simple; bh=CNszT9zdbvvsTrnr/o0AApgAShmBR0yidgvxQsMHIno=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hnaEAY7P8qsFnXNiqoMRqTZ+xr8OPZElve5hQKR7Y758vaZWEO0bocdn+C69xT6RHzZDjUdgcydiPusZmcd50TYcA/j4BQtg5ZkTr3FvaZhnWChuD+eEpWx2e3hP6MyF/NA+Xh8j7ui0AmocdT8KJp2okTK62JIL11r69WQtP8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HiCFBATA; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HiCFBATA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005314; x=1746541314; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CNszT9zdbvvsTrnr/o0AApgAShmBR0yidgvxQsMHIno=; b=HiCFBATAx7p22DQd4fI2FAYlYwngpYVCKinfWvd3xUwUpX8u+MeauWuI TL2jzZEoEzQx0pq+olM2in2E5bg5wv0QVKsbBoCfOf5QLdLpevlSArZ4u k81Yr+DTv3L/SuehprLH9pUICv+YxGyZGNDu+ejj++JUN5ASPj5TnUzvG ukmgS+qti3OYTBrhrcgXC8yTfkFF6xTCN/hLmul0tfQlSfhEZsbJY71JE MjOKJt0vndql+Yzvi+SVkVrk/Z+MFu/RRyuODaO22RXbcBrVuFcm2OSPt JhltsBqyIhHB4fUOj/LalHhSnPr+EDM52qCJa2qlNPkF/fbSGwAXDqkLI A==; X-CSE-ConnectionGUID: AHvZQAA3Qjq7+qrkihsKtw== X-CSE-MsgGUID: ygiVhFHZTpeS6SuLPOyjqg== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="22155541" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="22155541" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:53 -0700 X-CSE-ConnectionGUID: tzhk4GXGSGuSvrL4IdOFhQ== X-CSE-MsgGUID: vhTfbuHiTc29wrruM+hkgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32988756" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0E48F68; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , 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 Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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?= , Linus Walleij Subject: [PATCH v4 1/5] PCI: dra7xx: Add missing header inclusion Date: Mon, 6 May 2024 17:20:37 +0300 Message-ID: <20240506142142.4042810-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Driver is using chained_irq_*() APIs, add the respective inclusion. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pci-dra7xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index d2d17d37d3e0..b67071a63f8a 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include From patchwork Mon May 6 14:20:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655562 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 E14B413DDBD for ; Mon, 6 May 2024 14:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005314; cv=none; b=njgA/nOWsk7pESJSt3ByyKcO4S9DMNZ3SZ2dE5UELbFGmAcjsqWDa1TnoX7E2i3xAs/3WHFmv0PxJIUUmK4tHa5yH4SxLS9L4YSRvv4s4cpazrr9y59n5tgM/DWXQ/rSFpn2Hi427UgGduCoJoWXb1aPiOLz4uIjywQR7jkW9cQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005314; c=relaxed/simple; bh=mnVWFiBfYUU2lpuKyQVuWsMjv4lrzOkciv18t8WSb+Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rrcUAnO2TVn2RQQgN/GWA/UrxSbYCWAHiNfPg9sa0/DW6811jX5fYR3lO7N2l+PtnbFUt69zlkXLsCKc1yGcieFa9JIsRe2RLapMBCwS2gl50QfZ6eamkpE5Q2lg1anX4PhBwbsDXPpV1pO15WgPWYTolHkJ97F1vucA8oYe0co= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Byk190pG; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Byk190pG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005313; x=1746541313; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mnVWFiBfYUU2lpuKyQVuWsMjv4lrzOkciv18t8WSb+Q=; b=Byk190pGGn5QTg9UwNXztsgiSFqSMKonxbz/FZzvu4N81asfEQzbi6Tz yt4qiuaY5q++vf9Yak7qgS4tTKU6N9/A0R+2cE0brhMuf/k7jgJwVIajF vc8UQoaYc1UpRaWidPj6dQGDBjDzXBNqP89aqNQrfiuy1H1g7AD1q3mOu xx/45C6/JjdyXrR16TMPBJJ/dOszNP7IrbIyaXYYxQVlauZMUJSzquJpl I7ZwIdZHFEJC0e7ZzsoFxVBqXTkQhEM0/6gJKQMzUn+Gt9OnvhogzhciX IkJ3tTAmRXJ0DjAz9PtXakUwwJTk2TQJXL/cAYEqCOo39ROvynKEYX4df w==; X-CSE-ConnectionGUID: ptLVu23ZRPCMq7aJ4vWjDw== X-CSE-MsgGUID: Giz8fcIQQJqb3X0oxYlrHQ== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631820" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631820" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:51 -0700 X-CSE-ConnectionGUID: v6vxQqJzQgqtr/xtC6HB+Q== X-CSE-MsgGUID: FLhmLFrsTPe4VWRVLgvWFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652260" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1AACF43E; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , 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 Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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?= , Linus Walleij Subject: [PATCH v4 2/5] PCI: aardvark: Remove unused of_gpio.h Date: Mon, 6 May 2024 17:20:38 +0300 Message-ID: <20240506142142.4042810-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 of_gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/pci-aardvark.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 71ecd7ddcc8a..8b3e1a079cf3 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "../pci.h" From patchwork Mon May 6 14:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655564 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 D8C5113DDCE for ; Mon, 6 May 2024 14:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005316; cv=none; b=Us/NqtzeFvnXan+eCF8WtZB0Jd3+LaHTCJwYyuJb5kA457z1kEwn/iunYuTeuVmkm5J4FEM8nTPBYO1LZElySPgdZj1b+pIVo42t8TT6kMQa0/t/ymIv4bfrMaH6jCRXZ0pr2xey2dugTsh15pMvQUq/2FpaFD8mpAjPolwUmkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005316; c=relaxed/simple; bh=8rSWiYZvmKFnXcw8ynHscd2dH4mpaWep1+0Q3U6jY4c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E0cvh496I6SYEl9x9g5l7bJCjzZw22+tyMfpHLfIoqiYI954NiX50c6p3KwuF+JEcjtT7/Zzf7f3i+pi0I5boKGoH1RLqcaz79sbsR3kzgHBpWR5k2sWjHmSE1rDkV2w1a8y7vWoDPoADtB/W9Td9uotsmS/LENIC17qWqRf/Hg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gq7zLoTW; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gq7zLoTW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005315; x=1746541315; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8rSWiYZvmKFnXcw8ynHscd2dH4mpaWep1+0Q3U6jY4c=; b=gq7zLoTWDw8zcCrKmhKbAuUjf/Wu7IAXzs1VWBAYyztRQAnUg+AX6sEB ZD0bR+JBP84mpocjIXhh1J2SbDeyOHUNr4JxisCrHMK2B7bVBICsU2wc/ L1uSeZrjmipWTdKnzJfLuebZOOTwBxxfrc2/bTy73jjGDOO0ZKBDThNt6 tFHKVme9p3SmGsxJPjIiluPhjvpDI2yyd7lYtlKKYnUH8JNzj5/3LzEGk 8bI4Yxp1LBU2Jg9dPQBo8rrbhsVQuzFaL96rou8NzN1ETACzyQEVOOIwS jHOrDLEaQzgwGH62IVMjDrhM7zjoBS/txpgSBuWM3jxK7ERyvSO89q0wq A==; X-CSE-ConnectionGUID: rgwSl3hrRQynWrXfkmnF5w== X-CSE-MsgGUID: H6b02mFWQAilElyL1pg8IA== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631831" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631831" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:51 -0700 X-CSE-ConnectionGUID: dc8p9NFvQJWZ6MHCsO4kmA== X-CSE-MsgGUID: YEsu2LobRQyrkpY2uDctpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652261" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 29B8249F; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , 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 Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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?= , Linus Walleij Subject: [PATCH v4 3/5] PCI: dwc: Remove unused of_gpio.h Date: Mon, 6 May 2024 17:20:39 +0300 Message-ID: <20240506142142.4042810-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 of_gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pci-dra7xx.c | 1 - drivers/pci/controller/dwc/pci-meson.c | 1 - drivers/pci/controller/dwc/pcie-qcom.c | 1 - drivers/pci/controller/dwc/pcie-tegra194.c | 2 -- 4 files changed, 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index b67071a63f8a..cf8392190856 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c index 6477c83262c2..db9482a113e9 100644 --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 14772edcf0d3..436076612c8f 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 93f5433c5c55..e8cd8c1bd4f4 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -21,7 +20,6 @@ #include #include #include -#include #include #include #include From patchwork Mon May 6 14:20:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655565 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 8C89B13DDCB for ; Mon, 6 May 2024 14:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005317; cv=none; b=h9z9wOWbDxdnO0LHkB3GaHkeonRYASrt2iBFelcbKBWl+V+b+R7LNGoeXwsvznBYdnUVsHW4CMWbVlLrmPQwrVwV2J+snYf+GOqnIRB+uqual/vnij3x+HzZlVppCRGNAOpt1aaWsA7FvBUeHyjy4hSDl9dF8JGUZ9Akk3uvr0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005317; c=relaxed/simple; bh=Z57pGJjnjRVkYzZo0wihsvwiTkK/ndmlOsPxrIGszlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wmw6hL35ERU4Nb1qlSxYHL+bWmLWKqInuv0kJcQLDnpDKP55aXlH/5wRDzPPDn/FbW0dWBsrec7ek4QbQaYlim+ePJUrW1vWruHv28EgNs90TrD0fg5COcIdAN0SlAktW1KHHh7lFW7jwXYqkQ9qytIEVjQ7wUPphbHmIEn0B3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=oC2ihOoh; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oC2ihOoh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005314; x=1746541314; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z57pGJjnjRVkYzZo0wihsvwiTkK/ndmlOsPxrIGszlo=; b=oC2ihOohlhlgMvPnZXOOnsRfoSX44OU7viMwZcnyZnrc1y75juiQB4+I jLCldYMJuGPj5sLtAVGFhRob7+EZcoH/nvIkV/BZbmGIG+PJj27f/Dlo3 FfDRZhHu/ZDC48xacygJUvHepRyaWux4KYxEJrI7TBDo3lqFXlygDLBpd OdeLuYbQ7gPy5tcdWjGiGhm9/ceAu4Ftt1MTSaCkH9gN3WjkUJrC8sjIK eNoWW3i5GImX1Xj8bc8e24FR27elsOqsMPGRbTJ1GOqXP/+3stOd1wHgo krrDkrAJd+2pWF/e+5Q2ahXtViRAdy2vcpk56CaAOl4e4YobX/vVq+r/0 Q==; X-CSE-ConnectionGUID: sBDcLkEYRfaxdhk0bcrRPg== X-CSE-MsgGUID: pIqwRB0OSx6vahiqKwstOQ== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="10631843" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="10631843" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:21:52 -0700 X-CSE-ConnectionGUID: LmUtZS9TRKi6vdTo+P+jMQ== X-CSE-MsgGUID: SSFBTkBWSVaqnxNR9fDPHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32652262" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 06 May 2024 07:21:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 341DB537; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , 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 Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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?= , Linus Walleij Subject: [PATCH v4 4/5] PCI: imx6: Convert to agnostic GPIO API Date: Mon, 6 May 2024 17:20:40 +0300 Message-ID: <20240506142142.4042810-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Linus Walleij --- 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"); From patchwork Mon May 6 14:20:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13655567 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 C896513D2A1 for ; Mon, 6 May 2024 14:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005326; cv=none; b=AOn0fG6Oq2OFdsPuNPCyHXPh8riD1tgYpCOKxXMi25uP/IbfJcrLkipckq3MMmS0M/UxD+VaXvgZyTR8+jk2f4bc6QMVUn2NMv1bYa4hp5FcJrHTRDnAoj61AXfhfqjoE4a1AVW8oPPl10KVWjNe3hpLk1+Tj/+Urvwdmq0QoOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715005326; c=relaxed/simple; bh=Zfipl6FRTfKyTzY0Cyv5249Uhwjc0MFiQSe+NaO7iiI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PIe1VswMkexn55VHLwE5+CkmLvYEUZqKcazh9uHPO5ngjlywHPc4NJXvQQT0ZT0yJ8wMXSFW2SaVjSQoGqJzyP2A/UkCx3kJYlqm9ejYmjQGlZ+goCOnYdYeTbICodoSjTSwMn5A1yG0qkskM2JckRicJQOMjsJE3jtRbAdaugQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=no/QIrPF; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="no/QIrPF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715005325; x=1746541325; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zfipl6FRTfKyTzY0Cyv5249Uhwjc0MFiQSe+NaO7iiI=; b=no/QIrPFuPsUSvbdS6LZ9cmMpeDrLDQHD0/B2QQcsq+dpgfdwWVcwRzZ SBqRP5hXYw2U2O+dvQXXlnqsGBogt1eySo9qVONrojMDOzKC09kx5Hl5a Ux88YkKTVu/Ee/Bi6USj2USmZ2C3+mTOK8s3OLVh92DMuSTgftfQB1dTN QVpBdI6iIba1ayAqCCvZB55N845JO9CSnZiyxw38m85gojeloS5r5sWVf Mn+bkldqFPun9fLeTiCssgmHFtoXoM5njSDWC6+oxkE9Bt30CPux9aUEs /gWA73RoyS/9oGTdk9AON24Ayd8bFVqahUdqTNuDQXTYzi3iqH+ojYI1Y g==; X-CSE-ConnectionGUID: WDvRCsnmT1O8pegTlgOidQ== X-CSE-MsgGUID: x+R5oyXAS5qohj7dBZUhNw== X-IronPort-AV: E=McAfee;i="6600,9927,11065"; a="22155600" X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="22155600" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 07:22:01 -0700 X-CSE-ConnectionGUID: W7ga+nScT0mXar9tI4jBqg== X-CSE-MsgGUID: waswy0tmReqTs/9s5pGM6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,258,1708416000"; d="scan'208";a="32988759" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 06 May 2024 07:21:53 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3EDE35A2; Mon, 06 May 2024 17:21:43 +0300 (EEST) From: Andy Shevchenko To: Manivannan Sadhasivam , Frank Li , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Andy Shevchenko , 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 Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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?= , Linus Walleij Subject: [PATCH v4 5/5] PCI: kirin: Convert to agnostic GPIO API Date: Mon, 6 May 2024 17:20:41 +0300 Message-ID: <20240506142142.4042810-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> References: <20240506142142.4042810-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Andy Shevchenko --- drivers/pci/controller/dwc/pcie-kirin.c | 105 ++++++++---------------- 1 file changed, 35 insertions(+), 70 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c index d5523f302102..d1f54f188e71 100644 --- a/drivers/pci/controller/dwc/pcie-kirin.c +++ b/drivers/pci/controller/dwc/pcie-kirin.c @@ -12,12 +12,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -78,16 +76,16 @@ struct kirin_pcie { void *phy_priv; /* only for PCIE_KIRIN_INTERNAL_PHY */ /* DWC PERST# */ - int gpio_id_dwc_perst; + struct gpio_desc *id_dwc_perst_gpio; /* Per-slot PERST# */ int num_slots; - int gpio_id_reset[MAX_PCI_SLOTS]; + struct gpio_desc *id_reset_gpio[MAX_PCI_SLOTS]; const char *reset_names[MAX_PCI_SLOTS]; /* Per-slot clkreq */ int n_gpio_clkreq; - int gpio_id_clkreq[MAX_PCI_SLOTS]; + struct gpio_desc *id_clkreq_gpio[MAX_PCI_SLOTS]; const char *clkreq_names[MAX_PCI_SLOTS]; }; @@ -381,15 +379,20 @@ static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie, pcie->n_gpio_clkreq = ret; for (i = 0; i < pcie->n_gpio_clkreq; i++) { - pcie->gpio_id_clkreq[i] = of_get_named_gpio(dev->of_node, - "hisilicon,clken-gpios", i); - if (pcie->gpio_id_clkreq[i] < 0) - return pcie->gpio_id_clkreq[i]; + pcie->id_clkreq_gpio[i] = devm_gpiod_get_index(dev, + "hisilicon,clken", i, + GPIOD_OUT_LOW); + if (IS_ERR(pcie->id_clkreq_gpio[i])) + return dev_err_probe(dev, PTR_ERR(pcie->id_clkreq_gpio[i]), + "unable to get a valid clken gpio\n"); pcie->clkreq_names[i] = devm_kasprintf(dev, GFP_KERNEL, "pcie_clkreq_%d", i); if (!pcie->clkreq_names[i]) return -ENOMEM; + + gpiod_set_consumer_name(pcie->id_clkreq_gpio[i], + pcie->clkreq_names[i]); } return 0; @@ -407,10 +410,16 @@ static int kirin_pcie_parse_port(struct kirin_pcie *pcie, for_each_available_child_of_node(parent, child) { i = pcie->num_slots; - pcie->gpio_id_reset[i] = of_get_named_gpio(child, - "reset-gpios", 0); - if (pcie->gpio_id_reset[i] < 0) - continue; + pcie->id_reset_gpio[i] = devm_fwnode_gpiod_get_index(dev, + of_fwnode_handle(child), + "reset", 0, GPIOD_OUT_LOW, + NULL); + if (IS_ERR(pcie->id_reset_gpio[i])) { + if (PTR_ERR(pcie->id_reset_gpio[i]) == -ENOENT) + continue; + return dev_err_probe(dev, PTR_ERR(pcie->id_reset_gpio[i]), + "unable to get a valid reset gpio\n"); + } pcie->num_slots++; if (pcie->num_slots > MAX_PCI_SLOTS) { @@ -434,6 +443,9 @@ static int kirin_pcie_parse_port(struct kirin_pcie *pcie, ret = -ENOMEM; goto put_node; } + + gpiod_set_consumer_name(pcie->id_reset_gpio[i], + pcie->reset_names[i]); } } @@ -463,14 +475,11 @@ static long kirin_pcie_get_resource(struct kirin_pcie *kirin_pcie, return PTR_ERR(kirin_pcie->apb); /* pcie internal PERST# gpio */ - kirin_pcie->gpio_id_dwc_perst = of_get_named_gpio(dev->of_node, - "reset-gpios", 0); - if (kirin_pcie->gpio_id_dwc_perst == -EPROBE_DEFER) { - return -EPROBE_DEFER; - } else if (!gpio_is_valid(kirin_pcie->gpio_id_dwc_perst)) { - dev_err(dev, "unable to get a valid gpio pin\n"); - return -ENODEV; - } + kirin_pcie->id_dwc_perst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(kirin_pcie->id_dwc_perst_gpio)) + return dev_err_probe(dev, PTR_ERR(kirin_pcie->id_dwc_perst_gpio), + "unable to get a valid gpio pin\n"); + gpiod_set_consumer_name(kirin_pcie->id_dwc_perst_gpio, "pcie_perst_bridge"); ret = kirin_pcie_get_gpio_enable(kirin_pcie, pdev); if (ret) @@ -553,7 +562,7 @@ static int kirin_pcie_add_bus(struct pci_bus *bus) /* Send PERST# to each slot */ for (i = 0; i < kirin_pcie->num_slots; i++) { - ret = gpio_direction_output(kirin_pcie->gpio_id_reset[i], 1); + ret = gpiod_direction_output_raw(kirin_pcie->id_reset_gpio[i], 1); if (ret) { dev_err(pci->dev, "PERST# %s error: %d\n", kirin_pcie->reset_names[i], ret); @@ -623,44 +632,6 @@ static int kirin_pcie_host_init(struct dw_pcie_rp *pp) return 0; } -static int kirin_pcie_gpio_request(struct kirin_pcie *kirin_pcie, - struct device *dev) -{ - int ret, i; - - for (i = 0; i < kirin_pcie->num_slots; i++) { - if (!gpio_is_valid(kirin_pcie->gpio_id_reset[i])) { - dev_err(dev, "unable to get a valid %s gpio\n", - kirin_pcie->reset_names[i]); - return -ENODEV; - } - - ret = devm_gpio_request(dev, kirin_pcie->gpio_id_reset[i], - kirin_pcie->reset_names[i]); - if (ret) - return ret; - } - - for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) { - if (!gpio_is_valid(kirin_pcie->gpio_id_clkreq[i])) { - dev_err(dev, "unable to get a valid %s gpio\n", - kirin_pcie->clkreq_names[i]); - return -ENODEV; - } - - ret = devm_gpio_request(dev, kirin_pcie->gpio_id_clkreq[i], - kirin_pcie->clkreq_names[i]); - if (ret) - return ret; - - ret = gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 0); - if (ret) - return ret; - } - - return 0; -} - static const struct dw_pcie_ops kirin_dw_pcie_ops = { .read_dbi = kirin_pcie_read_dbi, .write_dbi = kirin_pcie_write_dbi, @@ -680,7 +651,7 @@ static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie) return hi3660_pcie_phy_power_off(kirin_pcie); for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) - gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 1); + gpiod_direction_output_raw(kirin_pcie->id_clkreq_gpio[i], 1); phy_power_off(kirin_pcie->phy); phy_exit(kirin_pcie->phy); @@ -707,10 +678,6 @@ static int kirin_pcie_power_on(struct platform_device *pdev, if (IS_ERR(kirin_pcie->phy)) return PTR_ERR(kirin_pcie->phy); - ret = kirin_pcie_gpio_request(kirin_pcie, dev); - if (ret) - return ret; - ret = phy_init(kirin_pcie->phy); if (ret) goto err; @@ -723,11 +690,9 @@ static int kirin_pcie_power_on(struct platform_device *pdev, /* perst assert Endpoint */ usleep_range(REF_2_PERST_MIN, REF_2_PERST_MAX); - if (!gpio_request(kirin_pcie->gpio_id_dwc_perst, "pcie_perst_bridge")) { - ret = gpio_direction_output(kirin_pcie->gpio_id_dwc_perst, 1); - if (ret) - goto err; - } + ret = gpiod_direction_output_raw(kirin_pcie->id_dwc_perst_gpio, 1); + if (ret) + goto err; usleep_range(PERST_2_ACCESS_MIN, PERST_2_ACCESS_MAX);