12 #include <linux/kernel.h>
13 #include <linux/export.h>
15 #include <linux/device.h>
16 #include <linux/slab.h>
29 if (phy->
type != type)
38 static void devm_usb_phy_release(
struct device *
dev,
void *
res)
45 static int devm_usb_phy_match(
struct device *
dev,
void *
res,
void *match_data)
47 return res == match_data;
97 phy = __usb_find_phy(&phy_list, type);
99 pr_err(
"unable to find transceiver of type %s\n",
100 usb_phy_type_string(type));
107 spin_unlock_irqrestore(&phy_lock, flags);
127 r =
devres_destroy(dev, devm_usb_phy_release, devm_usb_phy_match, phy);
170 if (phy->
type == type) {
172 dev_err(x->
dev,
"transceiver type %s already exists\n",
173 usb_phy_type_string(type));
182 spin_unlock_irqrestore(&phy_lock, flags);
200 spin_unlock_irqrestore(&phy_lock, flags);
210 return "a_wait_vrise";
212 return "a_wait_bcon";
218 return "a_peripheral";
220 return "a_wait_vfall";
228 return "b_peripheral";
230 return "b_wait_acon";