Lines Matching +full:skip +full:- +full:power +full:- +full:up
1 // SPDX--License-Identifier: GPL-2.0
14 while (id->name[0]) { in platform_match_id()
15 if (strcmp(pdev->name, id->name) == 0) { in platform_match_id()
16 pdev->id_entry = id; in platform_match_id()
30 if (pdev->driver_override) in platform_match()
31 return !strcmp(pdev->driver_override, drv->name); in platform_match()
34 if (pdrv->id_table) in platform_match()
35 return platform_match_id(pdrv->id_table, pdev) != NULL; in platform_match()
37 /* fall-back to driver name match */ in platform_match()
38 return (strcmp(pdev->name, drv->name) == 0); in platform_match()
44 if (!dev->power.early_init) { in device_pm_init_common()
45 spin_lock_init(&dev->power.lock); in device_pm_init_common()
46 dev->power.qos = NULL; in device_pm_init_common()
47 dev->power.early_init = true; in device_pm_init_common()
53 dev->power.disable_depth = 1; in pm_runtime_early_init()
61 * sh_early_platform_driver_register - register early platform driver
74 * Drivers will by default be put on the list in compiled-in order. in sh_early_platform_driver_register()
76 if (!epdrv->list.next) { in sh_early_platform_driver_register()
77 INIT_LIST_HEAD(&epdrv->list); in sh_early_platform_driver_register()
78 list_add_tail(&epdrv->list, &sh_early_platform_driver_list); in sh_early_platform_driver_register()
85 n = strlen(epdrv->pdrv->driver.name); in sh_early_platform_driver_register()
86 if (buf && !strncmp(buf, epdrv->pdrv->driver.name, n)) { in sh_early_platform_driver_register()
87 list_move(&epdrv->list, &sh_early_platform_driver_list); in sh_early_platform_driver_register()
91 epdrv->requested_id = -1; in sh_early_platform_driver_register()
93 epdrv->requested_id = simple_strtoul(&buf[n + 1], in sh_early_platform_driver_register()
97 epdrv->requested_id = EARLY_PLATFORM_ID_ERROR; in sh_early_platform_driver_register()
106 if (epdrv->bufsize) { in sh_early_platform_driver_register()
107 memcpy(epdrv->buffer, &buf[n], in sh_early_platform_driver_register()
108 min_t(int, epdrv->bufsize, strlen(&buf[n]) + 1)); in sh_early_platform_driver_register()
109 epdrv->buffer[epdrv->bufsize - 1] = '\0'; in sh_early_platform_driver_register()
117 * sh_early_platform_add_devices - adds a number of early platform devices
131 dev = &devs[i]->dev; in sh_early_platform_add_devices()
133 if (!dev->devres_head.next) { in sh_early_platform_add_devices()
135 INIT_LIST_HEAD(&dev->devres_head); in sh_early_platform_add_devices()
136 list_add_tail(&dev->devres_head, in sh_early_platform_add_devices()
143 * sh_early_platform_driver_register_all - register early platform drivers
170 * sh_early_platform_match - find early platform device matching driver
180 if (platform_match(&pd->dev, &epdrv->pdrv->driver)) in sh_early_platform_match()
181 if (pd->id == id) in sh_early_platform_match()
188 * sh_early_platform_left - check if early platform driver has matching devices
198 if (platform_match(&pd->dev, &epdrv->pdrv->driver)) in sh_early_platform_left()
199 if (pd->id >= id) in sh_early_platform_left()
206 * sh_early_platform_driver_probe_id - probe drivers matching class_str and id
223 if (strcmp(class_str, epdrv->class_str)) in sh_early_platform_driver_probe_id()
226 if (id == -2) { in sh_early_platform_driver_probe_id()
227 match_id = epdrv->requested_id; in sh_early_platform_driver_probe_id()
234 /* skip requested id */ in sh_early_platform_driver_probe_id()
235 switch (epdrv->requested_id) { in sh_early_platform_driver_probe_id()
240 if (epdrv->requested_id == id) in sh_early_platform_driver_probe_id()
248 class_str, epdrv->pdrv->driver.name); in sh_early_platform_driver_probe_id()
259 * Set up a sensible init_name to enable in sh_early_platform_driver_probe_id()
263 if (!match->dev.init_name && slab_is_available()) { in sh_early_platform_driver_probe_id()
264 if (match->id != -1) in sh_early_platform_driver_probe_id()
265 match->dev.init_name = in sh_early_platform_driver_probe_id()
267 match->name, in sh_early_platform_driver_probe_id()
268 match->id); in sh_early_platform_driver_probe_id()
270 match->dev.init_name = in sh_early_platform_driver_probe_id()
272 match->name); in sh_early_platform_driver_probe_id()
274 if (!match->dev.init_name) in sh_early_platform_driver_probe_id()
275 return -ENOMEM; in sh_early_platform_driver_probe_id()
278 if (epdrv->pdrv->probe(match)) in sh_early_platform_driver_probe_id()
280 class_str, match->name); in sh_early_platform_driver_probe_id()
292 return -ENODEV; in sh_early_platform_driver_probe_id()
296 * sh_early_platform_driver_probe - probe a class of registered drivers
312 for (i = -2; n < nr_probe; i++) { in sh_early_platform_driver_probe()
313 k = sh_early_platform_driver_probe_id(class_str, i, nr_probe - n); in sh_early_platform_driver_probe()
328 * early_platform_cleanup - clean up early platform code
334 /* clean up the devres list used to chain devices */ in early_platform_cleanup()
337 list_del(&pd->dev.devres_head); in early_platform_cleanup()
338 memset(&pd->dev.devres_head, 0, sizeof(pd->dev.devres_head)); in early_platform_cleanup()