12 #include <linux/module.h>
22 #define BM_OVER_CUR_DIS BIT(7)
38 if (usbmisc->
usbdev[i].dev == dev)
40 else if (!usbmisc->
usbdev[i].dev)
45 return ERR_PTR(-
EBUSY);
54 static int usbmisc_imx6q_init(
struct device *dev)
61 usbdev = get_usbdev(dev);
63 return PTR_ERR(usbdev);
70 spin_unlock_irqrestore(&usbmisc->
lock, flags);
76 static const struct usbmisc_ops imx6q_usbmisc_ops = {
77 .init = usbmisc_imx6q_init,
80 static const struct of_device_id usbmisc_imx6q_dt_ids[] = {
81 { .compatible =
"fsl,imx6q-usbmisc"},
106 if (IS_ERR(data->
clk)) {
108 "failed to get clock, err=%ld\n", PTR_ERR(data->
clk));
109 return PTR_ERR(data->
clk);
112 ret = clk_prepare_enable(data->
clk);
115 "clk_prepare_enable failed, err=%d\n", ret);
121 clk_disable_unprepare(data->
clk);
133 clk_disable_unprepare(usbmisc->
clk);
138 .probe = usbmisc_imx6q_probe,
141 .name =
"usbmisc_imx6q",
143 .of_match_table = usbmisc_imx6q_dt_ids,