pinctrl: add pin control uclass support
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 27 Aug 2015 03:44:29 +0000 (12:44 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 10:19:18 +0000 (12:19 +0200)
commitf029fa8f4eaf0c29d4e96ffe46cb91a4892b9fe0
treefb2e49ac05cb4ccb30cdad24e97176455edbb779
parente439af81804d15fd95f804205184a9ff3e15b72a
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>
drivers/Kconfig
drivers/Makefile
drivers/core/device.c
drivers/pinctrl/Kconfig [new file with mode: 0644]
drivers/pinctrl/Makefile [new file with mode: 0644]
drivers/pinctrl/pinctrl-generic.c [new file with mode: 0644]
drivers/pinctrl/pinctrl-uclass.c [new file with mode: 0644]
include/dm/pinctrl.h [new file with mode: 0644]
include/dm/uclass-id.h