Home
last modified time | relevance | path

Searched refs:emul (Results 1 – 25 of 57) sorted by relevance

123

/Zephyr-Core-3.4.0/subsys/emul/
Demul.c10 LOG_MODULE_REGISTER(emul);
17 const struct emul *emul_get_binding(const char *name) in emul_get_binding()
19 STRUCT_SECTION_FOREACH(emul, emul_it) { in emul_get_binding()
41 const struct emul *emul = emul_get_binding(elp->dev->name); in emul_init_for_bus() local
43 __ASSERT(emul, "Cannot find emulator for '%s'", elp->dev->name); in emul_init_for_bus()
45 switch (emul->bus_type) { in emul_init_for_bus()
47 emul->bus.i2c->target = emul; in emul_init_for_bus()
50 emul->bus.espi->target = emul; in emul_init_for_bus()
53 emul->bus.spi->target = emul; in emul_init_for_bus()
56 int rc = emul->init(emul, dev); in emul_init_for_bus()
[all …]
/Zephyr-Core-3.4.0/drivers/espi/
Despi_emul.c40 struct espi_emul *emul; in espi_emul_find() local
42 emul = CONTAINER_OF(node, struct espi_emul, node); in espi_emul_find()
43 if (emul->chipsel == chipsel) { in espi_emul_find()
44 return emul; in espi_emul_find()
91 struct espi_emul *emul; in espi_emul_read_lpc_request() local
101 emul = espi_emul_find(dev, EMUL_ESPI_HOST_CHIPSEL); in espi_emul_read_lpc_request()
102 if (!emul) { in espi_emul_read_lpc_request()
107 __ASSERT_NO_MSG(emul->api); in espi_emul_read_lpc_request()
108 api = emul->api; in espi_emul_read_lpc_request()
114 *data = (uint32_t)api->get_acpi_shm(emul->target); in espi_emul_read_lpc_request()
[all …]
/Zephyr-Core-3.4.0/drivers/spi/
Dspi_emul.c55 struct spi_emul *emul; in spi_emul_find() local
57 emul = CONTAINER_OF(node, struct spi_emul, node); in spi_emul_find()
58 if (emul->chipsel == chipsel) { in spi_emul_find()
59 return emul; in spi_emul_find()
69 struct spi_emul *emul; in spi_emul_io() local
72 emul = spi_emul_find(dev, config->slave); in spi_emul_io()
73 if (!emul) { in spi_emul_io()
77 api = emul->api; in spi_emul_io()
78 __ASSERT_NO_MSG(emul->api); in spi_emul_io()
79 __ASSERT_NO_MSG(emul->api->io); in spi_emul_io()
[all …]
/Zephyr-Core-3.4.0/drivers/i2c/
Di2c_emul.c48 struct i2c_emul *emul = NULL; in i2c_emul_find() local
50 emul = CONTAINER_OF(node, struct i2c_emul, node); in i2c_emul_find()
51 if (emul->addr == addr) { in i2c_emul_find()
52 return emul; in i2c_emul_find()
80 struct i2c_emul *emul; in i2c_emul_transfer() local
84 emul = i2c_emul_find(dev, addr); in i2c_emul_transfer()
85 if (!emul) { in i2c_emul_transfer()
89 api = emul->api; in i2c_emul_transfer()
90 __ASSERT_NO_MSG(emul->api); in i2c_emul_transfer()
91 __ASSERT_NO_MSG(emul->api->transfer); in i2c_emul_transfer()
[all …]
/Zephyr-Core-3.4.0/include/zephyr/drivers/usb/
Demul_bc12.h35 int (*set_charging_partner)(const struct emul *emul, enum bc12_type partner_type);
36 int (*set_pd_partner)(const struct emul *emul, bool connected);
56 static inline int bc12_emul_set_charging_partner(const struct emul *target, in bc12_emul_set_charging_partner()
80 static inline int bc12_emul_set_pd_partner(const struct emul *target, bool connected) in bc12_emul_set_pd_partner()
/Zephyr-Core-3.4.0/tests/subsys/emul/src/
Dmain.c21 ZTEST(emul, test_emul_dt_get) in ZTEST() argument
26 static const struct emul *emul_static = EMUL_DT_GET(TEST_ACCEL); in ZTEST()
34 ZTEST(emul, test_emul_backend_api) in ZTEST() argument
36 static const struct emul *emul_a = EMUL_DT_GET(TEST_EMUL_A); in ZTEST()
37 static const struct emul *emul_b = EMUL_DT_GET(TEST_EMUL_B); in ZTEST()
57 ZTEST_SUITE(emul, NULL, NULL, NULL, NULL, NULL);
Demul_tester.h13 int (*set_action)(const struct emul *target, int action);
14 int (*get_action)(const struct emul *target, int *action);
17 static inline int emul_tester_backend_set_action(const struct emul *target, int action) in emul_tester_backend_set_action()
25 static inline int emul_tester_backend_get_action(const struct emul *target, int *action) in emul_tester_backend_get_action()
Demul_tester.c25 static int emul_tester_set_action(const struct emul *target, int action) in emul_tester_set_action()
35 static int emul_tester_get_action(const struct emul *target, int *action) in emul_tester_get_action()
44 static int emul_tester_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in emul_tester_transfer()
64 static int emul_tester_init(const struct emul *target, const struct device *parent) in emul_tester_init()
/Zephyr-Core-3.4.0/include/zephyr/drivers/
Demul.h22 struct emul;
63 typedef int (*emul_init_t)(const struct emul *emul, const struct device *parent);
69 struct emul { struct
128 const STRUCT_SECTION_ITERABLE(emul, EMUL_DT_NAME_GET(node_id)) \
188 const struct emul *emul_get_binding(const char *name);
195 #define Z_MAYBE_EMUL_DECLARE_INTERNAL(node_id) extern const struct emul EMUL_DT_NAME_GET(node_id);
Despi_emul.h48 typedef int (*emul_espi_api_set_vw)(const struct emul *target, enum espi_vwire_signal vw,
62 typedef int (*emul_espi_api_get_vw)(const struct emul *target, enum espi_vwire_signal vw,
73 typedef uintptr_t (*emul_espi_api_get_acpi_shm)(const struct emul *target);
114 const struct emul *target;
139 int espi_emul_register(const struct device *dev, struct espi_emul *emul);
Di2c_emul.h40 const struct emul *target;
62 typedef int (*i2c_emul_transfer_t)(const struct emul *target, struct i2c_msg *msgs, int num_msgs,
72 int i2c_emul_register(const struct device *dev, struct i2c_emul *emul);
Dspi_emul.h41 const struct emul *target;
66 typedef int (*spi_emul_io_t)(const struct emul *target, const struct spi_config *config,
76 int spi_emul_register(const struct device *dev, struct spi_emul *emul);
/Zephyr-Core-3.4.0/drivers/sensor/akm09918c/
Dakm09918c_emul.h19 void akm09918c_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val,
30 void akm09918c_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val,
38 void akm09918c_emul_reset(const struct emul *target);
Dakm09918c_emul.c28 void akm09918c_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in akm09918c_emul_set_reg()
37 void akm09918c_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in akm09918c_emul_get_reg()
45 void akm09918c_emul_reset(const struct emul *target) in akm09918c_emul_reset()
54 static int akm09918c_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in akm09918c_emul_handle_write()
71 static int akm09918c_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in akm09918c_emul_transfer_i2c()
125 static int akm09918c_emul_init(const struct emul *target, const struct device *parent) in akm09918c_emul_init()
/Zephyr-Core-3.4.0/drivers/eeprom/
Deeprom_at2x_emul.c22 struct i2c_emul emul; member
55 static int at24_emul_transfer(const struct emul *target, struct i2c_msg *msgs, in at24_emul_transfer()
138 static int emul_atmel_at24_init(const struct emul *target, const struct device *parent) in emul_atmel_at24_init()
143 data->emul.api = &bus_api; in emul_atmel_at24_init()
144 data->emul.addr = cfg->addr; in emul_atmel_at24_init()
145 data->emul.target = target; in emul_atmel_at24_init()
/Zephyr-Core-3.4.0/drivers/sensor/icm42688/
Dicm42688_emul.h19 void icm42688_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *in,
30 void icm42688_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *out, size_t count);
Dicm42688_emul.c27 void icm42688_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in icm42688_emul_set_reg()
36 void icm42688_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in icm42688_emul_get_reg()
44 static void icm42688_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in icm42688_emul_handle_write()
62 static int icm42688_emul_io_spi(const struct emul *target, const struct spi_config *config, in icm42688_emul_io_spi()
106 static int icm42688_emul_init(const struct emul *target, const struct device *parent) in icm42688_emul_init()
/Zephyr-Core-3.4.0/tests/subsys/emul/
Dapp.overlay6 * Application overlay for testing the emul.h API.
21 compatible = "vnd,emul-tester";
27 compatible = "vnd,emul-tester";
/Zephyr-Core-3.4.0/tests/drivers/uart/uart_emul/boards/
Dqemu_x86.overlay8 euart0: uart-emul {
9 compatible = "zephyr,uart-emul";
/Zephyr-Core-3.4.0/drivers/fuel_gauge/max17048/
Demul_max17048.c37 static int emul_max17048_reg_write(const struct emul *target, int reg, int val) in emul_max17048_reg_write()
43 static int emul_max17048_reg_read(const struct emul *target, int reg, int *val) in emul_max17048_reg_read()
68 static int max17048_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in max17048_emul_transfer_i2c()
141 static int emul_max17048_init(const struct emul *target, const struct device *parent) in emul_max17048_init()
/Zephyr-Core-3.4.0/subsys/emul/espi/
Demul_espi_host.c68 struct espi_emul emul; member
126 static int emul_host_set_vw(const struct emul *target, in emul_host_set_vw()
144 static int emul_host_get_vw(const struct emul *target, in emul_host_get_vw()
217 static uintptr_t emul_espi_dev_get_acpi_shm(const struct emul *target) in emul_espi_dev_get_acpi_shm()
249 static int emul_host_init(const struct emul *emul, const struct device *bus) in emul_host_init() argument
251 struct espi_host_emul_data *data = emul->data; in emul_host_init()
/Zephyr-Core-3.4.0/drivers/usb/bc12/
Demul_bc12_pi3usb9201.c60 static bool pi3usb9201_emul_interrupt_is_pending(const struct emul *target) in pi3usb9201_emul_interrupt_is_pending()
85 static int pi3usb9201_emul_set_reg(const struct emul *target, int reg, uint8_t val) in pi3usb9201_emul_set_reg()
116 static int pi3usb9201_emul_get_reg(const struct emul *target, int reg, uint8_t *val) in pi3usb9201_emul_get_reg()
141 static void pi3usb9201_emul_reset(const struct emul *target) in pi3usb9201_emul_reset()
181 static int pi3usb9201_emul_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in pi3usb9201_emul_transfer()
221 int pi3usb9201_emul_set_charging_partner(const struct emul *target, enum bc12_type partner_type) in pi3usb9201_emul_set_charging_partner()
250 static int pi3usb9201_emul_set_pd_partner_state(const struct emul *target, bool connected) in pi3usb9201_emul_set_pd_partner_state()
301 static int pi3usb9201_emul_init(const struct emul *target, const struct device *parent) in pi3usb9201_emul_init()
/Zephyr-Core-3.4.0/tests/drivers/fuel_gauge/sbs_gauge/boards/
Demulated_board.overlay12 compatible = "zephyr,i2c-emul-controller";
22 compatible = "zephyr,i2c-emul-controller";
/Zephyr-Core-3.4.0/drivers/gpio/
Dgpio_emul_sdl.c18 const struct device *emul; member
61 ret = gpio_emul_input_set(config->emul, pin, event->type == SDL_KEYDOWN ? 1 : 0); in sdl_filter()
95 .emul = DEVICE_DT_GET(DT_INST_PARENT(inst)), \
/Zephyr-Core-3.4.0/drivers/fuel_gauge/sbs_gauge/
Demul_sbs_gauge.c43 static int emul_sbs_gauge_reg_write(const struct emul *target, int reg, int val) in emul_sbs_gauge_reg_write()
72 static int emul_sbs_gauge_reg_read(const struct emul *target, int reg, int *val) in emul_sbs_gauge_reg_read()
124 static int emul_sbs_gauge_buffer_read(const struct emul *target, int reg, char *val) in emul_sbs_gauge_buffer_read()
156 static int sbs_gauge_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in sbs_gauge_emul_transfer_i2c()
234 static int emul_sbs_sbs_gauge_init(const struct emul *target, const struct device *parent) in emul_sbs_sbs_gauge_init()

123