]> git.baikalelectronics.ru Git - uboot.git/commit
i2c: mux: Allow muxes to work as children of i2c bus without i2c-parent
authorMoritz Fischer <moritz.fischer@ettus.com>
Mon, 16 Jan 2017 17:46:06 +0000 (09:46 -0800)
committerHeiko Schocher <hs@denx.de>
Wed, 18 Jan 2017 05:37:57 +0000 (06:37 +0100)
commita3c9fb37e1ea629fef94cf2420b7f4d61889b91a
tree262f8e98fa70723d5d8c861dc97cfbb22f42800d
parent34236059c793369540601bf284d205953145e7fa
i2c: mux: Allow muxes to work as children of i2c bus without i2c-parent

For mux check if the parent is already a device of UCLASS_I2C and if yes
just use that. Otherwise see if someone specified an i2c-parent phandle.
This mimics the behavior found in the Kernel, as it removes the
requirement to explicitly specify a i2c-parent phandle.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
drivers/i2c/muxes/i2c-mux-uclass.c