Lines Matching refs:dev

27 					   const struct device *dev)  in of_match_device()  argument
29 if (!matches || !dev->of_node || dev->of_node_reused) in of_match_device()
31 return of_match_node(matches, dev->of_node); in of_match_device()
36 of_dma_set_restricted_buffer(struct device *dev, struct device_node *np) in of_dma_set_restricted_buffer() argument
38 struct device_node *node, *of_node = dev->of_node; in of_dma_set_restricted_buffer()
74 if (i < count && of_reserved_mem_device_init_by_idx(dev, of_node, i)) in of_dma_set_restricted_buffer()
75 dev_warn(dev, "failed to initialise \"restricted-dma-pool\" memory node\n"); in of_dma_set_restricted_buffer()
93 int of_dma_configure_id(struct device *dev, struct device_node *np, in of_dma_configure_id() argument
104 if (np == dev->of_node) in of_dma_configure_id()
138 dev_warn(dev, "Invalid size 0x%llx for dma-range(s)\n", in of_dma_configure_id()
144 dev_err(dev, "Adjusted size 0x%llx invalid\n", size); in of_dma_configure_id()
156 if (!dev->dma_mask) { in of_dma_configure_id()
157 dev_warn(dev, "DMA mask not set\n"); in of_dma_configure_id()
158 dev->dma_mask = &dev->coherent_dma_mask; in of_dma_configure_id()
161 if (!size && dev->coherent_dma_mask) in of_dma_configure_id()
162 size = max(dev->coherent_dma_mask, dev->coherent_dma_mask + 1); in of_dma_configure_id()
172 dev->coherent_dma_mask &= mask; in of_dma_configure_id()
173 *dev->dma_mask &= mask; in of_dma_configure_id()
176 dev->bus_dma_limit = end; in of_dma_configure_id()
177 dev->dma_range_map = map; in of_dma_configure_id()
181 dev_dbg(dev, "device is%sdma coherent\n", in of_dma_configure_id()
184 iommu = of_iommu_configure(dev, np, id); in of_dma_configure_id()
188 dev->dma_range_map = NULL; in of_dma_configure_id()
193 dev_dbg(dev, "device is%sbehind an iommu\n", in of_dma_configure_id()
196 arch_setup_dma_ops(dev, dma_start, size, iommu, coherent); in of_dma_configure_id()
199 of_dma_set_restricted_buffer(dev, np); in of_dma_configure_id()
205 const void *of_device_get_match_data(const struct device *dev) in of_device_get_match_data() argument
209 match = of_match_device(dev->driver->of_match_table, dev); in of_device_get_match_data()
223 ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len) in of_device_modalias() argument
227 if (!dev || !dev->of_node || dev->of_node_reused) in of_device_modalias()
230 sl = of_modalias(dev->of_node, str, len - 2); in of_device_modalias()
247 void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env) in of_device_uevent() argument
254 if ((!dev) || (!dev->of_node)) in of_device_uevent()
257 add_uevent_var(env, "OF_NAME=%pOFn", dev->of_node); in of_device_uevent()
258 add_uevent_var(env, "OF_FULLNAME=%pOF", dev->of_node); in of_device_uevent()
259 type = of_node_get_device_type(dev->of_node); in of_device_uevent()
266 of_property_for_each_string(dev->of_node, "compatible", p, compat) { in of_device_uevent()
275 if (dev->of_node == app->np) { in of_device_uevent()
285 int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env) in of_device_uevent_modalias() argument
289 if ((!dev) || (!dev->of_node) || dev->of_node_reused) in of_device_uevent_modalias()
296 sl = of_modalias(dev->of_node, &env->buf[env->buflen-1], in of_device_uevent_modalias()