aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/sandbox_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/sandbox_i2c.c')
-rw-r--r--drivers/i2c/sandbox_i2c.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index f4ae2397a0..125026da90 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/test.h>
+#include <dm/acpi.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
@@ -83,6 +84,15 @@ static int sandbox_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
return ops->xfer(emul, msg, nmsgs);
}
+static int sandbox_i2c_get_name(const struct udevice *dev, char *out_name)
+{
+ return acpi_copy_name(out_name, "SI2C");
+}
+
+struct acpi_ops sandbox_i2c_acpi_ops = {
+ .get_name = sandbox_i2c_get_name,
+};
+
static const struct dm_i2c_ops sandbox_i2c_ops = {
.xfer = sandbox_i2c_xfer,
};
@@ -98,4 +108,5 @@ U_BOOT_DRIVER(i2c_sandbox) = {
.of_match = sandbox_i2c_ids,
.ops = &sandbox_i2c_ops,
.priv_auto_alloc_size = sizeof(struct sandbox_i2c_priv),
+ ACPI_OPS_PTR(&sandbox_i2c_acpi_ops)
};