
Simon,
On 30/10/2019 02:48, Simon Glass wrote:
On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot jjhiblot@ti.com wrote:
This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
drivers/mux/Kconfig | 15 +++++ drivers/mux/Makefile | 1 + drivers/mux/mmio.c | 155 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+) create mode 100644 drivers/mux/mmio.c
Reviewed-by: Simon Glass sjg@chromium.org
So much memory allocation! But I suppose it is unavoidable. No way to use DM's auto-alloc?
I didn't try very hard to reduce the number of allocations to keep the code simple.
Part of the trouble comes from the fact that the number of mux_controls is read from the DT making it not possible to use the auto-alloc.
With other type of multiplexers (like a I2C or analog-lines multiplexer) the number of controls will be fixed and using auto-alloc will be possible.
JJ
Regards, Simon