Lines Matching defs:device
3 * Procedures for creating, accessing and interpreting the device tree.
48 * device tree. The of_{attach,detach}_node() and
189 proc_symlink("device-tree", NULL, "/sys/firmware/devicetree/base");
292 * @device: pointer to node
298 * properties of the given @device. A constraints can be skipped by
320 static int __of_device_is_compatible(const struct device_node *device,
329 prop = __of_find_property(device, "compatible", NULL);
343 if (!__of_node_is_type(device, type))
350 if (!of_node_name_eq(device, name))
359 * the device's "compatible" property
361 int of_device_is_compatible(const struct device_node *device,
368 res = __of_device_is_compatible(device, compat, NULL, NULL);
374 /** Checks if the device is compatible with any of the entries in
378 int of_device_compatible_match(const struct device_node *device,
387 tmp = of_device_is_compatible(device, *compat);
398 * of_machine_is_compatible - Test root of device tree for a given compatible value
419 * __of_device_is_available - check if a device is available for use
421 * @device: Node to check for availability, with locks already held
426 static bool __of_device_is_available(const struct device_node *device)
431 if (!device)
434 status = __of_get_property(device, "status", &statlen);
447 * of_device_is_available - check if a device is available for use
449 * @device: Node to check for availability
454 bool of_device_is_available(const struct device_node *device)
460 res = __of_device_is_available(device);
468 * __of_device_is_fail - check if a device has status "fail" or "fail-..."
470 * @device: Node to check status for, with locks already held
475 static bool __of_device_is_fail(const struct device_node *device)
479 if (!device)
482 status = __of_get_property(device, "status", NULL);
490 * of_device_is_big_endian - check if a device has BE registers
492 * @device: Node to check for endianness
494 * Return: True if the device has a "big-endian" property, or if the kernel
495 * was compiled for BE *and* the device has a "native-endian" property.
501 bool of_device_is_big_endian(const struct device_node *device)
503 if (of_property_read_bool(device, "big-endian"))
506 of_property_read_bool(device, "native-endian"))
852 * the entire device tree. The node you pass will not be
885 * @compatible: The string to match to one of the tokens in the device
967 * @matches: array of of device match structures to search in
968 * @node: the of device structure to match against
970 * Low level utility function used by device matching.
992 * @matches: array of of device match structures to search in
1025 * of_alias_from_compatible - Lookup appropriate alias for a device node
1027 * @node: pointer to a device tree node
1032 * to choose an appropriate alias value for a particular device tree node.
1299 * @np: pointer to a device tree node containing a list
1484 * @np: pointer to a device tree node containing a list
1858 * @dn: Pointer to device node
1862 * Check if the given device node matches the stdout-path property in the
1938 * @np: root complex device node.
1939 * @id: device ID to map.
1942 * @target: optional pointer to a target device node.
1945 * Given a device ID, look up the appropriate implementation-defined
1946 * platform ID and/or the target device which receives transactions on that
1949 * a non-NULL device node pointer, only entries targeting that node will be
1950 * matched; if it points to a NULL value, it will receive the device node of