Lines Matching refs:config

57 	const struct i2c_npcx_port_config *const config = dev->config;  in i2c_npcx_port_configure()  local
59 if (config->i2c_ctrl == NULL) { in i2c_npcx_port_configure()
61 config->port); in i2c_npcx_port_configure()
74 return npcx_i2c_ctrl_configure(config->i2c_ctrl, dev_config); in i2c_npcx_port_configure()
79 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_port_get_config() local
83 if (config->i2c_ctrl == NULL) { in i2c_npcx_port_get_config()
84 LOG_ERR("Cannot find i2c controller on port%02x!", config->port); in i2c_npcx_port_get_config()
88 ret = npcx_i2c_ctrl_get_speed(config->i2c_ctrl, &speed); in i2c_npcx_port_get_config()
99 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_port_transfer() local
101 int idx_ctrl = (config->port & 0xF0) >> 4; in i2c_npcx_port_transfer()
102 int idx_port = (config->port & 0x0F); in i2c_npcx_port_transfer()
104 if (config->i2c_ctrl == NULL) { in i2c_npcx_port_transfer()
106 config->port); in i2c_npcx_port_transfer()
111 npcx_i2c_ctrl_mutex_lock(config->i2c_ctrl); in i2c_npcx_port_transfer()
117 ret = npcx_i2c_ctrl_transfer(config->i2c_ctrl, msgs, num_msgs, addr, in i2c_npcx_port_transfer()
118 config->port); in i2c_npcx_port_transfer()
121 npcx_i2c_ctrl_mutex_unlock(config->i2c_ctrl); in i2c_npcx_port_transfer()
127 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_port_recover_bus() local
130 if (config->i2c_ctrl == NULL) { in i2c_npcx_port_recover_bus()
131 LOG_ERR("Cannot find i2c controller on port%02x!", config->port); in i2c_npcx_port_recover_bus()
136 npcx_i2c_ctrl_mutex_lock(config->i2c_ctrl); in i2c_npcx_port_recover_bus()
138 ret = npcx_i2c_ctrl_recover_bus(config->i2c_ctrl); in i2c_npcx_port_recover_bus()
141 npcx_i2c_ctrl_mutex_unlock(config->i2c_ctrl); in i2c_npcx_port_recover_bus()
150 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_target_register() local
156 if (config->i2c_ctrl == NULL) { in i2c_npcx_target_register()
157 LOG_ERR("Cannot find i2c controller on port%02x!", config->port); in i2c_npcx_target_register()
161 return npcx_i2c_ctrl_target_register(config->i2c_ctrl, target_cfg, config->port); in i2c_npcx_target_register()
167 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_target_unregister() local
169 if (config->i2c_ctrl == NULL) { in i2c_npcx_target_unregister()
170 LOG_ERR("Cannot find i2c controller on port%02x!", config->port); in i2c_npcx_target_unregister()
174 return npcx_i2c_ctrl_target_unregister(config->i2c_ctrl, target_cfg); in i2c_npcx_target_unregister()
181 const struct i2c_npcx_port_config *const config = dev->config; in i2c_npcx_port_init() local
186 ret = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); in i2c_npcx_port_init()
194 i2c_config = (I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_npcx_port_init()