Lines Matching refs:idev

287 	struct intel_device *idev = dev_id;  in intel_irq()  local
289 dev_info(&idev->pdev->dev, "hci_intel irq\n"); in intel_irq()
291 mutex_lock(&idev->hu_lock); in intel_irq()
292 if (idev->hu) in intel_irq()
293 intel_lpm_host_wake(idev->hu); in intel_irq()
294 mutex_unlock(&idev->hu_lock); in intel_irq()
297 pm_runtime_get(&idev->pdev->dev); in intel_irq()
298 pm_runtime_mark_last_busy(&idev->pdev->dev); in intel_irq()
299 pm_runtime_put_autosuspend(&idev->pdev->dev); in intel_irq()
315 struct intel_device *idev = list_entry(p, struct intel_device, in intel_set_power() local
321 if (hu->tty->dev->parent != idev->pdev->dev.parent) in intel_set_power()
324 if (!idev->reset) { in intel_set_power()
330 hu, dev_name(&idev->pdev->dev), powered); in intel_set_power()
332 gpiod_set_value(idev->reset, powered); in intel_set_power()
339 mutex_lock(&idev->hu_lock); in intel_set_power()
340 idev->hu = powered ? hu : NULL; in intel_set_power()
341 mutex_unlock(&idev->hu_lock); in intel_set_power()
343 if (idev->irq < 0) in intel_set_power()
346 if (powered && device_can_wakeup(&idev->pdev->dev)) { in intel_set_power()
347 err = devm_request_threaded_irq(&idev->pdev->dev, in intel_set_power()
348 idev->irq, NULL, in intel_set_power()
351 "bt-host-wake", idev); in intel_set_power()
354 hu, idev->irq); in intel_set_power()
358 device_wakeup_enable(&idev->pdev->dev); in intel_set_power()
360 pm_runtime_set_active(&idev->pdev->dev); in intel_set_power()
361 pm_runtime_use_autosuspend(&idev->pdev->dev); in intel_set_power()
362 pm_runtime_set_autosuspend_delay(&idev->pdev->dev, in intel_set_power()
364 pm_runtime_enable(&idev->pdev->dev); in intel_set_power()
365 } else if (!powered && device_may_wakeup(&idev->pdev->dev)) { in intel_set_power()
366 devm_free_irq(&idev->pdev->dev, idev->irq, idev); in intel_set_power()
367 device_wakeup_disable(&idev->pdev->dev); in intel_set_power()
369 pm_runtime_disable(&idev->pdev->dev); in intel_set_power()
390 struct intel_device *idev = list_entry(p, struct intel_device, in intel_busy_work() local
393 if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) { in intel_busy_work()
394 pm_runtime_get(&idev->pdev->dev); in intel_busy_work()
395 pm_runtime_mark_last_busy(&idev->pdev->dev); in intel_busy_work()
396 pm_runtime_put_autosuspend(&idev->pdev->dev); in intel_busy_work()
1037 struct intel_device *idev = list_entry(p, struct intel_device, in intel_enqueue() local
1040 if (hu->tty->dev->parent == idev->pdev->dev.parent) { in intel_enqueue()
1041 pm_runtime_get_sync(&idev->pdev->dev); in intel_enqueue()
1042 pm_runtime_mark_last_busy(&idev->pdev->dev); in intel_enqueue()
1043 pm_runtime_put_autosuspend(&idev->pdev->dev); in intel_enqueue()
1110 struct intel_device *idev = dev_get_drvdata(dev); in intel_suspend_device() local
1112 mutex_lock(&idev->hu_lock); in intel_suspend_device()
1113 if (idev->hu) in intel_suspend_device()
1114 intel_lpm_suspend(idev->hu); in intel_suspend_device()
1115 mutex_unlock(&idev->hu_lock); in intel_suspend_device()
1122 struct intel_device *idev = dev_get_drvdata(dev); in intel_resume_device() local
1124 mutex_lock(&idev->hu_lock); in intel_resume_device()
1125 if (idev->hu) in intel_resume_device()
1126 intel_lpm_resume(idev->hu); in intel_resume_device()
1127 mutex_unlock(&idev->hu_lock); in intel_resume_device()
1136 struct intel_device *idev = dev_get_drvdata(dev); in intel_suspend() local
1139 enable_irq_wake(idev->irq); in intel_suspend()
1146 struct intel_device *idev = dev_get_drvdata(dev); in intel_resume() local
1149 disable_irq_wake(idev->irq); in intel_resume()
1171 struct intel_device *idev; in intel_probe() local
1174 idev = devm_kzalloc(&pdev->dev, sizeof(*idev), GFP_KERNEL); in intel_probe()
1175 if (!idev) in intel_probe()
1178 mutex_init(&idev->hu_lock); in intel_probe()
1180 idev->pdev = pdev; in intel_probe()
1186 idev->reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); in intel_probe()
1187 if (IS_ERR(idev->reset)) { in intel_probe()
1189 return PTR_ERR(idev->reset); in intel_probe()
1192 idev->irq = platform_get_irq(pdev, 0); in intel_probe()
1193 if (idev->irq < 0) { in intel_probe()
1204 idev->irq = gpiod_to_irq(host_wake); in intel_probe()
1205 if (idev->irq < 0) { in intel_probe()
1216 platform_set_drvdata(pdev, idev); in intel_probe()
1220 list_add_tail(&idev->list, &intel_device_list); in intel_probe()
1224 desc_to_gpio(idev->reset), idev->irq); in intel_probe()
1231 struct intel_device *idev = platform_get_drvdata(pdev); in intel_remove() local
1236 list_del(&idev->list); in intel_remove()