• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/otg/

Lines Matching refs:otg

32 #include <linux/usb/otg.h>
55 struct otg_transceiver otg;
259 return state_string(isp->otg.state);
274 isp->otg.state = OTG_STATE_UNDEFINED;
303 if (!isp->otg.host)
309 dev = isp->otg.host->controller;
321 if (!isp->otg.host)
324 dev = isp->otg.host->controller;
331 isp->otg.gadget->b_hnp_enable = 0;
332 isp->otg.gadget->a_hnp_support = 0;
333 isp->otg.gadget->a_alt_hnp_support = 0;
334 return usb_gadget_vbus_disconnect(isp->otg.gadget);
364 if (isp->otg.state == OTG_STATE_A_IDLE)
367 isp->otg.default_a = 1;
368 if (isp->otg.host) {
369 isp->otg.host->is_b_host = 0;
372 if (isp->otg.gadget) {
373 isp->otg.gadget->is_a_peripheral = 1;
376 isp->otg.state = OTG_STATE_A_IDLE;
388 if (isp->otg.state == OTG_STATE_B_IDLE)
391 isp->otg.default_a = 0;
392 if (isp->otg.host) {
393 isp->otg.host->is_b_host = 1;
396 if (isp->otg.gadget) {
397 isp->otg.gadget->is_a_peripheral = 0;
400 isp->otg.state = OTG_STATE_B_IDLE;
415 pr_debug("otg: %06x, %s %s, otg/%02x stat/%02x.%02x\n",
501 if (isp->otg.state == state && !extra)
503 pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag,
525 else if (isp->otg.state == OTG_STATE_A_WAIT_VFALL) {
532 if (isp->otg.state == OTG_STATE_B_IDLE
533 || isp->otg.state == OTG_STATE_UNDEFINED) {
539 if (isp->otg.state == OTG_STATE_A_IDLE
540 || isp->otg.state == OTG_STATE_UNDEFINED) {
574 switch (isp->otg.state) {
580 if (isp->otg.gadget->b_hnp_enable) {
581 isp->otg.state = OTG_STATE_B_WAIT_ACON;
608 if (!(isp->otg.host))
611 switch (isp->otg.state) {
622 isp->otg.state = OTG_STATE_A_WAIT_VFALL;
630 isp->otg.state = OTG_STATE_A_WAIT_VRISE;
650 switch (isp->otg.state) {
654 isp->otg.state = OTG_STATE_B_PERIPHERAL;
660 isp->otg.state = OTG_STATE_A_PERIPHERAL;
672 dump_regs(isp, "otg->isp1301");
690 pr_debug("otg: B_SRP_TIMEOUT, %06x\n", omap_readl(OTG_CTRL));
697 if (isp->otg.state == OTG_STATE_B_SRP_INIT)
705 pr_debug("otg: %s B_HNP_FAIL, %06x\n",
715 isp->otg.state = OTG_STATE_B_PERIPHERAL;
723 pr_debug("otg: %s SRP_DETECT, %06x\n",
727 switch (isp->otg.state) {
729 if (!isp->otg.host)
751 pr_info("otg: BCON_TMOUT from %s, %06x\n",
758 isp->otg.state = OTG_STATE_A_WAIT_VFALL;
766 printk(KERN_ERR "otg: %s, VBUS_ERR %04x ctrl %06x\n",
772 isp->otg.state = OTG_STATE_A_VBUS_ERR;
784 printk(KERN_NOTICE "otg: %s, SWITCH to %s, ctrl %06x\n",
793 switch (isp->otg.state) {
809 if (isp->otg.host) {
810 switch (isp->otg.state) {
812 isp->otg.state = OTG_STATE_B_HOST;
817 isp->otg.state = OTG_STATE_A_HOST;
821 isp->otg.state = OTG_STATE_A_WAIT_BCON;
835 usb_bus_start_enum(isp->otg.host,
836 isp->otg.host->otg_port);
871 pr_debug("otg: %s, %s %06x\n",
952 usb_gadget_vbus_connect(isp->otg.gadget);
962 isp->otg.state = OTG_STATE_B_PERIPHERAL;
971 enum usb_otg_state state = isp->otg.state;
979 if (isp->otg.default_a) {
994 isp->otg.state = OTG_STATE_A_HOST;
1002 isp->otg.state = OTG_STATE_A_VBUS_ERR;
1011 usb_gadget_vbus_disconnect(isp->otg.gadget);
1018 if (isp->otg.host && state == OTG_STATE_A_IDLE)
1028 if (isp->otg.default_a) {
1031 isp->otg.state = OTG_STATE_A_WAIT_VFALL;
1044 isp->otg.state = OTG_STATE_B_IDLE;
1055 switch (isp->otg.state) {
1077 if (isp->otg.gadget && (isp_bstat & OTG_B_SESS_VLD)) {
1089 pr_debug("otg: unsupported b-device %s\n",
1095 if (state != isp->otg.state)
1108 dump_regs(isp, "isp1301->otg");
1132 /* transfer state from otg engine to isp1301 */
1138 /* transfer state from isp1301 to otg engine */
1153 switch (isp->otg.state) {
1156 isp->otg.state = OTG_STATE_A_HOST;
1165 isp->otg.state = OTG_STATE_B_HOST;
1295 isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host)
1297 struct isp1301 *isp = container_of(otg, struct isp1301, otg);
1299 if (!otg || isp != the_transceiver)
1305 isp->otg.host = NULL;
1310 isp->otg.host = host;
1313 if (isp->otg.gadget)
1318 isp->otg.host = host;
1350 isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
1352 struct isp1301 *isp = container_of(otg, struct isp1301, otg);
1357 if (!otg || isp != the_transceiver)
1362 if (!isp->otg.default_a)
1364 usb_gadget_vbus_disconnect(isp->otg.gadget);
1365 isp->otg.gadget = NULL;
1371 isp->otg.gadget = gadget;
1374 if (isp->otg.host)
1379 isp->otg.gadget = gadget;
1387 isp->otg.state = OTG_STATE_B_IDLE;
1430 struct isp1301 *isp = container_of(dev, struct isp1301, otg);
1434 || isp->otg.state != OTG_STATE_B_IDLE)
1444 isp->otg.state = OTG_STATE_B_SRP_INIT;
1446 pr_debug("otg: SRP, %s ... %06x\n", state_name(isp),
1458 struct isp1301 *isp = container_of(dev, struct isp1301, otg);
1463 if (isp->otg.default_a && (isp->otg.host == NULL
1464 || !isp->otg.host->b_hnp_enable))
1466 if (!isp->otg.default_a && (isp->otg.gadget == NULL
1467 || !isp->otg.gadget->b_hnp_enable))
1473 switch (isp->otg.state) {
1475 isp->otg.state = OTG_STATE_B_PERIPHERAL;
1480 usb_gadget_vbus_connect(isp->otg.gadget);
1492 pr_debug("otg: HNP %s, %06x ...\n",
1590 isp->otg.dev = &i2c->dev;
1591 isp->otg.label = DRIVER_NAME;
1593 isp->otg.set_host = isp1301_set_host,
1594 isp->otg.set_peripheral = isp1301_set_peripheral,
1595 isp->otg.set_power = isp1301_set_power,
1596 isp->otg.start_srp = isp1301_start_srp,
1597 isp->otg.start_hnp = isp1301_start_hnp,
1615 status = otg_set_transceiver(&isp->otg);