]> git.baikalelectronics.ru Git - uboot.git/commit
sandbox: i2c: Support i2c emulation with of-platdata
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 04:25:30 +0000 (17:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:08 +0000 (17:03 +1300)
commit0e3a021a7e18aa3108bff934b9f7b5adff20ee0e
treee363c8a2c362a9d144fe80c75fafc0a731f0de96
parentde4921cacfcc1187d491c52dbbf006608ba63d95
sandbox: i2c: Support i2c emulation with of-platdata

At present the i2c emulators require access to the devicetree, which is
not possible (by design) with of-platdata.

Add a way for drivers to record the of-platdata index of their emulator,
so that we can still find the emulator.

This allows i2c emulation to work with of-platdata.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/i2c/i2c-emul-uclass.c
drivers/rtc/sandbox_rtc.c
include/i2c.h