Lines Matching +full:i2c +full:- +full:conversion
5 * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/drivers/i2c.h>
19 struct i2c_dt_spec i2c; member
28 if (channel_cfg->channel_id != 0) { in ltc2451_channel_setup()
29 LOG_ERR("Invalid channel id '%d'", channel_cfg->channel_id); in ltc2451_channel_setup()
30 return -EINVAL; in ltc2451_channel_setup()
38 const struct ltc2451_config *config = dev->config; in ltc2451_set_conversion_speed()
47 LOG_ERR("Invalid conversion speed selected"); in ltc2451_set_conversion_speed()
48 return -EINVAL; in ltc2451_set_conversion_speed()
51 err = i2c_write_dt(&config->i2c, wr_buf, sizeof(wr_buf)); in ltc2451_set_conversion_speed()
63 const struct ltc2451_config *config = dev->config; in ltc2451_read_latest_conversion()
66 int err = i2c_read_dt(&config->i2c, rd_buf, sizeof(rd_buf)); in ltc2451_read_latest_conversion()
69 value_buf = (uint16_t *)sequence->buffer; in ltc2451_read_latest_conversion()
80 const struct ltc2451_config *config = dev->config; in ltc2451_init()
82 if (!device_is_ready(config->i2c.bus)) { in ltc2451_init()
83 LOG_ERR("I2C device not ready"); in ltc2451_init()
84 return -ENODEV; in ltc2451_init()
87 return ltc2451_set_conversion_speed(dev, config->conversion_speed); in ltc2451_init()
97 .i2c = I2C_DT_SPEC_INST_GET(index), \