[U-Boot] [PATCH v4 1/3] drivers: Add board uclass
Simon Glass
sjg at chromium.org
Tue Oct 2 11:20:47 UTC 2018
On 31 July 2018 at 02:44, Mario Six <mario.six at gdsys.cc> wrote:
> Since there is no canonical "board device" that can be used in board
> files, it is difficult to use DM function for board initialization in
> these cases.
>
> Hence, add a uclass that implements a simple "board device", which can
> hold devices not suitable anywhere else in the device tree, and is also
> able to read encoded information, e.g. hard-wired GPIOs on a GPIO
> expander, read-only memory ICs, etc. that carry information about the
> hardware.
>
> The devices of this uclass expose methods to read generic data types
> (integers, strings, booleans) to encode the information provided by the
> hardware.
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
> ---
>
> v3 -> v4:
> * Fixed botched Kconfig entry
>
> v2 -> v3:
> * Expanded comment on detect()
> * Added error handling in example
> * Renamed get_board() to board_get()
> * Fixed style violations
> * Documented board_get
> * Made comments conform with kernel-doc
> * Fixed SPDC-License-Identifier position
>
> v1 -> v2:
> * Corrected description of dev parameter of devinfo_detect
> * Added size parameter to devinfo_get_str
> * Expanded uclass documentation
> * Added function to get devinfo instance
> * Renamed the uclass from devinfo to board
>
> ---
> drivers/Kconfig | 2 +
> drivers/Makefile | 1 +
> drivers/board/Kconfig | 7 +++
> drivers/board/Makefile | 6 ++
> drivers/board/board-uclass.c | 60 +++++++++++++++++++
> include/board.h | 139 +++++++++++++++++++++++++++++++++++++++++++
> include/dm/uclass-id.h | 1 +
> 7 files changed, 216 insertions(+)
> create mode 100644 drivers/board/Kconfig
> create mode 100644 drivers/board/Makefile
> create mode 100644 drivers/board/board-uclass.c
> create mode 100644 include/board.h
Applied to u-boot-dm, and now in mainline, thanks!
More information about the U-Boot
mailing list