summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-05 07:21:54 +0300
committerTom Rini <trini@konsulko.com>2021-03-03 22:51:06 +0300
commit4fe406729c87f41b745269c0f509da7d27f0a5c1 (patch)
treea8d8a5b5bcec65e399268b2094bf8680158cb4ad
parent5a9d8633e5e5f5253010480fb0db3742b0ea1356 (diff)
downloadu-boot-4fe406729c87f41b745269c0f509da7d27f0a5c1.tar.xz
gpio: Disable functions not used with of-platdata
These functions use devicetree and cannot work with of-platdata, which has no runtime devicetree. If they are used, the current linker error is confusing, since it talks about missing functions in the bowels of driver model. Avoid compiling these functions at all with of-platdata, so that a straightforward link error points to the problem. Series-changes; 3 - Fix 'wprl' typo Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
-rw-r--r--drivers/gpio/gpio-uclass.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 4a9b74e1ca..1db5ef001e 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -1024,6 +1024,7 @@ err:
return ret;
}
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
static int _gpio_request_by_name_nodev(ofnode node, const char *list_name,
int index, struct gpio_desc *desc,
int flags, bool add_index)
@@ -1110,6 +1111,7 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name)
return ret;
}
+#endif /* OF_PLATDATA */
int dm_gpio_free(struct udevice *dev, struct gpio_desc *desc)
{