/Zephyr-latest/tests/boards/altera_max10/i2c_master/src/ |
D | i2c_master.c | 31 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-latest/tests/drivers/i2c/i2c_api/src/ |
D | test_i2c.c | 45 const struct device *const i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); in test_gy271() local 48 if (!device_is_ready(i2c_dev)) { in test_gy271() 54 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_gy271() 60 if (i2c_get_config(i2c_dev, &i2c_cfg_tmp)) { in test_gy271() 73 if (i2c_write(i2c_dev, datas, 2, GY271_ADDR)) { in test_gy271() 82 if (i2c_write(i2c_dev, datas, 2, GY271_ADDR)) { in test_gy271() 89 if (i2c_write(i2c_dev, datas, 2, GY271_ADDR)) { in test_gy271() 104 if (i2c_write(i2c_dev, datas, 1, GY271_ADDR)) { in test_gy271() 112 if (i2c_read(i2c_dev, datas, 6, GY271_ADDR)) { in test_gy271() 126 const struct device *const i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); in test_burst_gy271() local [all …]
|
/Zephyr-latest/drivers/i2c/ |
D | i2c_npcx_controller.h | 21 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,
|
D | i2c_nios2.c | 25 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() 164 .i2c_dev = { [all …]
|
D | i2c_npcx_controller.c | 933 void npcx_i2c_ctrl_mutex_lock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_lock() argument 935 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_mutex_lock() 940 void npcx_i2c_ctrl_mutex_unlock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_unlock() argument 942 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_mutex_unlock() 947 int npcx_i2c_ctrl_configure(const struct device *i2c_dev, uint32_t dev_config) in npcx_i2c_ctrl_configure() argument 949 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_configure() 965 i2c_ctrl_config_bus_freq(i2c_dev, data->bus_freq); in npcx_i2c_ctrl_configure() 971 int npcx_i2c_ctrl_get_speed(const struct device *i2c_dev, uint32_t *speed) in npcx_i2c_ctrl_get_speed() argument 973 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_get_speed() 1072 int npcx_i2c_ctrl_target_register(const struct device *i2c_dev, in npcx_i2c_ctrl_target_register() argument [all …]
|
/Zephyr-latest/drivers/smbus/ |
D | smbus_stm32.c | 22 const struct device *i2c_dev; member 75 if (!device_is_ready(config->i2c_dev)) { in smbus_stm32_init() 89 i2c_stm32_smbalert_set_callback(config->i2c_dev, smbus_stm32_smbalert_isr, dev); in smbus_stm32_init() 112 i2c_stm32_set_smbus_mode(config->i2c_dev, I2CSTM32MODE_SMBUSHOST); in smbus_stm32_configure() 115 i2c_stm32_set_smbus_mode(config->i2c_dev, I2CSTM32MODE_SMBUSDEVICE); in smbus_stm32_configure() 120 i2c_stm32_smbalert_enable(config->i2c_dev); in smbus_stm32_configure() 123 i2c_stm32_smbalert_disable(config->i2c_dev); in smbus_stm32_configure() 144 return i2c_write(config->i2c_dev, NULL, 0, periph_addr); in smbus_stm32_quick() 146 return i2c_read(config->i2c_dev, NULL, 0, periph_addr); in smbus_stm32_quick() 157 return i2c_write(config->i2c_dev, &command, sizeof(command), periph_addr); in smbus_stm32_byte_write() [all …]
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_ite_it8801.c | 25 const struct i2c_dt_spec i2c_dev; member 74 ret = i2c_reg_read_byte_dt(&config->i2c_dev, reg_gpcr, &control); in gpio_it8801_configure() 95 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_sovr, mask, new_value); in gpio_it8801_configure() 125 ret = i2c_reg_write_byte_dt(&config->i2c_dev, reg_gpcr, control); in gpio_it8801_configure() 148 ret = i2c_reg_read_byte_dt(&config->i2c_dev, reg_gpcr, &control); in gpio_it8801_get_config() 163 ret = i2c_reg_read_byte_dt(&config->i2c_dev, config->reg_ipsr, &value); in gpio_it8801_get_config() 199 ret = i2c_reg_read_byte_dt(&config->i2c_dev, config->reg_ipsr, &val); in gpio_it8801_port_get_raw() 216 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_sovr, mask, value); in gpio_it8801_port_set_masked_raw() 231 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_sovr, pins, pins); in gpio_it8801_port_set_bits_raw() 246 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_sovr, pins, 0); in gpio_it8801_port_clear_bits_raw() [all …]
|
D | gpio_nct38xx_port.c | 37 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, ®); in gpio_nct38xx_pin_get_config() 157 ret = i2c_reg_read_byte_dt(data->i2c_dev, NCT38XX_REG_GPIO_DIR(config->gpio_port), ®); 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 …]
|
D | gpio_nct38xx.c | 39 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()
|
D | gpio_rt1718s.h | 58 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()
|
D | gpio_nct38xx_alert.c | 25 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()
|
D | gpio_rt1718s.c | 90 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-latest/samples/drivers/i2s/echo/src/ |
D | codec.c | 19 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-latest/drivers/input/ |
D | input_ite_it8801_kbd.c | 34 const struct i2c_dt_spec i2c_dev; member 71 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksomcr, kso_val); in kbd_it8801_drive_column() 84 ret = i2c_reg_read_byte_dt(&config->i2c_dev, config->reg_ksidr, &value); in kbd_it8801_read_row() 99 ret = i2c_reg_read_byte_dt(&config->i2c_dev, config->reg_ksieer, &ksieer_val); in it8801_input_alert_handler() 106 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksieer, GENMASK(7, 0)); in it8801_input_alert_handler() 122 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksieer, GENMASK(7, 0)); in kbd_it8801_set_detect_mode() 128 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksiier, GENMASK(7, 0)); in kbd_it8801_set_detect_mode() 135 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksiier, 0x00); in kbd_it8801_set_detect_mode() 157 status = mfd_it8801_configure_pins(&config->i2c_dev, config->altctrl[i].gpiocr, in kbd_it8801_init() 170 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_ksomcr, IT8801_REG_MASK_AKSOSC); in kbd_it8801_init() [all …]
|
/Zephyr-latest/drivers/mfd/ |
D | mfd_nct38xx.c | 11 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), \
|
D | mfd_ite_it8801.c | 17 const struct i2c_dt_spec i2c_dev; member 37 ret = i2c_reg_read_byte_dt(&config->i2c_dev, it8801_id_verify[i].reg, &val); in it8801_check_vendor_id() 87 if (!i2c_is_ready_dt(&config->i2c_dev)) { in mfd_it8801_init() 88 LOG_ERR("I2C bus %s is not ready", config->i2c_dev.bus->name); in mfd_it8801_init() 104 ret = i2c_reg_write_byte_dt(&config->i2c_dev, IT8801_REG_SMBCR, IT8801_REG_MASK_ARE); in mfd_it8801_init() 128 .i2c_dev = I2C_DT_SPEC_INST_GET(inst), \
|
D | mfd_it8801_altctrl.c | 21 int mfd_it8801_configure_pins(const struct i2c_dt_spec *i2c_dev, const struct device *dev, in mfd_it8801_configure_pins() argument 51 ret = i2c_reg_update_byte_dt(i2c_dev, reg_gpiocr, GENMASK(7, 6), alt_val << 6); in mfd_it8801_configure_pins()
|
/Zephyr-latest/samples/boards/st/i2c_timing/src/ |
D | main.c | 21 const struct device *const i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); in main() local 24 if (!device_is_ready(i2c_dev)) { in main() 30 if (i2c_get_config(i2c_dev, (uint32_t *)&i2c_cfg)) { in main()
|
/Zephyr-latest/drivers/fuel_gauge/max17048/ |
D | max17048.c | 67 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, uint32_t *response) in max17048_voltage() argument 78 int rc = max17048_adc(i2c_dev, &raw_voltage); in max17048_voltage() 99 int max17048_percent(const struct device *i2c_dev, uint8_t *response) in max17048_percent() argument 102 int rc = max17048_read_register(i2c_dev, REGISTER_SOC, &data); in max17048_percent() 122 int max17048_crate(const struct device *i2c_dev, int16_t *response) in max17048_crate() argument 124 int rc = max17048_read_register(i2c_dev, REGISTER_CRATE, response); in max17048_crate()
|
/Zephyr-latest/drivers/pwm/ |
D | pwm_ite_it8801.c | 39 const struct i2c_dt_spec i2c_dev; member 60 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_mcr, in pwm_enable() 63 ret = i2c_reg_update_byte_dt(&config->i2c_dev, config->reg_mcr, in pwm_enable() 96 ret = i2c_reg_update_byte_dt(&config->i2c_dev, IT8801_REG_PWMODDSR, mask, mask); in pwm_it8801_set_cycles() 111 ret = i2c_reg_write_byte_dt(&config->i2c_dev, config->reg_dcr, duty); in pwm_it8801_set_cycles() 139 ret = mfd_it8801_configure_pins(&config->i2c_dev, config->altctrl[i].gpiocr, in pwm_it8801_init() 162 .i2c_dev = I2C_DT_SPEC_GET(DT_INST_PARENT(inst)), \
|
/Zephyr-latest/tests/drivers/i2c/i2c_ram/src/ |
D | test_i2c_ram.c | 36 const struct device *i2c_dev = DEVICE_DT_GET(I2C_DEV_NODE); variable 51 zassert_true(device_is_ready(i2c_dev), "I2C device is not read"); in i2c_ram_setup() 54 zassert_ok(i2c_configure(i2c_dev, i2c_cfg), "I2C config failed"); in i2c_ram_setup() 57 ret = i2c_get_config(i2c_dev, &i2c_cfg_tmp); in i2c_ram_setup() 79 pm_device_runtime_get(i2c_dev); in i2c_ram_before() 86 pm_device_runtime_put(i2c_dev); in i2c_ram_after() 98 zassert_ok(i2c_transfer(i2c_dev, msgs, 1, RAM_ADDR), in ZTEST() 109 zassert_ok(i2c_transfer(i2c_dev, msgs, 2, RAM_ADDR), in ZTEST() 121 zassert_ok(i2c_write(i2c_dev, tx_data, ARRAY_SIZE(tx_data), RAM_ADDR), in ZTEST() 124 zassert_ok(i2c_write_read(i2c_dev, RAM_ADDR, rx_cmd, ARRAY_SIZE(rx_cmd), in ZTEST() [all …]
|
/Zephyr-latest/drivers/crypto/ |
D | crypto_ataes132a_priv.h | 251 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-latest/tests/subsys/rtio/rtio_i2c/src/ |
D | main.cpp | 14 static const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c0)); variable 38 zassert_not_null(i2c_dev->api); in ZTEST() 40 ((const struct i2c_driver_api *)i2c_dev->api)->iodev_submit); in ZTEST()
|
/Zephyr-latest/include/zephyr/drivers/mfd/ |
D | mfd_ite_it8801.h | 118 int mfd_it8801_configure_pins(const struct i2c_dt_spec *i2c_dev, const struct device *dev,
|
/Zephyr-latest/drivers/i3c/ |
D | i3c_common.c | 94 struct i3c_i2c_device_desc *i2c_dev; in i3c_addr_slots_init() local 124 i2c_dev = &config->dev_list.i2c[i]; in i3c_addr_slots_init() 125 ret = i3c_attach_i2c_device(i2c_dev); in i3c_addr_slots_init()
|