From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 17 Mar 2021 01:28:30 +0000 Subject: [PATCH v4 20/42] sandbox: i2c: Support i2c emulation with of-platdata In-Reply-To: <20210315042553.1932494-10-sjg@chromium.org> References: <20210315042553.1932494-10-sjg@chromium.org> <20210315042553.1932494-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- (no changes since v1) drivers/i2c/i2c-emul-uclass.c | 17 +++++++++++++++-- drivers/rtc/sandbox_rtc.c | 13 +++++++++++++ include/i2c.h | 15 +++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) Applied to u-boot-dm/next, thanks!