Merge tag 'u-boot-imx-20200511' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[oweals/u-boot.git] / drivers / pinctrl / pinctrl-uclass.c
index 0b1eb7fab4a454d6227364455c2c9c8e3637b7ae..aba881047479849b95f5866b04f723a69791f0c7 100644 (file)
@@ -4,6 +4,8 @@
  */
 
 #include <common.h>
+#include <malloc.h>
+#include <dm/device_compat.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
 #include <linux/list.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int pinctrl_decode_pin_config(const void *blob, int node)
-{
-       int flags = 0;
-
-       if (fdtdec_get_bool(blob, node, "bias-pull-up"))
-               flags |= 1 << PIN_CONFIG_BIAS_PULL_UP;
-       else if (fdtdec_get_bool(blob, node, "bias-pull-down"))
-               flags |= 1 << PIN_CONFIG_BIAS_PULL_DOWN;
-
-       return flags;
-}
-
 #if CONFIG_IS_ENABLED(PINCTRL_FULL)
 /**
  * pinctrl_config_one() - apply pinctrl settings for a single node
@@ -157,7 +147,7 @@ static int pinconfig_post_bind(struct udevice *dev)
 
 UCLASS_DRIVER(pinconfig) = {
        .id = UCLASS_PINCONFIG,
-#if CONFIG_IS_ENABLED(PINCONFIG_RECURSIVE)
+#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
        .post_bind = pinconfig_post_bind,
 #endif
        .name = "pinconfig",
@@ -426,9 +416,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
 
 UCLASS_DRIVER(pinctrl) = {
        .id = UCLASS_PINCTRL,
-#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
        .post_bind = pinctrl_post_bind,
-#endif
        .flags = DM_UC_FLAG_SEQ_ALIAS,
        .name = "pinctrl",
 };