Lines Matching refs:s_rt

126 					 struct sdw_slave_runtime *s_rt,  in sdw_program_slave_port_params()  argument
131 struct sdw_slave_prop *slave_prop = &s_rt->slave->prop; in sdw_program_slave_port_params()
137 if (s_rt->slave->is_mockup_device) in sdw_program_slave_port_params()
140 dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave, in sdw_program_slave_port_params()
141 s_rt->direction, in sdw_program_slave_port_params()
166 ret = sdw_update_no_pm(s_rt->slave, addr1, 0xF, wbuf); in sdw_program_slave_port_params()
168 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
176 ret = sdw_write_no_pm(s_rt->slave, addr2, (p_params->bps - 1)); in sdw_program_slave_port_params()
178 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
187 ret = sdw_write_no_pm(s_rt->slave, addr3, wbuf); in sdw_program_slave_port_params()
189 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
196 ret = sdw_write_no_pm(s_rt->slave, addr4, t_params->offset1); in sdw_program_slave_port_params()
198 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
206 ret = sdw_write_no_pm(s_rt->slave, addr5, t_params->blk_grp_ctrl); in sdw_program_slave_port_params()
208 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
217 ret = sdw_write_no_pm(s_rt->slave, addr6, t_params->lane_ctrl); in sdw_program_slave_port_params()
219 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
227 ret = _sdw_program_slave_port_params(bus, s_rt->slave, in sdw_program_slave_port_params()
230 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
268 struct sdw_slave_runtime *s_rt; in sdw_program_port_params() local
274 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_program_port_params()
275 list_for_each_entry(p_rt, &s_rt->port_list, port_node) { in sdw_program_port_params()
276 ret = sdw_program_slave_port_params(bus, s_rt, p_rt); in sdw_program_port_params()
304 struct sdw_slave_runtime *s_rt, in sdw_enable_disable_slave_ports() argument
322 ret = sdw_write_no_pm(s_rt->slave, addr, p_rt->ch_mask); in sdw_enable_disable_slave_ports()
324 ret = sdw_write_no_pm(s_rt->slave, addr, 0x0); in sdw_enable_disable_slave_ports()
327 dev_err(&s_rt->slave->dev, in sdw_enable_disable_slave_ports()
378 struct sdw_slave_runtime *s_rt; in sdw_enable_disable_ports() local
382 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_enable_disable_ports()
383 list_for_each_entry(s_port, &s_rt->port_list, port_node) { in sdw_enable_disable_ports()
384 ret = sdw_enable_disable_slave_ports(m_rt->bus, s_rt, in sdw_enable_disable_ports()
401 static int sdw_do_port_prep(struct sdw_slave_runtime *s_rt, in sdw_do_port_prep() argument
406 struct sdw_slave *slave = s_rt->slave; in sdw_do_port_prep()
428 struct sdw_slave_runtime *s_rt, in sdw_prep_deprep_slave_ports() argument
442 dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave, in sdw_prep_deprep_slave_ports()
443 s_rt->direction, in sdw_prep_deprep_slave_ports()
465 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
472 sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_PRE_PREP : SDW_OPS_PORT_PRE_DEPREP); in sdw_prep_deprep_slave_ports()
479 ret = sdw_write_no_pm(s_rt->slave, addr, p_rt->ch_mask); in sdw_prep_deprep_slave_ports()
481 ret = sdw_write_no_pm(s_rt->slave, addr, 0x0); in sdw_prep_deprep_slave_ports()
484 dev_err(&s_rt->slave->dev, in sdw_prep_deprep_slave_ports()
490 port_ready = &s_rt->slave->port_ready[prep_ch.num]; in sdw_prep_deprep_slave_ports()
494 val = sdw_read_no_pm(s_rt->slave, SDW_DPN_PREPARESTATUS(p_rt->num)); in sdw_prep_deprep_slave_ports()
497 dev_err(&s_rt->slave->dev, in sdw_prep_deprep_slave_ports()
504 sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_POST_PREP : SDW_OPS_PORT_POST_DEPREP); in sdw_prep_deprep_slave_ports()
508 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
551 struct sdw_slave_runtime *s_rt; in sdw_prep_deprep_ports() local
556 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_prep_deprep_ports()
557 list_for_each_entry(p_rt, &s_rt->port_list, port_node) { in sdw_prep_deprep_ports()
558 ret = sdw_prep_deprep_slave_ports(m_rt->bus, s_rt, in sdw_prep_deprep_ports()
585 struct sdw_slave_runtime *s_rt; in sdw_notify_config() local
596 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_notify_config()
597 slave = s_rt->slave; in sdw_notify_config()
920 static bool sdw_slave_port_allocated(struct sdw_slave_runtime *s_rt) in sdw_slave_port_allocated() argument
922 return !list_empty(&s_rt->port_list); in sdw_slave_port_allocated()
930 struct sdw_slave_runtime *s_rt; in sdw_slave_port_free() local
933 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_slave_port_free()
934 if (s_rt->slave != slave) in sdw_slave_port_free()
938 &s_rt->port_list, port_node) { in sdw_slave_port_free()
946 struct sdw_slave_runtime *s_rt, in sdw_slave_port_alloc() argument
954 p_rt = sdw_port_alloc(&s_rt->port_list); in sdw_slave_port_alloc()
973 struct sdw_slave_runtime *s_rt, in sdw_slave_port_config() argument
981 list_for_each_entry(p_rt, &s_rt->port_list, port_node) { in sdw_slave_port_config()
1059 struct sdw_slave_runtime *s_rt; in sdw_slave_rt_alloc() local
1061 s_rt = kzalloc(sizeof(*s_rt), GFP_KERNEL); in sdw_slave_rt_alloc()
1062 if (!s_rt) in sdw_slave_rt_alloc()
1065 INIT_LIST_HEAD(&s_rt->port_list); in sdw_slave_rt_alloc()
1066 s_rt->slave = slave; in sdw_slave_rt_alloc()
1068 list_add_tail(&s_rt->m_rt_node, &m_rt->slave_rt_list); in sdw_slave_rt_alloc()
1070 return s_rt; in sdw_slave_rt_alloc()
1081 static int sdw_slave_rt_config(struct sdw_slave_runtime *s_rt, in sdw_slave_rt_config() argument
1084 s_rt->ch_count = stream_config->ch_count; in sdw_slave_rt_config()
1085 s_rt->direction = stream_config->direction; in sdw_slave_rt_config()
1093 struct sdw_slave_runtime *s_rt, *_s_rt; in sdw_slave_rt_find() local
1098 list_for_each_entry_safe(s_rt, _s_rt, in sdw_slave_rt_find()
1100 if (s_rt->slave == slave) in sdw_slave_rt_find()
1101 return s_rt; in sdw_slave_rt_find()
1118 struct sdw_slave_runtime *s_rt; in sdw_slave_rt_free() local
1120 s_rt = sdw_slave_rt_find(slave, stream); in sdw_slave_rt_free()
1121 if (s_rt) { in sdw_slave_rt_free()
1122 list_del(&s_rt->m_rt_node); in sdw_slave_rt_free()
1123 kfree(s_rt); in sdw_slave_rt_free()
1221 struct sdw_slave_runtime *s_rt, *_s_rt; in sdw_master_rt_free() local
1224 list_for_each_entry_safe(s_rt, _s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_master_rt_free()
1225 sdw_slave_port_free(s_rt->slave, stream); in sdw_master_rt_free()
1226 sdw_slave_rt_free(s_rt->slave, stream); in sdw_master_rt_free()
1994 struct sdw_slave_runtime *s_rt; in sdw_stream_add_slave() local
2024 s_rt = sdw_slave_rt_find(slave, stream); in sdw_stream_add_slave()
2025 if (!s_rt) { in sdw_stream_add_slave()
2026 s_rt = sdw_slave_rt_alloc(slave, m_rt); in sdw_stream_add_slave()
2027 if (!s_rt) { in sdw_stream_add_slave()
2037 if (!sdw_slave_port_allocated(s_rt)) { in sdw_stream_add_slave()
2038 ret = sdw_slave_port_alloc(slave, s_rt, num_ports); in sdw_stream_add_slave()
2047 ret = sdw_slave_rt_config(s_rt, stream_config); in sdw_stream_add_slave()
2055 ret = sdw_slave_port_config(slave, s_rt, port_config); in sdw_stream_add_slave()