u-boot/include/dm
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
..
platform_data spi: davinci: Add platdata support 2018-10-10 11:35:06 +05:30
device-internal.h dm: Correct pre_reloc_only parameter description in several APIs' comments 2018-11-14 09:16:27 -08:00
device.h dm: core: Add a few more specific child-finding functions 2018-11-29 09:30:05 -07:00
fdtaddr.h dm: core: add functions to get memory-mapped I/O addresses 2018-06-01 15:56:02 +02:00
lists.h dm: Correct pre_reloc_only parameter description in several APIs' comments 2018-11-14 09:16:27 -08:00
of.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
of_access.h ofnode: add ofnode_by_prop_value() 2018-09-18 08:12:21 -06:00
of_addr.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
of_extra.h dm: core: Update ofnode to read binman-style flash entry 2018-10-09 04:40:27 -06:00
ofnode.h dm: core: add missing prototype for ofnode_read_u64 2018-11-26 13:57:33 +08:00
pinctrl.h cmd: pinmux: Add pinmux command 2018-11-16 16:51:56 -05:00
platdata.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
read.h dm: core: add functions to get memory-mapped I/O addresses 2018-06-01 15:56:02 +02:00
root.h dm: Correct pre_reloc_only parameter description in several APIs' comments 2018-11-14 09:16:27 -08:00
test.h test: dm: core: Add test case for uclass driver's child_post_probe() 2018-11-14 09:16:27 -08:00
uclass-id.h dm: sandbox: i2c: Add a new 'emulation parent' uclass 2018-11-29 09:30:05 -07:00
uclass-internal.h dm: core: Export uclass_find_device_by_phandle() 2018-11-29 09:30:05 -07:00
uclass.h dm: uclass: Add uclass_foreach_dev_probe 2018-11-16 16:51:55 -05:00
util.h dm: util: Add a livetree equivalent API of dm_fdt_pre_reloc() 2018-11-14 09:16:27 -08:00