Lines Matching refs:drv
861 int __platform_driver_register(struct platform_driver *drv, in __platform_driver_register() argument
864 drv->driver.owner = owner; in __platform_driver_register()
865 drv->driver.bus = &platform_bus_type; in __platform_driver_register()
867 return driver_register(&drv->driver); in __platform_driver_register()
875 void platform_driver_unregister(struct platform_driver *drv) in platform_driver_unregister() argument
877 driver_unregister(&drv->driver); in platform_driver_unregister()
913 int __init_or_module __platform_driver_probe(struct platform_driver *drv, in __platform_driver_probe() argument
918 if (drv->driver.probe_type == PROBE_PREFER_ASYNCHRONOUS) { in __platform_driver_probe()
920 drv->driver.name, __func__); in __platform_driver_probe()
929 drv->driver.probe_type = PROBE_FORCE_SYNCHRONOUS; in __platform_driver_probe()
935 drv->prevent_deferred_probe = true; in __platform_driver_probe()
938 drv->driver.suppress_bind_attrs = true; in __platform_driver_probe()
941 drv->probe = probe; in __platform_driver_probe()
942 retval = __platform_driver_register(drv, module); in __platform_driver_probe()
947 drv->probe = platform_probe_fail; in __platform_driver_probe()
952 if (!bus_for_each_dev(&platform_bus_type, NULL, &drv->driver, is_bound_to_driver)) { in __platform_driver_probe()
954 platform_driver_unregister(drv); in __platform_driver_probe()
1125 const struct device_driver *drv = dev->driver; in platform_pm_suspend() local
1128 if (!drv) in platform_pm_suspend()
1131 if (drv->pm) { in platform_pm_suspend()
1132 if (drv->pm->suspend) in platform_pm_suspend()
1133 ret = drv->pm->suspend(dev); in platform_pm_suspend()
1143 const struct device_driver *drv = dev->driver; in platform_pm_resume() local
1146 if (!drv) in platform_pm_resume()
1149 if (drv->pm) { in platform_pm_resume()
1150 if (drv->pm->resume) in platform_pm_resume()
1151 ret = drv->pm->resume(dev); in platform_pm_resume()
1165 const struct device_driver *drv = dev->driver; in platform_pm_freeze() local
1168 if (!drv) in platform_pm_freeze()
1171 if (drv->pm) { in platform_pm_freeze()
1172 if (drv->pm->freeze) in platform_pm_freeze()
1173 ret = drv->pm->freeze(dev); in platform_pm_freeze()
1183 const struct device_driver *drv = dev->driver; in platform_pm_thaw() local
1186 if (!drv) in platform_pm_thaw()
1189 if (drv->pm) { in platform_pm_thaw()
1190 if (drv->pm->thaw) in platform_pm_thaw()
1191 ret = drv->pm->thaw(dev); in platform_pm_thaw()
1201 const struct device_driver *drv = dev->driver; in platform_pm_poweroff() local
1204 if (!drv) in platform_pm_poweroff()
1207 if (drv->pm) { in platform_pm_poweroff()
1208 if (drv->pm->poweroff) in platform_pm_poweroff()
1209 ret = drv->pm->poweroff(dev); in platform_pm_poweroff()
1219 const struct device_driver *drv = dev->driver; in platform_pm_restore() local
1222 if (!drv) in platform_pm_restore()
1225 if (drv->pm) { in platform_pm_restore()
1226 if (drv->pm->restore) in platform_pm_restore()
1227 ret = drv->pm->restore(dev); in platform_pm_restore()
1335 static int platform_match(struct device *dev, const struct device_driver *drv) in platform_match() argument
1338 struct platform_driver *pdrv = to_platform_driver(drv); in platform_match()
1342 return !strcmp(pdev->driver_override, drv->name); in platform_match()
1345 if (of_driver_match_device(dev, drv)) in platform_match()
1349 if (acpi_driver_match_device(dev, drv)) in platform_match()
1357 return (strcmp(pdev->name, drv->name) == 0); in platform_match()
1381 struct platform_driver *drv = to_platform_driver(_dev->driver); in platform_probe() local
1392 if (unlikely(drv->probe == platform_probe_fail)) in platform_probe()
1404 if (drv->probe) in platform_probe()
1405 ret = drv->probe(dev); in platform_probe()
1408 if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { in platform_probe()
1418 struct platform_driver *drv = to_platform_driver(_dev->driver); in platform_remove() local
1421 if (drv->remove) in platform_remove()
1422 drv->remove(dev); in platform_remove()
1428 struct platform_driver *drv; in platform_shutdown() local
1433 drv = to_platform_driver(_dev->driver); in platform_shutdown()
1434 if (drv->shutdown) in platform_shutdown()
1435 drv->shutdown(dev); in platform_shutdown()
1440 struct device_driver *drv = READ_ONCE(dev->driver); in platform_dma_configure() local
1452 if (ret || !drv || to_platform_driver(drv)->driver_managed_dma) in platform_dma_configure()
1464 struct platform_driver *drv = to_platform_driver(dev->driver); in platform_dma_cleanup() local
1466 if (!drv->driver_managed_dma) in platform_dma_cleanup()
1489 static inline int __platform_match(struct device *dev, const void *drv) in __platform_match() argument
1491 return platform_match(dev, (struct device_driver *)drv); in __platform_match()
1501 const struct device_driver *drv) in platform_find_device_by_driver() argument
1503 return bus_find_device(&platform_bus_type, start, drv, in platform_find_device_by_driver()