diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2011-12-07 22:36:55 +0000 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-12-08 09:08:24 -0800 |
commit | d1782ef04ceff3534ffa71675e1d636cbf682bc5 (patch) | |
tree | 3f59e3af7e0b919b45b15418a334c6bcf932f9b9 /include | |
parent | ef299dd83dfba5371a974edd26c862da214255cf (diff) |
fdt: Add function to read boolean property
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:5752
TEST=on Lumpy, test Ctrl+D behavior with and without usb-keyboard set
in the device tree.
Change-Id: I7bb2f6ea18f5edadea93f9e5d23ed49ed57a3b23
Reviewed-on: https://gerrit.chromium.org/gerrit/12589
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/fdt_decode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/fdt_decode.h b/include/fdt_decode.h index da6a3c28553..7b9e94919cf 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -516,6 +516,16 @@ int fdt_decode_get_config_int(const void *blob, const char *prop_name, int default_val); /** + * Look in the FDT for a config item with the given name + * and return whether it exists. + * + * @param blob FDT blob + * @param prop_name property name to look up + * @return 1, if it exists, or 0 if not + */ +int fdt_decode_get_config_bool(const void *blob, const char *prop_name); + +/** * Returns information from the FDT about an i2c controller. This function * reads out the following attributes: * |