Home
last modified time | relevance | path

Searched refs:i2c_dev (Results 1 – 19 of 19) sorted by relevance

/Zephyr-Core-3.5.0/tests/drivers/i2c/i2c_api/src/
Dtest_i2c.c34 const struct device *const i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); in test_gy271() local
37 if (!device_is_ready(i2c_dev)) { in test_gy271()
43 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_gy271()
49 if (i2c_get_config(i2c_dev, &i2c_cfg_tmp)) { in test_gy271()
62 if (i2c_write(i2c_dev, datas, 2, 0x1E)) { in test_gy271()
69 if (i2c_write(i2c_dev, datas, 2, 0x1E)) { in test_gy271()
77 if (i2c_write(i2c_dev, datas, 1, 0x1E)) { in test_gy271()
85 if (i2c_read(i2c_dev, datas, 6, 0x1E)) { in test_gy271()
100 const struct device *const i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); in test_burst_gy271() local
103 if (!device_is_ready(i2c_dev)) { in test_burst_gy271()
[all …]
/Zephyr-Core-3.5.0/tests/boards/altera_max10/i2c_master/src/
Di2c_master.c31 static int powerup_adv7513(const struct device *i2c_dev) in powerup_adv7513() argument
37 if (i2c_reg_write_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513()
42 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513()
50 if (i2c_reg_write_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513()
56 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513()
68 const struct device *const i2c_dev = DEVICE_DT_GET_ONE(altr_nios2_i2c); in test_i2c_adv7513() local
72 if (!device_is_ready(i2c_dev)) { in test_i2c_adv7513()
78 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_i2c_adv7513()
84 zassert_true(powerup_adv7513(i2c_dev) == TC_PASS, in test_i2c_adv7513()
90 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in test_i2c_adv7513()
[all …]
/Zephyr-Core-3.5.0/drivers/i2c/
Di2c_npcx_controller.h21 void npcx_i2c_ctrl_mutex_lock(const struct device *i2c_dev);
28 void npcx_i2c_ctrl_mutex_unlock(const struct device *i2c_dev);
41 int npcx_i2c_ctrl_configure(const struct device *i2c_dev, uint32_t dev_config);
53 int npcx_i2c_ctrl_get_speed(const struct device *i2c_dev, uint32_t *speed);
69 int npcx_i2c_ctrl_transfer(const struct device *i2c_dev, struct i2c_msg *msgs,
93 int npcx_i2c_ctrl_target_register(const struct device *i2c_dev,
106 int npcx_i2c_ctrl_target_unregister(const struct device *i2c_dev,
Di2c_nios2.c25 ALT_AVALON_I2C_DEV_t i2c_dev; member
56 alt_avalon_i2c_init(&data->i2c_dev); in i2c_nios2_configure()
74 &data->i2c_dev, &data->irq_data); in i2c_nios2_transfer()
94 alt_avalon_i2c_master_target_set(&data->i2c_dev, addr); in i2c_nios2_transfer()
99 &data->i2c_dev, in i2c_nios2_transfer()
104 (&data->i2c_dev, in i2c_nios2_transfer()
122 &data->i2c_dev); in i2c_nios2_transfer()
140 alt_avalon_i2c_disable(&data->i2c_dev); in i2c_nios2_transfer()
150 alt_handle_irq(&data->i2c_dev, DT_INST_IRQN(0)); in i2c_nios2_isr()
161 .i2c_dev = {
[all …]
Di2c_npcx_controller.c922 void npcx_i2c_ctrl_mutex_lock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_lock() argument
924 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_mutex_lock()
929 void npcx_i2c_ctrl_mutex_unlock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_unlock() argument
931 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_mutex_unlock()
936 int npcx_i2c_ctrl_configure(const struct device *i2c_dev, uint32_t dev_config) in npcx_i2c_ctrl_configure() argument
938 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_configure()
954 i2c_ctrl_config_bus_freq(i2c_dev, data->bus_freq); in npcx_i2c_ctrl_configure()
960 int npcx_i2c_ctrl_get_speed(const struct device *i2c_dev, uint32_t *speed) in npcx_i2c_ctrl_get_speed() argument
962 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_get_speed()
1061 int npcx_i2c_ctrl_target_register(const struct device *i2c_dev, in npcx_i2c_ctrl_target_register() argument
[all …]
/Zephyr-Core-3.5.0/drivers/gpio/
Dgpio_nct38xx_port.c37 const struct i2c_dt_spec *i2c_dev; member
75 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, mask, new_reg); in gpio_nct38xx_pin_config()
86 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), in gpio_nct38xx_pin_config()
99 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_OD_SEL(config->gpio_port), in gpio_nct38xx_pin_config()
111 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), in gpio_nct38xx_pin_config()
120 ret = i2c_reg_update_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), in gpio_nct38xx_pin_config()
146 ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_MUX_CONTROL, &reg); in gpio_nct38xx_pin_get_config()
157 ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), &reg); in gpio_nct38xx_pin_get_config()
167 ret = i2c_reg_read_byte_dt(data->i2c_dev, in gpio_nct38xx_pin_get_config()
178 ret = i2c_reg_read_byte_dt(data->i2c_dev, in gpio_nct38xx_pin_get_config()
[all …]
Dgpio_nct38xx.c39 const struct i2c_dt_spec *i2c_dev; member
60 if (i2c_burst_write_dt(data->i2c_dev, NCT38XX_REG_ALERT_MASK, (uint8_t *)&alert_mask, in nct38xx_init_interrupt()
70 if (i2c_burst_read_dt(data->i2c_dev, NCT38XX_REG_ALERT, (uint8_t *)&alert, sizeof(alert))) { in nct38xx_init_interrupt()
76 if (i2c_burst_write_dt(data->i2c_dev, NCT38XX_REG_ALERT, (uint8_t *)&alert, in nct38xx_init_interrupt()
83 if (i2c_burst_write_dt(data->i2c_dev, NCT38XX_REG_ALERT_MASK, (uint8_t *)&alert_mask, in nct38xx_init_interrupt()
106 data->i2c_dev = mfd_nct38xx_get_i2c_dt_spec(config->mfd); in nct38xx_gpio_init()
Dgpio_rt1718s.h58 const struct i2c_dt_spec i2c_dev; member
90 return i2c_reg_read_byte_dt(&config->i2c_dev, reg_addr, val); in rt1718s_reg_read_byte()
108 return i2c_burst_read_dt(&config->i2c_dev, start_addr, buf, num_bytes); in rt1718s_reg_burst_read()
124 return i2c_reg_write_byte_dt(&config->i2c_dev, reg_addr, val); in rt1718s_reg_write_byte()
142 return i2c_burst_write_dt(&config->i2c_dev, start_addr, buf, num_bytes); in rt1718s_reg_burst_write()
Dgpio_nct38xx_alert.c25 const struct i2c_dt_spec *i2c_dev; member
67 ret = i2c_burst_read_dt(mfd->i2c_dev, NCT38XX_REG_ALERT, (uint8_t *)&alert, in nct38xx_alert_is_active()
72 ret = i2c_burst_read_dt(mfd->i2c_dev, NCT38XX_REG_ALERT_MASK, in nct38xx_alert_is_active()
80 ret = i2c_burst_write_dt(mfd->i2c_dev, NCT38XX_REG_ALERT, in nct38xx_alert_is_active()
132 data->mfd[i].i2c_dev = mfd_nct38xx_get_i2c_dt_spec(config->nct38xx_dev[i]); in nct38xx_alert_init()
Dgpio_rt1718s.c90 if (!device_is_ready(config->i2c_dev.bus)) { in rt1718s_init()
91 LOG_ERR("%s device not ready", config->i2c_dev.bus->name); in rt1718s_init()
134 .i2c_dev = I2C_DT_SPEC_INST_GET(inst), \
/Zephyr-Core-3.5.0/samples/drivers/i2s/echo/src/
Dcodec.c19 const struct device *const i2c_dev = DEVICE_DT_GET(WM8731_I2C_NODE); in init_wm8731_i2c() local
105 if (!device_is_ready(i2c_dev)) { in init_wm8731_i2c()
106 printk("%s is not ready\n", i2c_dev->name); in init_wm8731_i2c()
114 ret = i2c_reg_write_byte(i2c_dev, WM8731_I2C_ADDR, in init_wm8731_i2c()
/Zephyr-Core-3.5.0/drivers/mfd/
Dmfd_nct38xx.c11 const struct i2c_dt_spec i2c_dev; member
24 if (!device_is_ready(config->i2c_dev.bus)) { in mfd_nct38xx_init()
44 return &config->i2c_dev; in mfd_nct38xx_get_i2c_dt_spec()
50 .i2c_dev = I2C_DT_SPEC_INST_GET(inst), \
/Zephyr-Core-3.5.0/drivers/fuel_gauge/max17048/
Dmax17048.c67 int max17048_adc(const struct device *i2c_dev, uint16_t *response) in max17048_adc() argument
69 return max17048_read_register(i2c_dev, REGISTER_VCELL, response); in max17048_adc()
75 int max17048_voltage(const struct device *i2c_dev, uint16_t *response) in max17048_voltage() argument
77 int rc = max17048_adc(i2c_dev, response); in max17048_voltage()
100 int max17048_percent(const struct device *i2c_dev, uint8_t *response) in max17048_percent() argument
103 int rc = max17048_read_register(i2c_dev, REGISTER_SOC, &data); in max17048_percent()
123 int max17048_crate(const struct device *i2c_dev, int16_t *response) in max17048_crate() argument
125 int rc = max17048_read_register(i2c_dev, REGISTER_CRATE, response); in max17048_crate()
/Zephyr-Core-3.5.0/drivers/crypto/
Dcrypto_ataes132a_priv.h251 int ataes132a_init(const struct device *i2c_dev);
310 int ataes132a_aes_ccm_decrypt(const struct device *i2c_dev,
358 int ataes132a_aes_ccm_encrypt(const struct device *i2c_dev,
386 int ataes132a_aes_ecb_block(const struct device *i2c_dev,
/Zephyr-Core-3.5.0/drivers/sensor/si7006/
Dsi7006.c26 const struct device *i2c_dev; member
/Zephyr-Core-3.5.0/drivers/i3c/
Di3c_common.c91 struct i3c_i2c_device_desc *i2c_dev; in i3c_addr_slots_init() local
120 i2c_dev = &config->dev_list.i2c[i]; in i3c_addr_slots_init()
121 ret = i3c_attach_i2c_device(i2c_dev); in i3c_addr_slots_init()
Di3c_cdns.c1346 static int cdns_i3c_i2c_transfer(const struct device *dev, struct i3c_i2c_device_desc *i2c_dev, in cdns_i3c_i2c_transfer() argument
1409 cmd->cmd0 |= CMD0_FIFO_DEV_ADDR(i2c_dev->addr); in cdns_i3c_i2c_transfer()
2276 struct i3c_i2c_device_desc *i2c_dev = cdns_i3c_i2c_device_find(dev, addr); in cdns_i3c_i2c_api_transfer() local
2279 if (i2c_dev == NULL) { in cdns_i3c_i2c_api_transfer()
2282 ret = cdns_i3c_i2c_transfer(dev, i2c_dev, msgs, num_msgs); in cdns_i3c_i2c_api_transfer()
/Zephyr-Core-3.5.0/doc/services/rtio/
Dindex.rst233 RTIO_I2C_IODEV(i2c_dev, I2C_DT_SPEC_INST(n));
243 rtio_sqe_prep_write(write_sqe, i2c_dev, RTIO_PRIO_LOW, &reg_addr, 2);
246 rtio_sqe_prep_read(read_sqe, i2c_dev, RTIO_PRIO_LOW, buf, 32);
277 RTIO_I2C_IODEV(i2c_dev, I2C_DT_SPEC_INST(n));
287 rtio_sqe_prep_read(read_sqe, i2c_dev, RTIO_PRIO_LOW, buf, 32);
/Zephyr-Core-3.5.0/tests/lib/devicetree/api/src/
Dmain.c354 const char *i2c_dev = "TEST_I2C_DEV"; in ZTEST() local
446 zassert_true(!strncmp(i2c_dev, DT_INST_LABEL(0), strlen(i2c_dev)), ""); in ZTEST()