summaryrefslogtreecommitdiffstats
path: root/drivers/core
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-08-27 12:44:29 +0900
committerSimon Glass <sjg@chromium.org>2015-08-31 07:57:29 -0600
commitd90a5a30dec16442fc64154e40018bdbb37776a9 (patch)
treea32fdaad95d2d343029bfbf5257390cdc693cfa8 /drivers/core
parente6cabe4a6d142ab981bd31bff0795ed230caf151 (diff)
downloadtalos-obmc-uboot-d90a5a30dec16442fc64154e40018bdbb37776a9.tar.gz
talos-obmc-uboot-d90a5a30dec16442fc64154e40018bdbb37776a9.zip
pinctrl: add pin control uclass support
This creates a new framework for handling of pin control devices, i.e. devices that control different aspects of package pins. This uclass handles pinmuxing and pin configuration; pinmuxing controls switching among silicon blocks that share certain physical pins, pin configuration handles electronic properties such as pin- biasing, load capacitance etc. This framework can support the same device tree bindings, but if you do not need full interface support, you can disable some features to reduce memory foot print. Typically around 1.5KB is necessary to include full-featured uclass support on ARM board (CONFIG_PINCTRL + CONFIG_PINCTRL_FULL + CONFIG_PINCTRL_GENERIC + CONFIG_PINCTRL_PINMUX), for example. We are often limited on code size for SPL. Besides, we still have many boards that do not support device tree configuration. The full pinctrl, which requires OF_CONTROL, does not make sense for those boards. So, this framework also has a Do-It-Yourself (let's say simple pinctrl) interface. With CONFIG_PINCTRL_FULL disabled, the uclass itself provides no systematic mechanism for identifying the peripheral device, applying pinctrl settings, etc. They must be done in each low-level driver. In return, you can save much memory footprint and it might be useful especially for SPL. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index afa4b4fda9..a6cd93698f 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -15,6 +15,7 @@
#include <dm/device.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
+#include <dm/pinctrl.h>
#include <dm/platdata.h>
#include <dm/uclass.h>
#include <dm/uclass-internal.h>
@@ -286,6 +287,9 @@ int device_probe_child(struct udevice *dev, void *parent_priv)
dev->flags |= DM_FLAG_ACTIVATED;
+ /* continue regardless of the result of pinctrl */
+ pinctrl_select_state(dev, "default");
+
ret = uclass_pre_probe_device(dev);
if (ret)
goto fail;
OpenPOWER on IntegriCloud