aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 17:57:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 17:57:49 -0400
commit1c41a9570a02cec80be5fb4f7f9cf206220d84a5 (patch)
tree21eeee43b0cb88415ea809bfab3f2b432fd5ac45 /drivers/usb/phy
parentcd0e075784f4bce97b4ed47d4b354f045e895546 (diff)
parent3e457371f436e89ce9239674828f9729a36b2595 (diff)
Merge tag 'usb-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v4.1 merge window As usual, a big pile of commits. This time a total of 111 non-merge commits. Other than the usual set of cleanups and non-critical fixes, we have some interesting work for AM335x's MUSB babble recovery. Now that takes a lot less time and we don't have to Reset MUSB all the time. The printer gadget has been converted to configfs interface and the atmel udc has learned suspend/resume with wakeup. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/Kconfig2
-rw-r--r--drivers/usb/phy/of.c2
-rw-r--r--drivers/usb/phy/phy-ab8500-usb.c2
-rw-r--r--drivers/usb/phy/phy-generic.c12
-rw-r--r--drivers/usb/phy/phy.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 2fb3828b5089..2175678e674e 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -202,13 +202,13 @@ config USB_RCAR_GEN2_PHY
202config USB_ULPI 202config USB_ULPI
203 bool "Generic ULPI Transceiver Driver" 203 bool "Generic ULPI Transceiver Driver"
204 depends on ARM || ARM64 204 depends on ARM || ARM64
205 select USB_ULPI_VIEWPORT
205 help 206 help
206 Enable this to support ULPI connected USB OTG transceivers which 207 Enable this to support ULPI connected USB OTG transceivers which
207 are likely found on embedded boards. 208 are likely found on embedded boards.
208 209
209config USB_ULPI_VIEWPORT 210config USB_ULPI_VIEWPORT
210 bool 211 bool
211 depends on USB_ULPI
212 help 212 help
213 Provides read/write operations to the ULPI phy register set for 213 Provides read/write operations to the ULPI phy register set for
214 controllers with a viewport register (e.g. Chipidea/ARC controllers). 214 controllers with a viewport register (e.g. Chipidea/ARC controllers).
diff --git a/drivers/usb/phy/of.c b/drivers/usb/phy/of.c
index 7ea0154da9d5..66ffa82457a8 100644
--- a/drivers/usb/phy/of.c
+++ b/drivers/usb/phy/of.c
@@ -27,7 +27,7 @@ static const char *const usbphy_modes[] = {
27 * @np: Pointer to the given device_node 27 * @np: Pointer to the given device_node
28 * 28 *
29 * The function gets phy interface string from property 'phy_type', 29 * The function gets phy interface string from property 'phy_type',
30 * and returns the correspondig enum usb_phy_interface 30 * and returns the corresponding enum usb_phy_interface
31 */ 31 */
32enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) 32enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
33{ 33{
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 0b1bd2369293..59cccfadae96 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -893,7 +893,7 @@ static int abx500_usb_link_status_update(struct ab8500_usb *ab)
893 893
894/* 894/*
895 * Disconnection Sequence: 895 * Disconnection Sequence:
896 * 1. Disconect Interrupt 896 * 1. Disconnect Interrupt
897 * 2. Disable regulators 897 * 2. Disable regulators
898 * 3. Disable AB clock 898 * 3. Disable AB clock
899 * 4. Disable the Phy 899 * 4. Disable the Phy
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 70be50b734b2..deee68eafb72 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -62,14 +62,14 @@ static int nop_set_suspend(struct usb_phy *x, int suspend)
62 return 0; 62 return 0;
63} 63}
64 64
65static void nop_reset_set(struct usb_phy_generic *nop, int asserted) 65static void nop_reset(struct usb_phy_generic *nop)
66{ 66{
67 if (!nop->gpiod_reset) 67 if (!nop->gpiod_reset)
68 return; 68 return;
69 69
70 gpiod_direction_output(nop->gpiod_reset, !asserted); 70 gpiod_set_value(nop->gpiod_reset, 1);
71 usleep_range(10000, 20000); 71 usleep_range(10000, 20000);
72 gpiod_set_value(nop->gpiod_reset, asserted); 72 gpiod_set_value(nop->gpiod_reset, 0);
73} 73}
74 74
75/* interface to regulator framework */ 75/* interface to regulator framework */
@@ -151,8 +151,7 @@ int usb_gen_phy_init(struct usb_phy *phy)
151 if (!IS_ERR(nop->clk)) 151 if (!IS_ERR(nop->clk))
152 clk_prepare_enable(nop->clk); 152 clk_prepare_enable(nop->clk);
153 153
154 /* De-assert RESET */ 154 nop_reset(nop);
155 nop_reset_set(nop, 0);
156 155
157 return 0; 156 return 0;
158} 157}
@@ -162,8 +161,7 @@ void usb_gen_phy_shutdown(struct usb_phy *phy)
162{ 161{
163 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev); 162 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev);
164 163
165 /* Assert RESET */ 164 gpiod_set_value(nop->gpiod_reset, 1);
166 nop_reset_set(nop, 1);
167 165
168 if (!IS_ERR(nop->clk)) 166 if (!IS_ERR(nop->clk))
169 clk_disable_unprepare(nop->clk); 167 clk_disable_unprepare(nop->clk);
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index 2f9735b35338..d1cd6b50f520 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -81,7 +81,9 @@ static void devm_usb_phy_release(struct device *dev, void *res)
81 81
82static int devm_usb_phy_match(struct device *dev, void *res, void *match_data) 82static int devm_usb_phy_match(struct device *dev, void *res, void *match_data)
83{ 83{
84 return res == match_data; 84 struct usb_phy **phy = res;
85
86 return *phy == match_data;
85} 87}
86 88
87/** 89/**