Lines Matching refs:s_rt

125 					 struct sdw_slave_runtime *s_rt,  in sdw_program_slave_port_params()  argument
130 struct sdw_slave_prop *slave_prop = &s_rt->slave->prop; in sdw_program_slave_port_params()
136 dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave, in sdw_program_slave_port_params()
137 s_rt->direction, in sdw_program_slave_port_params()
162 ret = sdw_update(s_rt->slave, addr1, 0xF, wbuf); in sdw_program_slave_port_params()
164 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
172 ret = sdw_write(s_rt->slave, addr2, (p_params->bps - 1)); in sdw_program_slave_port_params()
174 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
183 ret = sdw_write(s_rt->slave, addr3, wbuf); in sdw_program_slave_port_params()
185 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
192 ret = sdw_write(s_rt->slave, addr4, t_params->offset1); in sdw_program_slave_port_params()
194 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
202 ret = sdw_write(s_rt->slave, addr5, t_params->blk_grp_ctrl); in sdw_program_slave_port_params()
204 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
213 ret = sdw_write(s_rt->slave, addr6, t_params->lane_ctrl); in sdw_program_slave_port_params()
215 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
223 ret = _sdw_program_slave_port_params(bus, s_rt->slave, in sdw_program_slave_port_params()
226 dev_err(&s_rt->slave->dev, in sdw_program_slave_port_params()
264 struct sdw_slave_runtime *s_rt = NULL; in sdw_program_port_params() local
270 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_program_port_params()
271 list_for_each_entry(p_rt, &s_rt->port_list, port_node) { in sdw_program_port_params()
272 ret = sdw_program_slave_port_params(bus, s_rt, p_rt); in sdw_program_port_params()
300 struct sdw_slave_runtime *s_rt, in sdw_enable_disable_slave_ports() argument
318 ret = sdw_write(s_rt->slave, addr, p_rt->ch_mask); in sdw_enable_disable_slave_ports()
320 ret = sdw_write(s_rt->slave, addr, 0x0); in sdw_enable_disable_slave_ports()
323 dev_err(&s_rt->slave->dev, in sdw_enable_disable_slave_ports()
374 struct sdw_slave_runtime *s_rt; in sdw_enable_disable_ports() local
378 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_enable_disable_ports()
379 list_for_each_entry(s_port, &s_rt->port_list, port_node) { in sdw_enable_disable_ports()
380 ret = sdw_enable_disable_slave_ports(m_rt->bus, s_rt, in sdw_enable_disable_ports()
397 static int sdw_do_port_prep(struct sdw_slave_runtime *s_rt, in sdw_do_port_prep() argument
401 const struct sdw_slave_ops *ops = s_rt->slave->ops; in sdw_do_port_prep()
405 ret = ops->port_prep(s_rt->slave, &prep_ch, cmd); in sdw_do_port_prep()
407 dev_err(&s_rt->slave->dev, in sdw_do_port_prep()
418 struct sdw_slave_runtime *s_rt, in sdw_prep_deprep_slave_ports() argument
433 dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave, in sdw_prep_deprep_slave_ports()
434 s_rt->direction, in sdw_prep_deprep_slave_ports()
456 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
463 sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_PRE_PREP); in sdw_prep_deprep_slave_ports()
470 ret = sdw_write(s_rt->slave, addr, p_rt->ch_mask); in sdw_prep_deprep_slave_ports()
472 ret = sdw_write(s_rt->slave, addr, 0x0); in sdw_prep_deprep_slave_ports()
475 dev_err(&s_rt->slave->dev, in sdw_prep_deprep_slave_ports()
481 port_ready = &s_rt->slave->port_ready[prep_ch.num]; in sdw_prep_deprep_slave_ports()
485 val = sdw_read(s_rt->slave, SDW_DPN_PREPARESTATUS(p_rt->num)); in sdw_prep_deprep_slave_ports()
488 dev_err(&s_rt->slave->dev, in sdw_prep_deprep_slave_ports()
495 sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_POST_PREP); in sdw_prep_deprep_slave_ports()
499 ret = sdw_configure_dpn_intr(s_rt->slave, p_rt->num, prep, in sdw_prep_deprep_slave_ports()
542 struct sdw_slave_runtime *s_rt; in sdw_prep_deprep_ports() local
547 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_prep_deprep_ports()
548 list_for_each_entry(p_rt, &s_rt->port_list, port_node) { in sdw_prep_deprep_ports()
549 ret = sdw_prep_deprep_slave_ports(m_rt->bus, s_rt, in sdw_prep_deprep_ports()
576 struct sdw_slave_runtime *s_rt; in sdw_notify_config() local
587 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_notify_config()
588 slave = s_rt->slave; in sdw_notify_config()
978 struct sdw_slave_runtime *s_rt; in sdw_alloc_slave_rt() local
980 s_rt = kzalloc(sizeof(*s_rt), GFP_KERNEL); in sdw_alloc_slave_rt()
981 if (!s_rt) in sdw_alloc_slave_rt()
984 INIT_LIST_HEAD(&s_rt->port_list); in sdw_alloc_slave_rt()
985 s_rt->ch_count = stream_config->ch_count; in sdw_alloc_slave_rt()
986 s_rt->direction = stream_config->direction; in sdw_alloc_slave_rt()
987 s_rt->slave = slave; in sdw_alloc_slave_rt()
989 return s_rt; in sdw_alloc_slave_rt()
1009 struct sdw_slave_runtime *s_rt; in sdw_slave_port_release() local
1012 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_slave_port_release()
1013 if (s_rt->slave != slave) in sdw_slave_port_release()
1017 &s_rt->port_list, port_node) { in sdw_slave_port_release()
1036 struct sdw_slave_runtime *s_rt, *_s_rt; in sdw_release_slave_stream() local
1041 list_for_each_entry_safe(s_rt, _s_rt, in sdw_release_slave_stream()
1043 if (s_rt->slave == slave) { in sdw_release_slave_stream()
1044 list_del(&s_rt->m_rt_node); in sdw_release_slave_stream()
1045 kfree(s_rt); in sdw_release_slave_stream()
1066 struct sdw_slave_runtime *s_rt, *_s_rt; in sdw_release_master_stream() local
1068 list_for_each_entry_safe(s_rt, _s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_release_master_stream()
1069 sdw_slave_port_release(s_rt->slave->bus, s_rt->slave, stream); in sdw_release_master_stream()
1070 sdw_release_slave_stream(s_rt->slave, stream); in sdw_release_master_stream()
1235 struct sdw_slave_runtime *s_rt, in sdw_slave_port_config() argument
1263 list_add_tail(&p_rt->port_node, &s_rt->port_list); in sdw_slave_port_config()
1349 struct sdw_slave_runtime *s_rt; in sdw_stream_add_slave() local
1368 s_rt = sdw_alloc_slave_rt(slave, stream_config, stream); in sdw_stream_add_slave()
1369 if (!s_rt) { in sdw_stream_add_slave()
1381 list_add_tail(&s_rt->m_rt_node, &m_rt->slave_rt_list); in sdw_stream_add_slave()
1383 ret = sdw_slave_port_config(slave, s_rt, port_config, num_ports); in sdw_stream_add_slave()