Lines Matching refs:i2c_dev
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
1075 struct smb_reg *const inst = HAL_I2C_INSTANCE(i2c_dev); in npcx_i2c_ctrl_target_register()
1076 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_target_register()
1094 i2c_ctrl_irq_enable(i2c_dev, 0); in npcx_i2c_ctrl_target_register()
1102 i2c_ctrl_bank_sel(i2c_dev, NPCX_I2C_BANK_NORMAL); in npcx_i2c_ctrl_target_register()
1108 i2c_ctrl_irq_enable(i2c_dev, 1); in npcx_i2c_ctrl_target_register()
1113 int npcx_i2c_ctrl_target_unregister(const struct device *i2c_dev, in npcx_i2c_ctrl_target_unregister() argument
1116 struct smb_reg *const inst = HAL_I2C_INSTANCE(i2c_dev); in npcx_i2c_ctrl_target_unregister()
1117 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_target_unregister()
1130 i2c_ctrl_irq_enable(i2c_dev, 0); in npcx_i2c_ctrl_target_unregister()
1138 i2c_ctrl_bank_sel(i2c_dev, NPCX_I2C_BANK_FIFO); in npcx_i2c_ctrl_target_unregister()
1142 i2c_ctrl_irq_enable(i2c_dev, 1); in npcx_i2c_ctrl_target_unregister()
1151 int npcx_i2c_ctrl_transfer(const struct device *i2c_dev, struct i2c_msg *msgs, in npcx_i2c_ctrl_transfer() argument
1154 struct i2c_ctrl_data *const data = i2c_dev->data; in npcx_i2c_ctrl_transfer()
1174 if (i2c_ctrl_bus_busy(i2c_dev) || !i2c_ctrl_is_scl_sda_both_high(i2c_dev) || in npcx_i2c_ctrl_transfer()
1176 ret = npcx_i2c_ctrl_recover_bus(i2c_dev); in npcx_i2c_ctrl_transfer()
1182 ret = i2c_ctrl_recovery(i2c_dev); in npcx_i2c_ctrl_transfer()
1207 ret = i2c_ctrl_proc_write_msg(i2c_dev, msg); in npcx_i2c_ctrl_transfer()
1209 ret = i2c_ctrl_proc_read_msg(i2c_dev, msg); in npcx_i2c_ctrl_transfer()
1218 data->trans_err = i2c_ctrl_wait_stop_completed(i2c_dev, in npcx_i2c_ctrl_transfer()
1230 int recovery_error = i2c_ctrl_recovery(i2c_dev); in npcx_i2c_ctrl_transfer()