Lines Matching refs:pdev

53 	dev_dbg(&od->pdev->dev, "Creating %s -> %s\n", clk_alias, clk_name);
55 r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias);
57 dev_dbg(&od->pdev->dev,
73 dev_name(&od->pdev->dev));
75 rc = clk_add_alias(clk_alias, dev_name(&od->pdev->dev),
81 dev_err(&od->pdev->dev,
84 dev_err(&od->pdev->dev,
122 * @pdev: The platform device to update.
128 static int omap_device_build_from_dt(struct platform_device *pdev)
133 struct device_node *node = pdev->dev.of_node;
141 dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n");
166 dev_err(&pdev->dev, "Cannot lookup hwmod '%s'\n",
176 od = omap_device_alloc(pdev, hwmods, oh_cnt);
178 dev_err(&pdev->dev, "Cannot allocate omap_device for :%s\n",
185 for (i = 0; i < pdev->num_resources; i++) {
186 struct resource *r = &pdev->resource[i];
189 r->name = dev_name(&pdev->dev);
193 dev_pm_domain_set(&pdev->dev, &omap_device_pm_domain);
195 omap_device_enable(pdev);
196 pm_runtime_set_active(&pdev->dev);
205 dev_pm_domain_set(&pdev->dev, &omap_device_fail_pm_domain);
213 struct platform_device *pdev = to_platform_device(dev);
219 if (pdev->archdata.od)
220 omap_device_delete(pdev->archdata.od);
223 od = to_omap_device(pdev);
226 err = omap_device_idle(pdev);
232 od = to_omap_device(pdev);
242 if (pdev->dev.of_node)
243 omap_device_build_from_dt(pdev);
247 od = to_omap_device(pdev);
293 * @pdev: The platform device to update.
302 * If any hwmods exist for the omap_device associated with @pdev,
306 int omap_device_get_context_loss_count(struct platform_device *pdev)
311 od = to_omap_device(pdev);
321 * @pdev: platform_device that will be included in this omap_device
330 struct omap_device *omap_device_alloc(struct platform_device *pdev,
350 od->pdev = pdev;
351 pdev->archdata.od = od;
363 dev_err(&pdev->dev, "omap_device: build failed (%d)\n", ret);
373 od->pdev->archdata.od = NULL;
381 struct platform_device *pdev = to_platform_device(dev);
388 return omap_device_idle(pdev);
393 struct platform_device *pdev = to_platform_device(dev);
396 ret = omap_device_enable(pdev);
422 struct platform_device *pdev = to_platform_device(dev);
423 struct omap_device *od = to_omap_device(pdev);
434 omap_device_idle(pdev);
444 struct platform_device *pdev = to_platform_device(dev);
445 struct omap_device *od = to_omap_device(pdev);
449 omap_device_enable(pdev);
479 * @pdev: the platform device (omap_device) to register.
485 int omap_device_register(struct platform_device *pdev)
487 pr_debug("omap_device: %s: registering\n", pdev->name);
489 dev_pm_domain_set(&pdev->dev, &omap_device_pm_domain);
490 return platform_device_add(pdev);
498 * @pdev: the platform device to activate
508 int omap_device_enable(struct platform_device *pdev)
513 od = to_omap_device(pdev);
516 dev_warn(&pdev->dev,
532 * @pdev: The platform_device (omap_device) to idle
539 int omap_device_idle(struct platform_device *pdev)
544 od = to_omap_device(pdev);
547 dev_warn(&pdev->dev,
563 * @pdev: struct platform_device * to reset
567 * associated with the hwmods backing the platform_device @pdev. All
568 * of the hwmods associated with @pdev must have the same hardreset
573 int omap_device_assert_hardreset(struct platform_device *pdev, const char *name)
575 struct omap_device *od = to_omap_device(pdev);
590 * @pdev: struct platform_device * to reset
594 * associated with the hwmods backing the platform_device @pdev. All
595 * of the hwmods associated with @pdev must have the same hardreset
600 int omap_device_deassert_hardreset(struct platform_device *pdev,
603 struct omap_device *od = to_omap_device(pdev);
645 return &oh->od->pdev->dev;
669 struct platform_device *pdev = to_platform_device(dev);
670 struct omap_device *od = to_omap_device(pdev);
694 omap_device_idle(pdev);