phy: tegra: xusb: Remove usb3 supply
PATCH 1/1 phy: tegra: xusb: Remove usb3 supply
From: Wayne Chang <[email protected]>
Remove redundant codes for getting the vbus supply of usb3 ports because we get and control the vbus supply by the companion usb2 ports
--- drivers/phy/tegra/xusb-tegra124.c | 1 - drivers/phy/tegra/xusb-tegra186.c | 1 - drivers/phy/tegra/xusb-tegra210.c | 1 - drivers/phy/tegra/xusb.c | 10 +--------- drivers/phy/tegra/xusb.h | 2 -- 5 files changed, 1 insertion(+), 14 deletions(-)
drivers/phy/tegra/xusb-tegra124.c +0 -1
@@ -1652,7 +1652,6 @@ tegra124_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra124_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra124_usb3_port_enable, .disable = tegra124_usb3_port_disable, .map = tegra124_usb3_port_map,
drivers/phy/tegra/xusb-tegra186.c +0 -1
@@ -1213,7 +1213,6 @@ tegra186_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra186_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra186_usb3_port_enable, .disable = tegra186_usb3_port_disable, .map = tegra186_usb3_port_map,
drivers/phy/tegra/xusb-tegra210.c +0 -1
@@ -3078,7 +3078,6 @@ tegra210_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra210_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra210_usb3_port_enable, .disable = tegra210_usb3_port_disable, .map = tegra210_usb3_port_map,
drivers/phy/tegra/xusb.c +1 -9
@@ -960,8 +960,7 @@ static int tegra_xusb_usb3_port_parse_dt(struct tegra_xusb_usb3_port *usb3)return -EINVAL ; } - usb3->supply =regulator_get (&port->dev,"vbus" ); -return PTR_ERR_OR_ZERO (usb3->supply); +return 0 ; } static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,
@@ -1018,13 +1017,6 @@ void tegra_xusb_usb3_port_release(struct tegra_xusb_port *port)kfree (usb3); } -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port) -{ -struct tegra_xusb_usb3_port *usb3 =to_usb3_port (port); - -regulator_put (usb3->supply); -} -static void __tegra_xusb_remove_ports (struct tegra_xusb_padctl *padctl) {struct tegra_xusb_port *port, *tmp;
drivers/phy/tegra/xusb.h +0 -2
@@ -360,7 +360,6 @@ void tegra_xusb_hsic_port_release(struct tegra_xusb_port *port);struct tegra_xusb_usb3_port {struct tegra_xusb_port base; -struct regulator *supply;bool context_saved;unsigned int port;bool internal;
@@ -382,7 +381,6 @@ struct tegra_xusb_usb3_port * tegra_xusb_find_usb3_port(struct tegra_xusb_padctl *padctl, unsigned int index);void tegra_xusb_usb3_port_release (struct tegra_xusb_port *port); -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port);struct tegra_xusb_port_ops {void (*release)(struct tegra_xusb_port *port);
Signature · 7 lines
2.25.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 92 lines · Haotien Hsu
From: Wayne Chang <[email protected]>
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 <[email protected]>Signed-off-by Haotien Hsu <[email protected]>--- drivers/phy/tegra/xusb-tegra124.c | 1 - drivers/phy/tegra/xusb-tegra186.c | 1 - drivers/phy/tegra/xusb-tegra210.c | 1 - drivers/phy/tegra/xusb.c | 10 +--------- drivers/phy/tegra/xusb.h | 2 -- 5 files changed, 1 insertion(+), 14 deletions(-)drivers/phy/tegra/xusb-tegra124.c +0
-1@@ -1652,7 +1652,6 @@ tegra124_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra124_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra124_usb3_port_enable, .disable = tegra124_usb3_port_disable, .map = tegra124_usb3_port_map,drivers/phy/tegra/xusb-tegra186.c +0
-1@@ -1213,7 +1213,6 @@ tegra186_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra186_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra186_usb3_port_enable, .disable = tegra186_usb3_port_disable, .map = tegra186_usb3_port_map,drivers/phy/tegra/xusb-tegra210.c +0
-1@@ -3078,7 +3078,6 @@ tegra210_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra210_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra210_usb3_port_enable, .disable = tegra210_usb3_port_disable, .map = tegra210_usb3_port_map,drivers/phy/tegra/xusb.c +1
-9@@ -960,8 +960,7 @@ static int tegra_xusb_usb3_port_parse_dt(struct tegra_xusb_usb3_port *usb3)return -EINVAL ; } - usb3->supply =regulator_get (&port->dev,"vbus" ); -return PTR_ERR_OR_ZERO (usb3->supply); +return 0 ; } static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,@@ -1018,13 +1017,6 @@ void tegra_xusb_usb3_port_release(struct tegra_xusb_port *port)kfree (usb3); } -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port) -{ -struct tegra_xusb_usb3_port *usb3 =to_usb3_port (port); - -regulator_put (usb3->supply); -} -static void __tegra_xusb_remove_ports (struct tegra_xusb_padctl *padctl) {struct tegra_xusb_port *port, *tmp;drivers/phy/tegra/xusb.h +0
-1@@ -360,7 +360,6 @@ void tegra_xusb_hsic_port_release(struct tegra_xusb_port *port);struct tegra_xusb_usb3_port {struct tegra_xusb_port base; -struct regulator *supply;bool context_saved;unsigned int port;bool internal;
drivers/phy/tegra/xusb.h struct tegra_xusb_usb3_port * · line 386
Quoted 7 lines
drivers/phy/tegra/xusb.h +0
-1@@ -382,7 +381,6 @@ struct tegra_xusb_usb3_port * tegra_xusb_find_usb3_port(struct tegra_xusb_padctl *padctl, unsigned int index);void tegra_xusb_usb3_port_release (struct tegra_xusb_port *port); -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port);struct tegra_xusb_port_ops {void (*release)(struct tegra_xusb_port *port);
Please let me know if you have any comments.
Thank you.
Quoted 92 lines · Haotien Hsu
From: Wayne Chang <[email protected]>
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 <[email protected]>Signed-off-by Haotien Hsu <[email protected]>--- drivers/phy/tegra/xusb-tegra124.c | 1 - drivers/phy/tegra/xusb-tegra186.c | 1 - drivers/phy/tegra/xusb-tegra210.c | 1 - drivers/phy/tegra/xusb.c | 10 +--------- drivers/phy/tegra/xusb.h | 2 -- 5 files changed, 1 insertion(+), 14 deletions(-)drivers/phy/tegra/xusb-tegra124.c +0
-1@@ -1652,7 +1652,6 @@ tegra124_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra124_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra124_usb3_port_enable, .disable = tegra124_usb3_port_disable, .map = tegra124_usb3_port_map,drivers/phy/tegra/xusb-tegra186.c +0
-1@@ -1213,7 +1213,6 @@ tegra186_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra186_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra186_usb3_port_enable, .disable = tegra186_usb3_port_disable, .map = tegra186_usb3_port_map,drivers/phy/tegra/xusb-tegra210.c +0
-1@@ -3078,7 +3078,6 @@ tegra210_usb3_port_map(struct tegra_xusb_port *port)static const struct tegra_xusb_port_ops tegra210_usb3_port_ops = { .release = tegra_xusb_usb3_port_release, - .remove = tegra_xusb_usb3_port_remove, .enable = tegra210_usb3_port_enable, .disable = tegra210_usb3_port_disable, .map = tegra210_usb3_port_map,drivers/phy/tegra/xusb.c +1
-9@@ -960,8 +960,7 @@ static int tegra_xusb_usb3_port_parse_dt(struct tegra_xusb_usb3_port *usb3)return -EINVAL ; } - usb3->supply =regulator_get (&port->dev,"vbus" ); -return PTR_ERR_OR_ZERO (usb3->supply); +return 0 ; } static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,@@ -1018,13 +1017,6 @@ void tegra_xusb_usb3_port_release(struct tegra_xusb_port *port)kfree (usb3); } -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port) -{ -struct tegra_xusb_usb3_port *usb3 =to_usb3_port (port); - -regulator_put (usb3->supply); -} -static void __tegra_xusb_remove_ports (struct tegra_xusb_padctl *padctl) {struct tegra_xusb_port *port, *tmp;drivers/phy/tegra/xusb.h +0
-1@@ -360,7 +360,6 @@ void tegra_xusb_hsic_port_release(struct tegra_xusb_port *port);struct tegra_xusb_usb3_port {struct tegra_xusb_port base; -struct regulator *supply;bool context_saved;unsigned int port;bool internal;
drivers/phy/tegra/xusb.h struct tegra_xusb_usb3_port * · line 386
Quoted 7 lines
drivers/phy/tegra/xusb.h +0
-1@@ -382,7 +381,6 @@ struct tegra_xusb_usb3_port * tegra_xusb_find_usb3_port(struct tegra_xusb_padctl *padctl, unsigned int index);void tegra_xusb_usb3_port_release (struct tegra_xusb_port *port); -void tegra_xusb_usb3_port_remove (struct tegra_xusb_port *port);struct tegra_xusb_port_ops {void (*release)(struct tegra_xusb_port *port);
Thanks
Jon
Signature · 6 lines
nvpublic -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 4 lines · Haotien Hsu
From: Wayne Chang <[email protected]>
Remove redundant codes for getting the vbus supply of usb3 ports because we get and control the vbus supply by the companion usb2 ports
Applied, thanks
Signature · 1 line
~Vinod