/openbmc/libbej/include/libbej/ |
H A D | bej_tree.h | 15 * @brief Holds info needed to encode a parent in the JSON tree. 21 // Index of the child pointed by nextChild. Used to store the array 24 // BEJ sequence number of the property. 33 // Points to the next node which is need to process. 38 * @brief Holds info needed to encode a leaf type in the JSON tree. 42 // BEJ sequence number of the property. 52 * @brief Common attributes of a JSON property. 64 * @brief Used to store parent type property info. 70 // Common property attributes. 75 // Points to the first child. [all …]
|
/openbmc/linux/drivers/base/ |
H A D | property.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * property.c - Unified device property interface. 17 #include <linux/property.h> 22 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in __dev_fwnode() 23 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode() 29 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in __dev_fwnode_const() 30 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode_const() 35 * device_property_present - check if a property of a device is present 36 * @dev: Device whose property is being checked 37 * @propname: Name of the property [all …]
|
/openbmc/u-boot/scripts/dtc/ |
H A D | livetree.c | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * You should have received a copy of the GNU General Public License 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 33 if (streq(new->label, label)) { in add_label() 34 new->deleted = 0; in add_label() 40 new->label = label; in add_label() 41 new->next = *labels; in add_label() 50 label->deleted = 1; in delete_labels() 53 struct property *build_property(char *name, struct data val) in build_property() 55 struct property *new = xmalloc(sizeof(*new)); in build_property() [all …]
|
H A D | checks.c | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * You should have received a copy of the GNU General Public License 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 26 fprintf(stderr, "=== %s: ", (c)->name); \ 43 typedef void (*check_fn)(struct check *c, struct dt_info *dti, struct node *node); 76 struct node *node, in check_msg() argument 77 struct property *prop, in check_msg() 83 if ((c->warn && (quiet < 1)) in check_msg() 84 || (c->error && (quiet < 2))) { in check_msg() 86 strcmp(dti->outname, "-") ? dti->outname : "<stdout>", in check_msg() [all …]
|
/openbmc/linux/scripts/dtc/ |
H A D | livetree.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 if (streq(new->label, label)) { in add_label() 20 new->deleted = 0; in add_label() 26 new->label = label; in add_label() 27 new->next = *labels; in add_label() 36 label->deleted = 1; in delete_labels() 39 struct property *build_property(char *name, struct data val, in build_property() 42 struct property *new = xmalloc(sizeof(*new)); in build_property() 46 new->name = name; in build_property() 47 new->val = val; in build_property() [all …]
|
H A D | checks.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 fprintf(stderr, "=== %s: ", (c)->name); \ 29 typedef void (*check_fn)(struct check *c, struct dt_info *dti, struct node *node); 62 struct node *node, in check_msg() argument 63 struct property *prop, in check_msg() 71 if (!(c->warn && (quiet < 1)) && !(c->error && (quiet < 2))) in check_msg() 74 if (prop && prop->srcpos) in check_msg() 75 pos = prop->srcpos; in check_msg() 76 else if (node && node->srcpos) in check_msg() 77 pos = node->srcpos; in check_msg() [all …]
|
/openbmc/linux/drivers/of/ |
H A D | base.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Copyright (C) 1996-2005 Paul Mackerras. 53 /* use when traversing tree through the child, sibling, 66 node_name = kbasename(np->full_name); in of_node_name_eq() 67 len = strchrnul(node_name, '@') - node_name; in of_node_name_eq() 78 return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0; in of_node_name_prefix() 93 for (; np; np = np->parent) in of_bus_n_addr_cells() 94 if (!of_property_read_u32(np, "#address-cells", &cells)) in of_bus_n_addr_cells() 97 /* No #address-cells property for the root node */ in of_bus_n_addr_cells() 103 if (np->parent) in of_n_addr_cells() [all …]
|
H A D | resolver.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com> 24 struct device_node *node; in live_tree_max_phandle() local 30 for_each_of_allnodes(node) { in live_tree_max_phandle() 31 if (node->phandle != OF_PHANDLE_ILLEGAL && in live_tree_max_phandle() 32 node->phandle > phandle) in live_tree_max_phandle() 33 phandle = node->phandle; in live_tree_max_phandle() 43 struct device_node *child; in adjust_overlay_phandles() local 44 struct property *prop; in adjust_overlay_phandles() 47 /* adjust node's phandle in node */ in adjust_overlay_phandles() [all …]
|
H A D | unittest.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #define pr_fmt(fmt) "### dt-test ### " fmt 10 #include <linux/dma-direct.h> /* to test phys_to_dma/dma_to_phys */ 29 #include <linux/i2c-mux.h> 54 #define OF_KREF_READ(NODE) kref_read(&(NODE)->kobj.kref) argument 56 #define OF_KREF_READ(NODE) 1 argument 60 * Expected message may have a message level other than KERN_INFO. 85 np = of_find_node_by_path("/testcase-data"); in of_unittest_find_node_by_name() 87 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name() 88 "find /testcase-data failed\n"); in of_unittest_find_node_by_name() [all …]
|
H A D | fdt.c | 1 // SPDX-License-Identifier: GPL-2.0 36 * of_fdt_limit_memory - limit the number of regions in the /memory node 40 * memory entries in the /memory node. This function may be called 60 "#address-cells", NULL); in of_fdt_limit_memory() 65 "#size-cells", NULL); in of_fdt_limit_memory() 83 static bool of_fdt_device_is_available(const void *blob, unsigned long node) in of_fdt_device_is_available() argument 85 const char *status = fdt_getprop(blob, node, "status", NULL); in of_fdt_device_is_available() 115 struct property *pp, **pprev = NULL; in populate_properties() 119 pprev = &np->properties; in populate_properties() 129 pr_warn("Cannot locate property at 0x%x\n", cur); in populate_properties() [all …]
|
H A D | property.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * drivers/of/property.c - Procedures for accessing and interpreting 7 * file contains the OF property as well as the OF graph interface 11 * Copyright (C) 1996-2005 Paul Mackerras. 35 * of_graph_is_present() - check graph's presence 36 * @node: pointer to device_node containing graph port 38 * Return: True if @node has a port or ports (with a port) sub-node, 41 bool of_graph_is_present(const struct device_node *node) in of_graph_is_present() argument 45 ports = of_get_child_by_name(node, "ports"); in of_graph_is_present() 47 node = ports; in of_graph_is_present() [all …]
|
H A D | dynamic.c | 1 // SPDX-License-Identifier: GPL-2.0 27 * of_node_get() - Increment refcount of a node 28 * @node: Node to inc refcount, NULL is supported to simplify writing of 31 * Return: The node with refcount incremented. 33 struct device_node *of_node_get(struct device_node *node) in of_node_get() argument 35 if (node) in of_node_get() 36 kobject_get(&node->kobj); in of_node_get() 37 return node; in of_node_get() 42 * of_node_put() - Decrement refcount of a node 43 * @node: Node to dec refcount, NULL is supported to simplify writing of [all …]
|
/openbmc/linux/include/linux/ |
H A D | of.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 8 * Copyright (C) 1996-2005 Paul Mackerras. 20 #include <linux/property.h> 28 struct property { struct 32 struct property *next; argument 54 struct property *properties; argument 55 struct property *deadprops; /* removed properties */ 57 struct device_node *child; member 91 struct device_node *node; member 96 struct property *prop; [all …]
|
H A D | property.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * property.h - Unified device property interface. 85 if (fwnode_property_present(fwnode, "big-endian")) in fwnode_device_is_big_endian() 88 fwnode_property_present(fwnode, "native-endian")) in fwnode_device_is_big_endian() 100 * device_is_big_endian - check if a device has BE registers 103 * Returns: true if the device has a "big-endian" property, or if the kernel 104 * was compiled for BE *and* the device has a "native-endian" property. 116 * device_is_compatible - match 'compatible' property of the device with a given string 118 * @compat: The string to match 'compatible' property with 150 bool fwnode_is_ancestor_of(const struct fwnode_handle *ancestor, const struct fwnode_handle *child); [all …]
|
H A D | of_graph.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 * Copyright (C) 2012 - 2013 Samsung Electronics Co., Ltd. 18 * struct of_endpoint - the OF graph endpoint data structure 19 * @port: identifier (value of reg property) of a port this endpoint belongs to 20 * @id: identifier (value of reg property) of this endpoint 30 * for_each_endpoint_of_node - iterate over every endpoint in a device node 31 * @parent: parent device node containing ports and endpoints 32 * @child: loop variable pointing to the current endpoint node 34 * When breaking out of the loop, of_node_put(child) has to be called manually. 36 #define for_each_endpoint_of_node(parent, child) \ argument [all …]
|
/openbmc/libbej/src/ |
H A D | bej_encoder_metadata.c | 12 * @brief Maximum digits supported in the fractional part of a real number. 20 * an integer using a nnint, we only need two bytes. [byte1: nnint length, 21 * byte2: integer length [0-8]] 26 * @brief bejTupleL size of a bool. 40 * @param[in] name - property name. 53 * @brief Get the dictionary for the provided node. 55 * @param[in] dictionaries - available dictionaries for encoding. 56 * @param[in] parentDictionary - dictionary used for the parent of this node. 57 * @param[in] nodeName - name of the interested node. Can be NULL if the node 58 * doesn't have a name. [all …]
|
/openbmc/linux/drivers/acpi/ |
H A D | property.c | 1 // SPDX-License-Identifier: GPL-2.0-only 28 * not defined without a warning. For instance if any of the properties 29 * from different GUID appear in a property list of another, it will be 33 /* ACPI _DSD device properties GUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */ 36 /* Hotplug in D3 GUID: 6211e2c0-58a3-4af3-90e1-927a4e0c55a4 */ 39 /* External facing port GUID: efcc06cc-73ac-4bc3-bff0-76143807c389 */ 42 /* Thunderbolt GUID for IMR_VALID: c44d002f-69f9-4e7d-a904-a7baabdf43f7 */ 45 /* Thunderbolt GUID for WAKE_SUPPORTED: 6c501103-c189-4296-ba72-9bf5a26ebe5d */ 48 /* Storage device needs D3 GUID: 5025030f-842f-4ab4-a561-99a5189762d0 */ 53 /* ACPI _DSD data subnodes GUID: dbb8e3e6-5886-4ba6-8795-1319f52a966b */ [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/ |
H A D | example-schema.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 # All the top-level keys are standard json-schema keywords except for 8 # $id is a unique identifier based on the filename. There may or may not be a 10 $id: http://devicetree.org/schemas/example-schema.yaml# 11 # $schema is the meta-schema this schema should be validated with. 12 $schema: http://devicetree.org/meta-schemas/core.yaml# 17 - Rob Herring <robh@kernel.org> 20 A more detailed multi-line description of the binding. 26 begin with a tab character. [all …]
|
/openbmc/u-boot/include/dm/ |
H A D | of.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 10 #include <asm/u-boot.h> 13 /* integer value within a device tree property which references another node */ 17 * struct property: Device tree property 19 * @name: Property name 20 * @length: Length of property in bytes 21 * @value: Pointer to property value 22 * @next: Pointer to next property, or NULL if none 24 struct property { struct 28 struct property *next; argument [all …]
|
/openbmc/u-boot/drivers/core/ |
H A D | of_access.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 1996-2005 Paul Mackerras. 15 * Modified for U-Boot 34 /* "/aliaes" node */ 37 /* "/chosen" node */ 40 /* node pointed to by the stdout-path alias */ 47 * struct alias_prop - Alias property in 'aliases' node 49 * The structure represents one alias property of 'aliases' node as 52 * @link: List node to link the structure in aliases_lookup list 53 * @alias: Alias property name [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/crypto/ |
H A D | fsl-sec6.txt | 4 -SEC 6 Node 5 -Job Ring Node 6 -Full Example 9 SEC 6 Node 13 Node defines the base address of the SEC 6 block. 16 For example, In C293, we could see three SEC 6 node. 20 - compatible 23 Definition: Must include "fsl,sec-v6.0". 25 - fsl,sec-era 28 Definition: A standard property. Define the 'ERA' of the SEC [all …]
|
/openbmc/linux/drivers/net/mdio/ |
H A D | of_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 30 * ethernet-phy-idAAAA.BBBB */ 37 struct device_node *child, u32 addr) in of_mdiobus_phy_device_register() argument 40 of_fwnode_handle(child), in of_mdiobus_phy_device_register() 46 struct device_node *child, u32 addr) in of_mdiobus_register_phy() argument 48 return fwnode_mdiobus_register_phy(mdio, of_fwnode_handle(child), addr); in of_mdiobus_register_phy() 52 struct device_node *child, u32 addr) in of_mdiobus_register_device() argument 54 struct fwnode_handle *fwnode = of_fwnode_handle(child); in of_mdiobus_register_device() 62 /* Associate the OF node with the device structure so it in of_mdiobus_register_device() 66 device_set_node(&mdiodev->dev, fwnode); in of_mdiobus_register_device() [all …]
|
/openbmc/u-boot/lib/ |
H A D | of_live.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Modifications for U-Boot 31 * unflatten_dt_node() - Alloc and populate a device_node from the flat tree 34 * @poffset: pointer to node in flat tree 37 * @fpsize: Size of the node path up at t05he current depth. 48 struct property *pp, **prev_pp = NULL; in unflatten_dt_node() 65 * version 0x10 has a more compact unit name here instead of the full in unflatten_dt_node() 74 * root node: special case. fpsize accounts for path in unflatten_dt_node() 75 * plus terminating zero. root node only has '/', so in unflatten_dt_node() 99 np->full_name = fn; in unflatten_dt_node() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/reserved-memory/ |
H A D | reserved-memory.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/reserved-memory/reserved-memory.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: /reserved-memory Child Node Common 10 - devicetree-spec@vger.kernel.org 13 Reserved memory is specified as a node under the /reserved-memory node. The 15 create child nodes describing particular reserved (excluded from normal use) 19 Each child of the reserved-memory node specifies one or more regions 20 of reserved memory. Each child node may either use a 'reg' property to [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/powerpc/fsl/ |
H A D | pamu.txt | 5 The PAMU is an I/O MMU that provides device-to-memory access control and 10 - compatible : <string> 11 First entry is a version-specific string, such as 12 "fsl,pamu-v1.0". The second is "fsl,pamu". 13 - ranges : <prop-encoded-array> 14 A standard property. Utilized to describe the memory mapped 20 - interrupts : <prop-encoded-array> 25 - #address-cells: <u32> 26 A standard property. 27 - #size-cells : <u32> [all …]
|