Lines Matching defs:dev
445 struct device *dev;
621 dev_dbg(xudc->dev,
703 pm_runtime_get_sync(xudc->dev);
707 dev_err(xudc->dev, "UTMI power on failed: %d\n", err);
711 dev_err(xudc->dev, "USB3 PHY power on failed: %d\n", err);
713 dev_dbg(xudc->dev, "device mode on\n");
725 dev_dbg(xudc->dev, "device mode off\n");
761 dev_err(xudc->dev, "UTMI PHY power off failed: %d\n", err);
765 dev_err(xudc->dev, "USB3 PHY power off failed: %d\n", err);
767 pm_runtime_put(xudc->dev);
791 dev_info(xudc->dev, "phy index could not be found for shared USB PHY");
803 dev_dbg(xudc->dev, "%s(): event is %d\n", __func__, usbphy->last_event);
807 dev_dbg(xudc->dev, "Same role(%d) received. Ignore",
816 dev_dbg(xudc->dev, "%s(): current phy index is %d\n", __func__,
843 dev_info(xudc->dev, "PLS = Inactive. Toggle VBUS\n");
870 dev_dbg(xudc->dev, "pls = %x\n", pls);
873 dev_dbg(xudc->dev, "toggle vbus\n");
1025 dev_dbg(xudc->dev, "completing request %p on EP %u with status %d\n",
1222 dev_dbg(xudc->dev, "ring doorbell: %#x\n", val);
1250 dev_err(xudc->dev, "control EP has pending transfers\n");
1264 dev_err(xudc->dev, "failed to map request: %d\n", err);
1373 dev_dbg(ep->xudc->dev, "%s: request %p -> %p; trb %p\n", __func__,
1397 dev_dbg(ep->xudc->dev, "%s: request %p -> %p; enq ptr: %p; trb %p\n",
1471 if (dma_mapping_error(xudc->dev, deq_ptr)) {
1541 dev_err(xudc->dev, "can't halt isochronous EP\n");
1546 dev_dbg(xudc->dev, "EP %u already %s\n", ep->index,
1595 dev_err(xudc->dev, "can't halt EP with requests pending\n");
1628 dev_warn(xudc->dev,
1701 dev_err(xudc->dev, "endpoint %u already disabled\n",
1742 dev_info(xudc->dev, "ep %u disabled\n", ep->index);
1793 dev_err(xudc->dev, "too many isochronous endpoints\n");
1856 dev_info(xudc->dev, "EP %u (type: %s, dir: %s) enabled\n", ep->index,
2007 dev_dbg(xudc->dev, "%s: PORTPM=%#x, speed=%x\n", __func__,
2026 dev_dbg(xudc->dev, "%s: ret value is %d", __func__, ret);
2038 pm_runtime_get_sync(xudc->dev);
2052 dev_dbg(xudc->dev, "%s: pullup:%d", __func__, is_on);
2056 pm_runtime_put(xudc->dev);
2073 pm_runtime_get_sync(xudc->dev);
2110 dev_dbg(xudc->dev, "%s: ret value is %d", __func__, ret);
2113 pm_runtime_put(xudc->dev);
2125 pm_runtime_get_sync(xudc->dev);
2140 dev_dbg(xudc->dev, "Gadget stopped");
2144 pm_runtime_put(xudc->dev);
2155 dev_dbg(xudc->dev, "%s: %u mA\n", __func__, m_a);
2167 dev_dbg(xudc->dev, "%s: %d\n", __func__, is_on);
2506 dev_dbg(xudc->dev, "set address: %u\n", addr);
2526 dev_dbg(xudc->dev, "USB_REQ_GET_STATUS\n");
2530 dev_dbg(xudc->dev, "USB_REQ_SET_ADDRESS\n");
2534 dev_dbg(xudc->dev, "USB_REQ_SET_SEL\n");
2538 dev_dbg(xudc->dev, "USB_REQ_SET_ISOCH_DELAY\n");
2543 dev_dbg(xudc->dev, "USB_REQ_CLEAR/SET_FEATURE\n");
2547 dev_dbg(xudc->dev, "USB_REQ_SET_CONFIGURATION\n");
2579 dev_warn(xudc->dev, "invalid sequence number detected\n");
2596 dev_warn(xudc->dev, "setup request failed: %d\n", ret);
2665 dev_dbg(xudc->dev, "bytes transferred %u / %u\n",
2683 dev_warn(xudc->dev, "transfer event on dequeued request\n");
2699 dev_warn(xudc->dev, "transfer event on disabled EP %u\n",
2721 dev_info(xudc->dev, "stream rejected on EP %u\n", ep_index);
2726 dev_info(xudc->dev, "prime pipe received on EP %u\n", ep_index);
2756 dev_err(xudc->dev, "completion error %#x on EP %u\n",
2762 dev_info(xudc->dev, "sequence number error\n");
2779 dev_dbg(xudc->dev, "stop completion code on EP %u\n",
2786 dev_dbg(xudc->dev, "completion event %#x on EP %u\n",
2824 if (!dma_mapping_error(xudc->dev, deq_ptr)) {
2931 dev_dbg(xudc->dev, "port suspend\n");
2946 dev_dbg(xudc->dev, "port resume\n");
2974 dev_dbg(xudc->dev, "STCHG_REQ, PORTHALT = %#x\n", porthalt);
2981 dev_dbg(xudc->dev, "PRC, PR, PORTSC = %#x\n", portsc);
2992 dev_dbg(xudc->dev, "PRC, Not PR, PORTSC = %#x\n", portsc);
3001 dev_dbg(xudc->dev, "WRC, PORTSC = %#x\n", portsc);
3009 dev_dbg(xudc->dev, "CSC, PORTSC = %#x\n", portsc);
3027 dev_dbg(xudc->dev, "PLC, PORTSC = %#x\n", portsc);
3052 dev_warn(xudc->dev, "CEC, PORTSC = %#x\n", portsc);
3056 dev_dbg(xudc->dev, "PORTSC = %#x\n", xudc_readl(xudc, PORTSC));
3084 dev_info(xudc->dev, "Unrecognized TRB type = %#x\n", type);
3211 dma_alloc_coherent(xudc->dev, XUDC_NR_EPS *
3218 dmam_pool_create(dev_name(xudc->dev), xudc->dev,
3247 dma_free_coherent(xudc->dev, XUDC_NR_EPS * sizeof(*xudc->ep_context),
3268 dma_free_coherent(xudc->dev, XUDC_NR_EPS * sizeof(*xudc->ep_context),
3278 dma_alloc_coherent(xudc->dev, XUDC_EVENT_RING_SIZE *
3290 dma_free_coherent(xudc->dev, XUDC_EVENT_RING_SIZE *
3337 dma_free_coherent(xudc->dev, XUDC_EVENT_RING_SIZE *
3486 xudc->utmi_phy = devm_kcalloc(xudc->dev, xudc->soc->num_phys,
3491 xudc->usb3_phy = devm_kcalloc(xudc->dev, xudc->soc->num_phys,
3496 xudc->usbphy = devm_kcalloc(xudc->dev, xudc->soc->num_phys,
3508 xudc->utmi_phy[i] = devm_phy_optional_get(xudc->dev, phy_name);
3512 dev_err(xudc->dev, "failed to get usb2-%d PHY: %d\n",
3518 xudc->usbphy[i] = devm_usb_get_phy_by_node(xudc->dev,
3519 xudc->utmi_phy[i]->dev.of_node,
3523 dev_err(xudc->dev, "failed to get usbphy-%d: %d\n",
3538 xudc->usb3_phy[i] = devm_phy_optional_get(xudc->dev, phy_name);
3542 dev_err(xudc->dev, "failed to get usb3-%d PHY: %d\n",
3547 dev_dbg(xudc->dev, "usb3-%d PHY registered", usb3);
3580 dev_err(xudc->dev, "UTMI PHY #%u initialization failed: %d\n", i, err);
3586 dev_err(xudc->dev, "USB3 PHY #%u initialization failed: %d\n", i, err);
3603 "dev",
3611 "dev",
3692 struct device *dev = xudc->dev;
3695 xudc->genpd_dev_device = dev_pm_domain_attach_by_name(dev, "dev");
3698 dev_err(dev, "failed to get device power domain: %d\n", err);
3702 xudc->genpd_dev_ss = dev_pm_domain_attach_by_name(dev, "ss");
3705 dev_err(dev, "failed to get SuperSpeed power domain: %d\n", err);
3709 xudc->genpd_dl_device = device_link_add(dev, xudc->genpd_dev_device,
3713 dev_err(dev, "failed to add USB device link\n");
3717 xudc->genpd_dl_ss = device_link_add(dev, xudc->genpd_dev_ss,
3721 dev_err(dev, "failed to add SuperSpeed device link\n");
3735 xudc = devm_kzalloc(&pdev->dev, sizeof(*xudc), GFP_KERNEL);
3739 xudc->dev = &pdev->dev;
3742 xudc->soc = of_device_get_match_data(&pdev->dev);
3747 xudc->base = devm_ioremap_resource(&pdev->dev, res);
3766 err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0,
3767 dev_name(&pdev->dev), xudc);
3769 dev_err(xudc->dev, "failed to claim IRQ#%u: %d\n", xudc->irq,
3774 xudc->clks = devm_kcalloc(&pdev->dev, xudc->soc->num_clks, sizeof(*xudc->clks),
3782 err = devm_clk_bulk_get(&pdev->dev, xudc->soc->num_clks, xudc->clks);
3785 dev_err(xudc->dev, "failed to request clocks: %d\n", err);
3790 xudc->supplies = devm_kcalloc(&pdev->dev, xudc->soc->num_supplies,
3798 err = devm_regulator_bulk_get(&pdev->dev, xudc->soc->num_supplies,
3802 dev_err(xudc->dev, "failed to request regulators: %d\n", err);
3807 xudc->padctl = tegra_xusb_padctl_get(&pdev->dev);
3813 dev_err(xudc->dev, "failed to enable regulators: %d\n", err);
3848 pm_runtime_enable(&pdev->dev);
3855 err = usb_add_gadget_udc(&pdev->dev, &xudc->gadget);
3857 dev_err(&pdev->dev, "failed to add USB gadget: %d\n", err);
3864 pm_runtime_disable(&pdev->dev);
3885 pm_runtime_get_sync(xudc->dev);
3906 pm_runtime_disable(xudc->dev);
3907 pm_runtime_put(xudc->dev);
3918 dev_dbg(xudc->dev, "entering ELPG\n");
3933 dev_dbg(xudc->dev, "entering ELPG done\n");
3942 dev_dbg(xudc->dev, "exiting ELPG\n");
3968 dev_dbg(xudc->dev, "exiting ELPG done\n");
3972 static int __maybe_unused tegra_xudc_suspend(struct device *dev)
3974 struct tegra_xudc *xudc = dev_get_drvdata(dev);
3983 if (!pm_runtime_status_suspended(dev)) {
3989 pm_runtime_disable(dev);
3994 static int __maybe_unused tegra_xudc_resume(struct device *dev)
3996 struct tegra_xudc *xudc = dev_get_drvdata(dev);
4010 pm_runtime_enable(dev);
4015 static int __maybe_unused tegra_xudc_runtime_suspend(struct device *dev)
4017 struct tegra_xudc *xudc = dev_get_drvdata(dev);
4022 static int __maybe_unused tegra_xudc_runtime_resume(struct device *dev)
4024 struct tegra_xudc *xudc = dev_get_drvdata(dev);