[PATCH v2 4/4] usb: chipidea: tegra: Expose tegra_usb structure
From: Svyatoslav Ryhel
Date: Sat May 23 2026 - 04:32:28 EST
The tegra_usb structure is platform data of USB controller and is required
for proper controller malipulation if its init/deinit is externally
controlled.
Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
---
drivers/usb/chipidea/ci_hdrc_tegra.c | 13 +------------
include/linux/usb/tegra_usb_phy.h | 15 +++++++++++++++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
index a19cb3b33bf3..109c4afdee4a 100644
--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
+++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
@@ -16,6 +16,7 @@
#include <linux/usb/hcd.h>
#include <linux/usb/of.h>
#include <linux/usb/phy.h>
+#include <linux/usb/tegra_usb_phy.h>
#include <soc/tegra/common.h>
@@ -23,18 +24,6 @@
#include "ci.h"
-struct tegra_usb {
- struct ci_hdrc_platform_data data;
- struct platform_device *dev;
-
- const struct tegra_usb_soc_info *soc;
- struct usb_phy *phy;
- struct clk *clk;
-
- bool needs_double_reset;
- bool externally_controlled;
-};
-
struct tegra_usb_soc_info {
unsigned long flags;
unsigned int txfifothresh;
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 6343f88df5de..ba74b7ebfba0 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -9,6 +9,7 @@
#include <linux/clk.h>
#include <linux/regmap.h>
#include <linux/reset.h>
+#include <linux/usb/chipidea.h>
#include <linux/usb/otg.h>
struct gpio_desc;
@@ -62,6 +63,20 @@ enum tegra_usb_phy_port_speed {
TEGRA_USB_PHY_PORT_SPEED_HIGH,
};
+struct tegra_usb_soc_info;
+
+struct tegra_usb {
+ struct ci_hdrc_platform_data data;
+ struct platform_device *dev;
+
+ const struct tegra_usb_soc_info *soc;
+ struct usb_phy *phy;
+ struct clk *clk;
+
+ bool needs_double_reset;
+ bool externally_controlled;
+};
+
struct tegra_xtal_freq;
struct tegra_usb_phy {
--
2.51.0