Lines Matching refs:pdev

53 	dev_dbg(&od->pdev->dev, "Creating %s -> %s\n", clk_alias, clk_name);  in _add_clkdev()
55 r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias); in _add_clkdev()
57 dev_dbg(&od->pdev->dev, in _add_clkdev()
73 dev_name(&od->pdev->dev)); in _add_clkdev()
75 rc = clk_add_alias(clk_alias, dev_name(&od->pdev->dev), in _add_clkdev()
81 dev_err(&od->pdev->dev, in _add_clkdev()
84 dev_err(&od->pdev->dev, in _add_clkdev()
132 static int omap_device_build_from_dt(struct platform_device *pdev) in omap_device_build_from_dt() argument
137 struct device_node *node = pdev->dev.of_node; in omap_device_build_from_dt()
145 dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n"); in omap_device_build_from_dt()
170 dev_err(&pdev->dev, "Cannot lookup hwmod '%s'\n", in omap_device_build_from_dt()
180 od = omap_device_alloc(pdev, hwmods, oh_cnt); in omap_device_build_from_dt()
182 dev_err(&pdev->dev, "Cannot allocate omap_device for :%s\n", in omap_device_build_from_dt()
189 for (i = 0; i < pdev->num_resources; i++) { in omap_device_build_from_dt()
190 struct resource *r = &pdev->resource[i]; in omap_device_build_from_dt()
193 r->name = dev_name(&pdev->dev); in omap_device_build_from_dt()
197 dev_pm_domain_set(&pdev->dev, &omap_device_pm_domain); in omap_device_build_from_dt()
199 omap_device_enable(pdev); in omap_device_build_from_dt()
200 pm_runtime_set_active(&pdev->dev); in omap_device_build_from_dt()
209 dev_pm_domain_set(&pdev->dev, &omap_device_fail_pm_domain); in omap_device_build_from_dt()
217 struct platform_device *pdev = to_platform_device(dev); in _omap_device_notifier_call() local
223 if (pdev->archdata.od) in _omap_device_notifier_call()
224 omap_device_delete(pdev->archdata.od); in _omap_device_notifier_call()
227 od = to_omap_device(pdev); in _omap_device_notifier_call()
230 err = omap_device_idle(pdev); in _omap_device_notifier_call()
236 od = to_omap_device(pdev); in _omap_device_notifier_call()
244 if (pdev->dev.of_node) in _omap_device_notifier_call()
245 omap_device_build_from_dt(pdev); in _omap_device_notifier_call()
249 od = to_omap_device(pdev); in _omap_device_notifier_call()
308 int omap_device_get_context_loss_count(struct platform_device *pdev) in omap_device_get_context_loss_count() argument
313 od = to_omap_device(pdev); in omap_device_get_context_loss_count()
333 struct omap_device *omap_device_alloc(struct platform_device *pdev, in omap_device_alloc() argument
353 od->pdev = pdev; in omap_device_alloc()
354 pdev->archdata.od = od; in omap_device_alloc()
366 dev_err(&pdev->dev, "omap_device: build failed (%d)\n", ret); in omap_device_alloc()
376 od->pdev->archdata.od = NULL; in omap_device_delete()
394 struct platform_device *pdev) in omap_device_copy_resources() argument
402 if (!oh || !oh->od || !oh->od->pdev) in omap_device_copy_resources()
405 np = oh->od->pdev->dev.of_node; in omap_device_copy_resources()
453 error = platform_device_add_resources(pdev, res, 2); in omap_device_copy_resources()
460 __func__, oh->name, dev_name(&pdev->dev), in omap_device_copy_resources()
486 struct platform_device *pdev; in omap_device_build() local
503 pdev = platform_device_alloc(pdev_name, pdev_id); in omap_device_build()
504 if (!pdev) { in omap_device_build()
510 if (pdev->id != -1) in omap_device_build()
511 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); in omap_device_build()
513 dev_set_name(&pdev->dev, "%s", pdev->name); in omap_device_build()
520 ret = omap_device_copy_resources(oh, pdev); in omap_device_build()
524 od = omap_device_alloc(pdev, &oh, 1); in omap_device_build()
530 ret = platform_device_add_data(pdev, pdata, pdata_len); in omap_device_build()
534 ret = omap_device_register(pdev); in omap_device_build()
538 return pdev; in omap_device_build()
543 platform_device_put(pdev); in omap_device_build()
554 struct platform_device *pdev = to_platform_device(dev); in _od_runtime_suspend() local
561 return omap_device_idle(pdev); in _od_runtime_suspend()
566 struct platform_device *pdev = to_platform_device(dev); in _od_runtime_resume() local
569 ret = omap_device_enable(pdev); in _od_runtime_resume()
595 struct platform_device *pdev = to_platform_device(dev); in _od_suspend_noirq() local
596 struct omap_device *od = to_omap_device(pdev); in _od_suspend_noirq()
607 omap_device_idle(pdev); in _od_suspend_noirq()
617 struct platform_device *pdev = to_platform_device(dev); in _od_resume_noirq() local
618 struct omap_device *od = to_omap_device(pdev); in _od_resume_noirq()
622 omap_device_enable(pdev); in _od_resume_noirq()
658 int omap_device_register(struct platform_device *pdev) in omap_device_register() argument
660 pr_debug("omap_device: %s: registering\n", pdev->name); in omap_device_register()
662 dev_pm_domain_set(&pdev->dev, &omap_device_pm_domain); in omap_device_register()
663 return platform_device_add(pdev); in omap_device_register()
681 int omap_device_enable(struct platform_device *pdev) in omap_device_enable() argument
686 od = to_omap_device(pdev); in omap_device_enable()
689 dev_warn(&pdev->dev, in omap_device_enable()
712 int omap_device_idle(struct platform_device *pdev) in omap_device_idle() argument
717 od = to_omap_device(pdev); in omap_device_idle()
720 dev_warn(&pdev->dev, in omap_device_idle()
746 int omap_device_assert_hardreset(struct platform_device *pdev, const char *name) in omap_device_assert_hardreset() argument
748 struct omap_device *od = to_omap_device(pdev); in omap_device_assert_hardreset()
773 int omap_device_deassert_hardreset(struct platform_device *pdev, in omap_device_deassert_hardreset() argument
776 struct omap_device *od = to_omap_device(pdev); in omap_device_deassert_hardreset()
818 return &oh->od->pdev->dev; in omap_device_get_by_hwmod_name()
842 struct platform_device *pdev = to_platform_device(dev); in omap_device_late_idle() local
843 struct omap_device *od = to_omap_device(pdev); in omap_device_late_idle()
867 omap_device_idle(pdev); in omap_device_late_idle()