• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/i2c/chips/

Lines Matching refs:otg

33 #include <linux/usb/otg.h>
53 struct otg_transceiver otg;
260 return state_string(isp->otg.state);
281 isp->otg.state = OTG_STATE_UNDEFINED;
310 if (!isp->otg.host)
316 dev = isp->otg.host->controller;
328 if (!isp->otg.host)
331 dev = isp->otg.host->controller;
338 isp->otg.gadget->b_hnp_enable = 0;
339 isp->otg.gadget->a_hnp_support = 0;
340 isp->otg.gadget->a_alt_hnp_support = 0;
341 return usb_gadget_vbus_disconnect(isp->otg.gadget);
370 if (isp->otg.state == OTG_STATE_A_IDLE)
373 isp->otg.default_a = 1;
374 if (isp->otg.host) {
375 isp->otg.host->is_b_host = 0;
378 if (isp->otg.gadget) {
379 isp->otg.gadget->is_a_peripheral = 1;
382 isp->otg.state = OTG_STATE_A_IDLE;
390 if (isp->otg.state == OTG_STATE_B_IDLE)
393 isp->otg.default_a = 0;
394 if (isp->otg.host) {
395 isp->otg.host->is_b_host = 1;
398 if (isp->otg.gadget) {
399 isp->otg.gadget->is_a_peripheral = 0;
402 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,
524 else if (isp->otg.state == OTG_STATE_A_WAIT_VFALL) {
531 if (isp->otg.state == OTG_STATE_B_IDLE
532 || isp->otg.state == OTG_STATE_UNDEFINED) {
538 if (isp->otg.state == OTG_STATE_A_IDLE
539 || 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;
648 switch (isp->otg.state) {
652 isp->otg.state = OTG_STATE_B_PERIPHERAL;
658 isp->otg.state = OTG_STATE_A_PERIPHERAL;
668 dump_regs(isp, "otg->isp1301");
686 pr_debug("otg: B_SRP_TIMEOUT, %06x\n", OTG_CTRL_REG);
693 if (isp->otg.state == OTG_STATE_B_SRP_INIT)
701 pr_debug("otg: %s B_HNP_FAIL, %06x\n",
711 isp->otg.state = OTG_STATE_B_PERIPHERAL;
719 pr_debug("otg: %s SRP_DETECT, %06x\n",
723 switch (isp->otg.state) {
725 if (!isp->otg.host)
747 pr_info("otg: BCON_TMOUT from %s, %06x\n",
754 isp->otg.state = OTG_STATE_A_WAIT_VFALL;
762 printk(KERN_ERR "otg: %s, VBUS_ERR %04x ctrl %06x\n",
768 isp->otg.state = OTG_STATE_A_VBUS_ERR;
780 printk(KERN_NOTICE "otg: %s, SWITCH to %s, ctrl %06x\n",
789 switch (isp->otg.state) {
805 if (isp->otg.host) {
806 switch (isp->otg.state) {
808 isp->otg.state = OTG_STATE_B_HOST;
813 isp->otg.state = OTG_STATE_A_HOST;
817 isp->otg.state = OTG_STATE_A_WAIT_BCON;
831 usb_bus_start_enum(isp->otg.host,
832 isp->otg.host->otg_port);
863 pr_debug("otg: %s, %s %06x\n",
937 usb_gadget_vbus_connect(isp->otg.gadget);
947 isp->otg.state = OTG_STATE_B_PERIPHERAL;
956 enum usb_otg_state state = isp->otg.state;
964 if (isp->otg.default_a) {
979 isp->otg.state = OTG_STATE_A_HOST;
987 isp->otg.state = OTG_STATE_A_VBUS_ERR;
996 usb_gadget_vbus_disconnect(isp->otg.gadget);
1003 if (isp->otg.host && state == OTG_STATE_A_IDLE)
1011 if (isp->otg.default_a) {
1014 isp->otg.state = OTG_STATE_A_WAIT_VFALL;
1027 isp->otg.state = OTG_STATE_B_IDLE;
1037 switch (isp->otg.state) {
1058 if (isp->otg.gadget && (isp_bstat & OTG_B_SESS_VLD)) {
1070 pr_debug("otg: unsupported b-device %s\n",
1076 if (state != isp->otg.state)
1089 dump_regs(isp, "isp1301->otg");
1113 /* transfer state from otg engine to isp1301 */
1119 /* transfer state from isp1301 to otg engine */
1134 switch (isp->otg.state) {
1137 isp->otg.state = OTG_STATE_A_HOST;
1146 isp->otg.state = OTG_STATE_B_HOST;
1275 isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host)
1277 struct isp1301 *isp = container_of(otg, struct isp1301, otg);
1279 if (!otg || isp != the_transceiver)
1285 isp->otg.host = 0;
1290 isp->otg.host = host;
1293 if (isp->otg.gadget)
1298 isp->otg.host = host;
1330 isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
1332 struct isp1301 *isp = container_of(otg, struct isp1301, otg);
1334 if (!otg || isp != the_transceiver)
1339 if (!isp->otg.default_a)
1341 usb_gadget_vbus_disconnect(isp->otg.gadget);
1342 isp->otg.gadget = 0;
1348 isp->otg.gadget = gadget;
1351 if (isp->otg.host)
1356 isp->otg.gadget = gadget;
1362 isp->otg.state = OTG_STATE_B_IDLE;
1405 struct isp1301 *isp = container_of(dev, struct isp1301, otg);
1409 || isp->otg.state != OTG_STATE_B_IDLE)
1419 isp->otg.state = OTG_STATE_B_SRP_INIT;
1421 pr_debug("otg: SRP, %s ... %06x\n", state_name(isp), OTG_CTRL_REG);
1432 struct isp1301 *isp = container_of(dev, struct isp1301, otg);
1436 if (isp->otg.default_a && (isp->otg.host == NULL
1437 || !isp->otg.host->b_hnp_enable))
1439 if (!isp->otg.default_a && (isp->otg.gadget == NULL
1440 || !isp->otg.gadget->b_hnp_enable))
1446 switch (isp->otg.state) {
1448 isp->otg.state = OTG_STATE_B_PERIPHERAL;
1453 usb_gadget_vbus_connect(isp->otg.gadget);
1463 pr_debug("otg: HNP %s, %06x ...\n",
1584 isp->otg.dev = &isp->client.dev;
1585 isp->otg.label = DRIVER_NAME;
1587 isp->otg.set_host = isp1301_set_host,
1588 isp->otg.set_peripheral = isp1301_set_peripheral,
1589 isp->otg.set_power = isp1301_set_power,
1590 isp->otg.start_srp = isp1301_start_srp,
1591 isp->otg.start_hnp = isp1301_start_hnp,
1609 status = otg_set_transceiver(&isp->otg);