[PATCH v4 0/7] drivers: Add a framework for MUX drivers
Pratyush Yadav
p.yadav at ti.com
Fri Oct 16 12:46:29 CEST 2020
Hi,
This series is a re-roll of Jean-Jacques' earlier effort. It adds a new
minimalistic subsystem that handles multiplexer controllers. It provides
the same API as Linux and mux drivers should be portable with a minimum
effort. This series also includes a port of the Linux's mmio-mux driver
and an emulated mux driver for sandbox testing.
Travis CI run: https://travis-ci.org/github/prati0100/uboot/builds/736133605
Changes in v4:
- Drop the call to sandbox_set_enable_memio(). Use an emulated mux
driver to test the default state instead.
Other changes are mentioned in individual patches.
Changes in v3:
- Add a new command called 'mux' that allows listing, selecting, and
deselecting muxes on the fly.
- Move call to dm_mux_init() to initr_dm_devices().
- Enable mmio operations in sandbox on board_init() to dm_mux_init() can
initialize muxes to their idle state and allow the tests to pass.
- Add help for CONFIG_MULTIPLEXER.
- Change dev_err() in mmio_mux_probe() to log_msg_ret() or log_err().
- Add comments on static functions in mux-class.c
- Make mux_uclass_post_probe() static.
- Make dm_mux_init() return an integer to signal failure.
- Change ifdef of mux-internal.h to _HUX_INTERNAL_H.
- Remove unused include from mux-internal.h
- Remove comments for non-existent members in struct mux_chip.
- Add missing comments for some members in struct mux_control.
- Add missing comments for some functions in mux.h
- Split up the mux_mmio test into two parts. More would lead to a lot of
boilerplate.
- Change ut_assertok(IS_ERR(ptr)) to ut_assertok_ptr(ptr).
- Fix mis-spellings and capitalize comments.
- Rebase on latest master.
Changes in v2:
- Fixed warning in mux_of_xlate_default()
- Improved documentation
- Fixed SPL build
- insert the mux initialization in init_sequence_r[], just before the
console is initialized as its serial port may be muxed
- moved the definition of dm_mux_init() in this commit
- Call sandbox_set_enable_memio(true) before running the test
Jean-Jacques Hiblot (4):
drivers: Add a new framework for multiplexer devices
dm: board: complete the initialization of the muxes in initr_dm()
drivers: mux: mmio-based syscon mux controller
test: Add tests for the multiplexer framework
Pratyush Yadav (3):
Kconfig: Increase the pre-relocation memory
cmd: Add a mux command
test: mux-cmd: Add tests for the 'mux' command
Kconfig | 2 +-
arch/sandbox/dts/test.dts | 33 ++++
cmd/Kconfig | 6 +
cmd/Makefile | 1 +
cmd/mux.c | 183 +++++++++++++++++++
common/board_r.c | 12 ++
configs/sandbox_defconfig | 3 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/mux/Kconfig | 25 +++
drivers/mux/Makefile | 7 +
drivers/mux/mmio.c | 141 ++++++++++++++
drivers/mux/mux-uclass.c | 334 ++++++++++++++++++++++++++++++++++
include/dm/uclass-id.h | 1 +
include/dt-bindings/mux/mux.h | 17 ++
include/mux-internal.h | 109 +++++++++++
include/mux.h | 159 ++++++++++++++++
test/dm/Makefile | 3 +
test/dm/mux-cmd.c | 177 ++++++++++++++++++
test/dm/mux-emul.c | 105 +++++++++++
test/dm/mux-mmio.c | 138 ++++++++++++++
21 files changed, 1458 insertions(+), 1 deletion(-)
create mode 100644 cmd/mux.c
create mode 100644 drivers/mux/Kconfig
create mode 100644 drivers/mux/Makefile
create mode 100644 drivers/mux/mmio.c
create mode 100644 drivers/mux/mux-uclass.c
create mode 100644 include/dt-bindings/mux/mux.h
create mode 100644 include/mux-internal.h
create mode 100644 include/mux.h
create mode 100644 test/dm/mux-cmd.c
create mode 100644 test/dm/mux-emul.c
create mode 100644 test/dm/mux-mmio.c
--
2.28.0
More information about the U-Boot
mailing list