diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 21:32:07 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | f18589576cb87e76c20046b335124a8af6feb6ac (patch) | |
tree | f8f1b8a00c47c2923da94b3cf8fbe994b18056d4 /include/dm | |
parent | f02d0eb3fab332b94ebb98b73c3445f920a0c852 (diff) | |
download | u-boot-f18589576cb87e76c20046b335124a8af6feb6ac.tar.gz u-boot-f18589576cb87e76c20046b335124a8af6feb6ac.tar.bz2 u-boot-f18589576cb87e76c20046b335124a8af6feb6ac.zip |
dm: core: Add a way of overriding the ACPI device path
Some devices such as GPIO need to override the normal path that would be
generated by driver model. Add a device-tree property for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/acpi.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dm/acpi.h b/include/dm/acpi.h index aa1071ae35..a58722de73 100644 --- a/include/dm/acpi.h +++ b/include/dm/acpi.h @@ -187,6 +187,19 @@ int acpi_inject_dsdt(struct acpi_ctx *ctx); */ void acpi_dump_items(enum acpi_dump_option option); +/** + * acpi_get_path() - Get the full ACPI path for a device + * + * This checks for any override in the device tree and calls acpi_device_path() + * if not + * + * @dev: Device to check + * @out_path: Buffer to place the path in (should be ACPI_PATH_MAX long) + * @maxlen: Size of buffer (typically ACPI_PATH_MAX) + * @return 0 if OK, -ve on error + */ +int acpi_get_path(const struct udevice *dev, char *out_path, int maxlen); + #endif /* __ACPI__ */ #endif |