From 79289c0b5ff4a8c7869d7ca629cddc660dd06095 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 25 Oct 2012 16:31:04 +0000 Subject: fdt: Add function to read boolean property Signed-off-by: Vincent Palatin Commit-Ready: Vincent Palatin Commit-Ready: Gabe Black Signed-off-by: Simon Glass --- include/fdtdec.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/fdtdec.h') diff --git a/include/fdtdec.h b/include/fdtdec.h index f8a4e94186..a37cf54a93 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -398,6 +398,16 @@ int fdtdec_setup_gpio(struct fdt_gpio_state *gpio); int fdtdec_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 fdtdec_get_config_bool(const void *blob, const char *prop_name); + /** * Look in the FDT for a config item with the given name and return its value * as a string. -- cgit v1.2.1