Lines Matching refs:prv
123 struct dt_driver_provider *prv = NULL; in dt_driver_register_provider() local
141 prv = calloc(1, sizeof(*prv)); in dt_driver_register_provider()
142 if (!prv) in dt_driver_register_provider()
145 prv->nodeoffset = nodeoffset; in dt_driver_register_provider()
146 prv->type = type; in dt_driver_register_provider()
147 prv->provider_cells = provider_cells; in dt_driver_register_provider()
148 prv->phandle = phandle; in dt_driver_register_provider()
149 prv->get_of_device = get_of_device; in dt_driver_register_provider()
150 prv->priv_data = priv; in dt_driver_register_provider()
152 SLIST_INSERT_HEAD(&dt_driver_provider_list, prv, link); in dt_driver_register_provider()
189 unsigned int dt_driver_provider_cells(struct dt_driver_provider *prv) in dt_driver_provider_cells() argument
191 return prv->provider_cells; in dt_driver_provider_cells()
197 struct dt_driver_provider *prv = NULL; in dt_driver_get_provider_by_node() local
199 SLIST_FOREACH(prv, &dt_driver_provider_list, link) in dt_driver_get_provider_by_node()
200 if (prv->nodeoffset == nodeoffset && prv->type == type) in dt_driver_get_provider_by_node()
201 return prv; in dt_driver_get_provider_by_node()
209 struct dt_driver_provider *prv = NULL; in dt_driver_get_provider_by_phandle() local
211 SLIST_FOREACH(prv, &dt_driver_provider_list, link) in dt_driver_get_provider_by_phandle()
212 if (prv->phandle == phandle && prv->type == type) in dt_driver_get_provider_by_phandle()
213 return prv; in dt_driver_get_provider_by_phandle()
218 static void *device_from_provider_prop(struct dt_driver_provider *prv, in device_from_provider_prop() argument
226 pargs = calloc(1, prv->provider_cells * sizeof(uint32_t *) + in device_from_provider_prop()
233 pargs->args_count = prv->provider_cells; in device_from_provider_prop()
234 for (n = 0; n < prv->provider_cells; n++) in device_from_provider_prop()
237 device = prv->get_of_device(pargs, prv->priv_data, res); in device_from_provider_prop()
256 struct dt_driver_provider *prv = NULL; in dt_driver_device_from_node_idx_prop() local
270 prv = dt_driver_get_provider_by_phandle(phandle, type); in dt_driver_device_from_node_idx_prop()
271 if (!prv) { in dt_driver_device_from_node_idx_prop()
277 prv_cells = dt_driver_provider_cells(prv); in dt_driver_device_from_node_idx_prop()
284 return device_from_provider_prop(prv, prop + idx32, res); in dt_driver_device_from_node_idx_prop()