u-boot-brain/drivers/i2c
Simon Glass b7c25b11b6 dm: sandbox: i2c: Add a new 'emulation parent' uclass
Sandbox i2c works using emulation drivers which are currently children of
the i2c device:

	rtc_0: rtc@43 {
		reg = <0x43>;
		compatible = "sandbox-rtc";
		emul {
			compatible = "sandbox,i2c-rtc";
		};
	};

In this case the emulation device is attached to i2c bus on address 0x43
and provides the Real-Time-Clock (RTC) functionality.

However this is not ideal, since every device on an I2C bus has a child
device. This is only really the case for sandbox, but we want to avoid
special-case code for sandbox.

A better approach seems to be to add a separate node on the bus, an
'emulation parent'. This can be given a bogus address (such as 0xff) and
hides all the emulators away. Then we can use a phandle to point from the
device to the correct emualtor, and only on sandbox. The code to find an
emulator does not interfere with normal i2c operation.

Add a new UCLASS_I2C_EMUL_PARENT uclass which allows finding an emulator
given a bus, and finding a bus given an emulator. This will be used in a
follow-on patch.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29 09:30:05 -07:00
..
muxes kconfig: fix typo 'parition' 2018-08-17 09:22:35 -04:00
ast_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ast_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91_i2c.h i2c: atmel: add i2c driver 2016-08-15 22:12:00 +02:00
cros_ec_ldo.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cros_ec_tunnel.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
davinci_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
davinci_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
designware_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
designware_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
exynos_hs_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c_core.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c-cdns.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c-emul-uclass.c dm: sandbox: i2c: Add a new 'emulation parent' uclass 2018-11-29 09:30:05 -07:00
i2c-gpio.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
i2c-uclass-compat.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c-uclass.c DM: I2C: Reduce overhead when used with OF_PLATDATA 2018-09-11 21:38:42 -04:00
i2c-uniphier-f.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c-uniphier.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c-versatile.c i2c: Add support for the Arm's Versatile Express I2C controller. 2018-10-03 06:08:06 +02:00
ihs_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
imx_lpi2c.c i2c: imx_lpi2c: fix typo and register base address format 2018-10-22 14:35:57 +02:00
intel_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig i2c: fix: Add support for the Arm's Versatile Express I2C controller 2018-10-12 07:25:39 +02:00
kona_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpc32xx_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile i2c: fix: Add support for the Arm's Versatile Express I2C controller 2018-10-12 07:25:39 +02:00
meson_i2c.c meson: use the clock driver 2018-06-19 07:31:47 -04:00
mv_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mv_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mvtwsi.c i2c: mvtwsi: disable i2c slave on Armada 38x 2018-06-07 14:19:55 +02:00
mxc_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omap24xx_i2c.c i2c: omap24xx: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check 2018-11-14 09:16:28 -08:00
omap24xx_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rcar_i2c.c i2c: rcar_i2c: Add DM and DT capable I2C driver 2018-05-20 12:06:54 +02:00
rcar_iic.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rk_i2c.c rockchip: i2c: enable i2c controller for rk3066 and rk3188 2018-07-21 01:55:25 +02:00
s3c24x0_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
s3c24x0_i2c.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sh_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
soft_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32f7_i2c.c i2c: stm32f7: change setup struct to const 2018-11-16 16:51:58 -05:00
tegra_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra186_bpmp_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynq_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00