summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-09-10 12:16:07 -0600
committerCommit Bot <commit-bot@chromium.org>2021-09-10 23:13:51 +0000
commitbaaa981c243702db15559abcf725dd448cee4bdb (patch)
tree82e4c2a4d3acf0faa139805bea2393d9c70239c2
parent2c0c44bed1d4b866cd33abc6ed29ac6241b32476 (diff)
downloadchrome-ec-baaa981c243702db15559abcf725dd448cee4bdb.tar.gz
zephyr: emul: update EMUL_DEFINE call sites
Update the call sites of EMUL_DEFINE to include the data pointer. BRANCH=none BUG=none TEST=zmake testall Cq-Depend: chromium:3154404 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Icb1a788a2ffcbdd969c231edb2214447041ed5ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153590 Tested-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@google.com>
-rw-r--r--zephyr/emul/emul_bb_retimer.c3
-rw-r--r--zephyr/emul/emul_bma255.c3
-rw-r--r--zephyr/emul/emul_bmi.c3
-rw-r--r--zephyr/emul/emul_pi3usb9201.c21
-rw-r--r--zephyr/emul/emul_smart_battery.c3
-rw-r--r--zephyr/emul/emul_syv682x.c19
-rw-r--r--zephyr/emul/emul_tcs3400.c3
7 files changed, 28 insertions, 27 deletions
diff --git a/zephyr/emul/emul_bb_retimer.c b/zephyr/emul/emul_bb_retimer.c
index ebbf2415dc..b391070b1f 100644
--- a/zephyr/emul/emul_bb_retimer.c
+++ b/zephyr/emul/emul_bb_retimer.c
@@ -345,7 +345,8 @@ static int bb_emul_init(const struct emul *emul,
.data = &bb_emul_data_##n.common, \
.addr = DT_INST_REG_ADDR(n), \
}; \
- EMUL_DEFINE(bb_emul_init, DT_DRV_INST(n), &bb_emul_cfg_##n)
+ EMUL_DEFINE(bb_emul_init, DT_DRV_INST(n), &bb_emul_cfg_##n, \
+ &bb_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(BB_RETIMER_EMUL)
diff --git a/zephyr/emul/emul_bma255.c b/zephyr/emul/emul_bma255.c
index 412e99b5f2..77b1f5246c 100644
--- a/zephyr/emul/emul_bma255.c
+++ b/zephyr/emul/emul_bma255.c
@@ -1022,7 +1022,8 @@ static int bma_emul_init(const struct emul *emul,
.data = &bma_emul_data_##n.common, \
.addr = DT_INST_REG_ADDR(n), \
}; \
- EMUL_DEFINE(bma_emul_init, DT_DRV_INST(n), &bma_emul_cfg_##n)
+ EMUL_DEFINE(bma_emul_init, DT_DRV_INST(n), &bma_emul_cfg_##n, \
+ &bma_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(BMA255_EMUL)
diff --git a/zephyr/emul/emul_bmi.c b/zephyr/emul/emul_bmi.c
index 8286d2d634..7923fe0eb5 100644
--- a/zephyr/emul/emul_bmi.c
+++ b/zephyr/emul/emul_bmi.c
@@ -1096,7 +1096,8 @@ static int bmi_emul_init(const struct emul *emul,
.data = &bmi_emul_data_##n.common, \
.addr = DT_INST_REG_ADDR(n), \
}; \
- EMUL_DEFINE(bmi_emul_init, DT_DRV_INST(n), &bmi_emul_cfg_##n)
+ EMUL_DEFINE(bmi_emul_init, DT_DRV_INST(n), &bmi_emul_cfg_##n, \
+ &bmi_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(BMI_EMUL)
diff --git a/zephyr/emul/emul_pi3usb9201.c b/zephyr/emul/emul_pi3usb9201.c
index 7feedbf7d0..babef58c75 100644
--- a/zephyr/emul/emul_pi3usb9201.c
+++ b/zephyr/emul/emul_pi3usb9201.c
@@ -169,18 +169,15 @@ static int pi3usb9201_emul_init(const struct emul *emul,
return ret;
}
-#define PI3USB9201_EMUL(n) \
- static struct pi3usb9201_emul_data \
- pi3usb9201_emul_data_##n = {}; \
- \
- static const struct pi3usb9201_emul_cfg \
- pi3usb9201_emul_cfg_##n = { \
- .i2c_label = DT_INST_BUS_LABEL(n), \
- .data = &pi3usb9201_emul_data_##n, \
- .addr = DT_INST_REG_ADDR(n), \
- }; \
- EMUL_DEFINE(pi3usb9201_emul_init, DT_DRV_INST(n), \
- &pi3usb9201_emul_cfg_##n)
+#define PI3USB9201_EMUL(n) \
+ static struct pi3usb9201_emul_data pi3usb9201_emul_data_##n = {}; \
+ static const struct pi3usb9201_emul_cfg pi3usb9201_emul_cfg_##n = { \
+ .i2c_label = DT_INST_BUS_LABEL(n), \
+ .data = &pi3usb9201_emul_data_##n, \
+ .addr = DT_INST_REG_ADDR(n), \
+ }; \
+ EMUL_DEFINE(pi3usb9201_emul_init, DT_DRV_INST(n), \
+ &pi3usb9201_emul_cfg_##n, &pi3usb9201_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(PI3USB9201_EMUL)
diff --git a/zephyr/emul/emul_smart_battery.c b/zephyr/emul/emul_smart_battery.c
index 1da517cd2a..4b1d87336e 100644
--- a/zephyr/emul/emul_smart_battery.c
+++ b/zephyr/emul/emul_smart_battery.c
@@ -873,7 +873,8 @@ static int sbat_emul_init(const struct emul *emul,
.data = &sbat_emul_data_##n.common, \
.addr = DT_INST_REG_ADDR(n), \
}; \
- EMUL_DEFINE(sbat_emul_init, DT_DRV_INST(n), &sbat_emul_cfg_##n)
+ EMUL_DEFINE(sbat_emul_init, DT_DRV_INST(n), &sbat_emul_cfg_##n, \
+ &sbat_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(SMART_BATTERY_EMUL)
diff --git a/zephyr/emul/emul_syv682x.c b/zephyr/emul/emul_syv682x.c
index b9c850bcd8..dff9df651c 100644
--- a/zephyr/emul/emul_syv682x.c
+++ b/zephyr/emul/emul_syv682x.c
@@ -153,16 +153,15 @@ static int syv682x_emul_init(const struct emul *emul,
return ret;
}
-#define SYV682X_EMUL(n) \
- static struct syv682x_emul_data syv682x_emul_data_##n = { \
- }; \
- \
- static const struct syv682x_emul_cfg syv682x_emul_cfg_##n = { \
- .i2c_label = DT_INST_BUS_LABEL(n), \
- .data = &syv682x_emul_data_##n, \
- .addr = DT_INST_REG_ADDR(n), \
- }; \
- EMUL_DEFINE(syv682x_emul_init, DT_DRV_INST(n), &syv682x_emul_cfg_##n)
+#define SYV682X_EMUL(n) \
+ static struct syv682x_emul_data syv682x_emul_data_##n = {}; \
+ static const struct syv682x_emul_cfg syv682x_emul_cfg_##n = { \
+ .i2c_label = DT_INST_BUS_LABEL(n), \
+ .data = &syv682x_emul_data_##n, \
+ .addr = DT_INST_REG_ADDR(n), \
+ }; \
+ EMUL_DEFINE(syv682x_emul_init, DT_DRV_INST(n), &syv682x_emul_cfg_##n, \
+ &syv682x_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(SYV682X_EMUL)
diff --git a/zephyr/emul/emul_tcs3400.c b/zephyr/emul/emul_tcs3400.c
index 6c2aa48816..0fc432e9ff 100644
--- a/zephyr/emul/emul_tcs3400.c
+++ b/zephyr/emul/emul_tcs3400.c
@@ -630,7 +630,8 @@ static int tcs_emul_init(const struct emul *emul,
.data = &tcs_emul_data_##n.common, \
.addr = DT_INST_REG_ADDR(n), \
}; \
- EMUL_DEFINE(tcs_emul_init, DT_DRV_INST(n), &tcs_emul_cfg_##n)
+ EMUL_DEFINE(tcs_emul_init, DT_DRV_INST(n), &tcs_emul_cfg_##n, \
+ &tcs_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(TCS3400_EMUL)