Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: tegra: xusb: Remove usb3 supply

Remove redundant codes for getting the vbus supply of usb3 ports because
we get and control the vbus supply by the companion usb2 ports

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Haotien Hsu <haotienh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20221005084031.2154251-1-haotienh@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Wayne Chang and committed by
Vinod Koul
2428787f 53bffe00

+1 -14
-1
drivers/phy/tegra/xusb-tegra124.c
··· 1652 1652 1653 1653 static const struct tegra_xusb_port_ops tegra124_usb3_port_ops = { 1654 1654 .release = tegra_xusb_usb3_port_release, 1655 - .remove = tegra_xusb_usb3_port_remove, 1656 1655 .enable = tegra124_usb3_port_enable, 1657 1656 .disable = tegra124_usb3_port_disable, 1658 1657 .map = tegra124_usb3_port_map,
-1
drivers/phy/tegra/xusb-tegra186.c
··· 1185 1185 1186 1186 static const struct tegra_xusb_port_ops tegra186_usb3_port_ops = { 1187 1187 .release = tegra_xusb_usb3_port_release, 1188 - .remove = tegra_xusb_usb3_port_remove, 1189 1188 .enable = tegra186_usb3_port_enable, 1190 1189 .disable = tegra186_usb3_port_disable, 1191 1190 .map = tegra186_usb3_port_map,
-1
drivers/phy/tegra/xusb-tegra210.c
··· 3078 3078 3079 3079 static const struct tegra_xusb_port_ops tegra210_usb3_port_ops = { 3080 3080 .release = tegra_xusb_usb3_port_release, 3081 - .remove = tegra_xusb_usb3_port_remove, 3082 3081 .enable = tegra210_usb3_port_enable, 3083 3082 .disable = tegra210_usb3_port_disable, 3084 3083 .map = tegra210_usb3_port_map,
+1 -9
drivers/phy/tegra/xusb.c
··· 954 954 return -EINVAL; 955 955 } 956 956 957 - usb3->supply = regulator_get(&port->dev, "vbus"); 958 - return PTR_ERR_OR_ZERO(usb3->supply); 957 + return 0; 959 958 } 960 959 961 960 static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl, ··· 1009 1010 struct tegra_xusb_usb3_port *usb3 = to_usb3_port(port); 1010 1011 1011 1012 kfree(usb3); 1012 - } 1013 - 1014 - void tegra_xusb_usb3_port_remove(struct tegra_xusb_port *port) 1015 - { 1016 - struct tegra_xusb_usb3_port *usb3 = to_usb3_port(port); 1017 - 1018 - regulator_put(usb3->supply); 1019 1013 } 1020 1014 1021 1015 static void __tegra_xusb_remove_ports(struct tegra_xusb_padctl *padctl)
-2
drivers/phy/tegra/xusb.h
··· 359 359 360 360 struct tegra_xusb_usb3_port { 361 361 struct tegra_xusb_port base; 362 - struct regulator *supply; 363 362 bool context_saved; 364 363 unsigned int port; 365 364 bool internal; ··· 380 381 tegra_xusb_find_usb3_port(struct tegra_xusb_padctl *padctl, 381 382 unsigned int index); 382 383 void tegra_xusb_usb3_port_release(struct tegra_xusb_port *port); 383 - void tegra_xusb_usb3_port_remove(struct tegra_xusb_port *port); 384 384 385 385 struct tegra_xusb_port_ops { 386 386 void (*release)(struct tegra_xusb_port *port);