aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-03 11:31:36 -0600
committerSimon Glass <sjg@chromium.org>2020-10-29 14:42:18 -0600
commitfbe27a54ebbe7433bbccf242f4edda61e2c1ba3e (patch)
tree1a47ecbb74a274b162553efefc07d23eb36bc51d /drivers
parente41651fffda7da55f6d74afdf4b784088184c543 (diff)
downloadu-boot-fbe27a54ebbe7433bbccf242f4edda61e2c1ba3e.zip
u-boot-fbe27a54ebbe7433bbccf242f4edda61e2c1ba3e.tar.gz
u-boot-fbe27a54ebbe7433bbccf242f4edda61e2c1ba3e.tar.bz2
dm: Add a test for of-platdata parent information
Add a simple test that we can obtain the correct parent for an I2C device. This requires updating the driver names to match the compatible strings, adding them to the devicetree and enabling a few options. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/sandbox_i2c.c4
-rw-r--r--drivers/rtc/sandbox_rtc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index 57b1c60..2cbdaf9 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -93,8 +93,8 @@ static const struct udevice_id sandbox_i2c_ids[] = {
{ }
};
-U_BOOT_DRIVER(i2c_sandbox) = {
- .name = "i2c_sandbox",
+U_BOOT_DRIVER(sandbox_i2c) = {
+ .name = "sandbox_i2c",
.id = UCLASS_I2C,
.of_match = sandbox_i2c_ids,
.ops = &sandbox_i2c_ops,
diff --git a/drivers/rtc/sandbox_rtc.c b/drivers/rtc/sandbox_rtc.c
index 852770a..d0864b1 100644
--- a/drivers/rtc/sandbox_rtc.c
+++ b/drivers/rtc/sandbox_rtc.c
@@ -92,8 +92,8 @@ static const struct udevice_id sandbox_rtc_ids[] = {
{ }
};
-U_BOOT_DRIVER(rtc_sandbox) = {
- .name = "rtc-sandbox",
+U_BOOT_DRIVER(sandbox_rtc) = {
+ .name = "sandbox_rtc",
.id = UCLASS_RTC,
.of_match = sandbox_rtc_ids,
.ops = &sandbox_rtc_ops,