Lines Matching refs:dev

148 	struct device		*dev;
186 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n",
194 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n",
211 dev_dbg(twl->dev,
225 dev_dbg(twl->dev,
292 dev_err(twl->dev, "USB link status err %d\n", status);
312 kobject_uevent(&twl->dev->kobj, linkstat == MUSB_VBUS_VALID
315 dev_dbg(twl->dev, "HW_CONDITIONS 0x%02x/%d; link %d\n",
342 dev_err(twl->dev, "unsupported T2 transceiver mode %d\n",
367 dev_err(twl->dev, "Timeout setting T2 HSUSB "
390 static int twl4030_usb_runtime_suspend(struct device *dev);
391 static int twl4030_usb_runtime_resume(struct device *dev);
393 static int __maybe_unused twl4030_usb_suspend(struct device *dev)
395 struct twl4030_usb *twl = dev_get_drvdata(dev);
402 dev_dbg(twl->dev, "%s\n", __func__);
405 twl4030_usb_runtime_suspend(dev);
412 static int __maybe_unused twl4030_usb_resume(struct device *dev)
414 struct twl4030_usb *twl = dev_get_drvdata(dev);
416 dev_dbg(twl->dev, "%s\n", __func__);
419 twl4030_usb_runtime_resume(dev);
428 static int __maybe_unused twl4030_usb_runtime_suspend(struct device *dev)
430 struct twl4030_usb *twl = dev_get_drvdata(dev);
432 dev_dbg(twl->dev, "%s\n", __func__);
444 static int __maybe_unused twl4030_usb_runtime_resume(struct device *dev)
446 struct twl4030_usb *twl = dev_get_drvdata(dev);
449 dev_dbg(twl->dev, "%s\n", __func__);
453 dev_err(twl->dev, "Failed to enable usb3v1\n");
457 dev_err(twl->dev, "Failed to enable usb1v8\n");
470 dev_err(twl->dev, "Failed to enable usb1v5\n");
496 dev_dbg(twl->dev, "%s\n", __func__);
505 dev_dbg(twl->dev, "%s\n", __func__);
506 pm_runtime_get_sync(twl->dev);
508 pm_runtime_mark_last_busy(twl->dev);
509 pm_runtime_put_autosuspend(twl->dev);
532 twl->usb3v1 = devm_regulator_get(twl->dev, "usb3v1");
541 twl->usb1v5 = devm_regulator_get(twl->dev, "usb1v5");
550 twl->usb1v8 = devm_regulator_get(twl->dev, "usb1v8");
563 static ssize_t vbus_show(struct device *dev,
566 struct twl4030_usb *twl = dev_get_drvdata(dev);
592 dev_dbg(twl->dev, "%s: cable connected %i\n",
594 pm_runtime_get_sync(twl->dev);
599 dev_dbg(twl->dev, "%s: cable disconnected %i\n",
601 pm_runtime_mark_last_busy(twl->dev);
602 pm_runtime_put_autosuspend(twl->dev);
613 if (status == MUSB_ID_GROUND && pm_runtime_active(twl->dev)) {
619 sysfs_notify(&twl->dev->kobj, NULL, "vbus");
636 pm_runtime_get_sync(twl->dev);
639 pm_runtime_mark_last_busy(twl->dev);
640 pm_runtime_put_autosuspend(twl->dev);
685 struct twl4030_usb_data *pdata = dev_get_platdata(&pdev->dev);
690 struct device_node *np = pdev->dev.of_node;
693 twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
703 dev_err(&pdev->dev, "twl4030 initialized without pdata\n");
707 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL);
711 twl->dev = &pdev->dev;
717 twl->phy.dev = twl->dev;
726 phy = devm_phy_create(twl->dev, NULL, &ops);
728 dev_dbg(&pdev->dev, "Failed to create PHY\n");
734 phy_provider = devm_of_phy_provider_register(twl->dev,
746 dev_err(&pdev->dev, "ldo init failed\n");
752 if (device_create_file(&pdev->dev, &dev_attr_vbus))
753 dev_warn(&pdev->dev, "could not create sysfs file\n");
757 pm_runtime_use_autosuspend(&pdev->dev);
758 pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
759 pm_runtime_enable(&pdev->dev);
760 pm_runtime_get_sync(&pdev->dev);
770 status = devm_request_threaded_irq(twl->dev, twl->irq, NULL,
774 dev_dbg(&pdev->dev, "can't get IRQ %d, err %d\n",
784 pm_runtime_mark_last_busy(&pdev->dev);
785 pm_runtime_put_autosuspend(twl->dev);
787 dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
797 pm_runtime_get_sync(twl->dev);
799 device_remove_file(twl->dev, &dev_attr_vbus);
806 pm_runtime_put_noidle(twl->dev);
807 pm_runtime_mark_last_busy(twl->dev);
808 pm_runtime_dont_use_autosuspend(&pdev->dev);
809 pm_runtime_put_sync(twl->dev);
810 pm_runtime_disable(twl->dev);