Home
last modified time | relevance | path

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

123

/Zephyr-Core-3.5.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 if (!emul) { in emul_init_for_bus()
48 switch (emul->bus_type) { in emul_init_for_bus()
50 emul->bus.i2c->target = emul; in emul_init_for_bus()
53 emul->bus.espi->target = emul; in emul_init_for_bus()
56 emul->bus.spi->target = emul; in emul_init_for_bus()
59 int rc = emul->init(emul, dev); in emul_init_for_bus()
[all …]
/Zephyr-Core-3.5.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.5.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.5.0/include/zephyr/drivers/
Demul_fuel_gauge.h36 int (*set_battery_charging)(const struct emul *emul, uint32_t uV, int uA);
37 int (*is_battery_cutoff)(const struct emul *emul, bool *cutoff);
57 __syscall int emul_fuel_gauge_set_battery_charging(const struct emul *target, uint32_t uV, int uA);
58 static inline int z_impl_emul_fuel_gauge_set_battery_charging(const struct emul *target, in z_impl_emul_fuel_gauge_set_battery_charging()
80 __syscall int emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff);
81 static inline int z_impl_emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff) in z_impl_emul_fuel_gauge_is_battery_cutoff()
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);
Demul_sensor.h29 int (*set_channel)(const struct emul *target, enum sensor_channel ch, q31_t value,
32 int (*get_sample_range)(const struct emul *target, enum sensor_channel ch, q31_t *lower,
46 static inline bool emul_sensor_backend_is_supported(const struct emul *target) in emul_sensor_backend_is_supported()
63 static inline int emul_sensor_backend_set_channel(const struct emul *target, enum sensor_channel ch, in emul_sensor_backend_set_channel()
95 static inline int emul_sensor_backend_get_sample_range(const struct emul *target, in emul_sensor_backend_get_sample_range()
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.5.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.5.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.5.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.5.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.c31 void akm09918c_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in akm09918c_emul_set_reg()
40 void akm09918c_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in akm09918c_emul_get_reg()
48 void akm09918c_emul_reset(const struct emul *target) in akm09918c_emul_reset()
57 static int akm09918c_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in akm09918c_emul_handle_write()
74 static int akm09918c_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in akm09918c_emul_transfer_i2c()
128 static int akm09918c_emul_init(const struct emul *target, const struct device *parent) in akm09918c_emul_init()
136 static int akm09918c_emul_backend_set_channel(const struct emul *target, enum sensor_channel ch, in akm09918c_emul_backend_set_channel()
179 static int akm09918c_emul_backend_get_sample_range(const struct emul *target, in akm09918c_emul_backend_get_sample_range()
/Zephyr-Core-3.5.0/drivers/sensor/f75303/
Df75303_emul.c28 static void f75303_emul_set_reg(const struct emul *target, uint8_t reg, uint8_t val) in f75303_emul_set_reg()
36 static uint8_t f75303_emul_get_reg(const struct emul *target, uint8_t reg) in f75303_emul_get_reg()
44 static void f75303_emul_reset(const struct emul *target) in f75303_emul_reset()
51 static int f75303_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in f75303_emul_transfer_i2c()
100 static int f75303_emul_init(const struct emul *target, const struct device *parent) in f75303_emul_init()
106 static int f75303_emul_set_channel(const struct emul *target, enum sensor_channel chan, in f75303_emul_set_channel()
142 static int f75303_emul_get_sample_range(const struct emul *target, enum sensor_channel chan, in f75303_emul_get_sample_range()
/Zephyr-Core-3.5.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.5.0/drivers/fuel_gauge/
Demul_fuel_gauge_syscall_handlers.c12 static inline int z_vrfy_emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff) in z_vrfy_emul_fuel_gauge_is_battery_cutoff()
19 static inline int z_vrfy_emul_fuel_gauge_set_battery_charging(const struct emul *target, in z_vrfy_emul_fuel_gauge_set_battery_charging()
/Zephyr-Core-3.5.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.c28 void icm42688_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in icm42688_emul_set_reg()
37 void icm42688_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in icm42688_emul_get_reg()
45 static void icm42688_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in icm42688_emul_handle_write()
63 static int icm42688_emul_io_spi(const struct emul *target, const struct spi_config *config, in icm42688_emul_io_spi()
107 static int icm42688_emul_init(const struct emul *target, const struct device *parent) in icm42688_emul_init()
127 static void icm42688_emul_get_accel_settings(const struct emul *target, int *fs_g, int *sensitivity, in icm42688_emul_get_accel_settings()
180 static void icm42688_emul_get_accel_ranges(const struct emul *target, q31_t *lower, q31_t *upper, in icm42688_emul_get_accel_ranges()
198 static void icm42688_emul_get_gyro_settings(const struct emul *target, int *fs_mdps, in icm42688_emul_get_gyro_settings()
271 static void icm42688_emul_get_gyro_ranges(const struct emul *target, q31_t *lower, q31_t *upper, in icm42688_emul_get_gyro_ranges()
298 static int icm42688_emul_backend_get_sample_range(const struct emul *target, enum sensor_channel ch, in icm42688_emul_backend_get_sample_range()
[all …]
/Zephyr-Core-3.5.0/drivers/charger/
Demul_sbs_charger.c28 static int emul_sbs_charger_reg_write(const struct emul *target, int reg, int val) in emul_sbs_charger_reg_write()
40 static int emul_sbs_charger_reg_read(const struct emul *target, int reg, int *val) in emul_sbs_charger_reg_read()
59 static int sbs_charger_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in sbs_charger_emul_transfer_i2c()
123 static int emul_sbs_sbs_charger_init(const struct emul *target, const struct device *parent) in emul_sbs_sbs_charger_init()
/Zephyr-Core-3.5.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.5.0/tests/drivers/uart/uart_emul/boards/
Dqemu_x86.overlay8 euart0: uart-emul {
9 compatible = "zephyr,uart-emul";
/Zephyr-Core-3.5.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()
138 static int emul_max17048_init(const struct emul *target, const struct device *parent) in emul_max17048_init()

123