summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-emul-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-12-10 08:55:49 -0700
committerSimon Glass <sjg@chromium.org>2014-12-11 13:18:42 -0700
commitc70c71d8334216e272c33c35aff39e42d7c5185e (patch)
tree3d11ad7263c4d88fbfa751901082b1db9966703b /drivers/i2c/i2c-emul-uclass.c
parent63656b762e50b2f11e228d94fdbb025a84900c71 (diff)
dm: i2c: Add I2C emulation driver for sandbox
In order to test I2C we need some sort of emulation interface. Add hooks to allow a driver to emulate an I2C device for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers/i2c/i2c-emul-uclass.c')
-rw-r--r--drivers/i2c/i2c-emul-uclass.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c
new file mode 100644
index 00000000000..aa89f959535
--- /dev/null
+++ b/drivers/i2c/i2c-emul-uclass.c
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <i2c.h>
+
+UCLASS_DRIVER(i2c_emul) = {
+ .id = UCLASS_I2C_EMUL,
+ .name = "i2c_emul",
+};