Files
u-boot/include
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
..
2018-11-20 13:08:15 +01:00
2018-11-26 08:25:33 -05:00
2018-11-14 09:16:27 -08:00
2018-09-29 11:49:35 -06:00
2018-10-19 19:19:53 -04:00
2018-11-26 13:57:31 +08:00
2018-09-10 20:48:16 -04:00
2018-09-18 08:12:21 -06:00
2018-11-10 08:16:30 -05:00
2018-07-26 14:08:22 -05:00
2018-09-23 21:55:30 +02:00
2018-09-23 21:55:30 +02:00
2018-06-13 07:49:12 -04:00
2018-10-22 13:01:27 +02:00
2018-04-06 17:04:33 -04:00
2018-10-07 10:47:38 -04:00
2018-09-18 00:01:18 -06:00
2018-10-02 22:12:32 +05:30
2018-10-10 12:29:02 -05:00
2018-10-09 04:40:27 -06:00
2018-10-24 14:45:38 -05:00
2018-11-14 09:16:27 -08:00
2018-10-07 11:04:01 -04:00
2018-07-19 16:31:37 -04:00
2018-07-20 15:55:05 -04:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-09-28 18:26:32 +02:00