Lines Matching refs:port_matrix

284 tps23881_is_chan_free(struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS],  in tps23881_is_chan_free()
290 if (port_matrix[i].exist && in tps23881_is_chan_free()
291 (port_matrix[i].hw_chan[0] == chan || in tps23881_is_chan_free()
292 port_matrix[i].hw_chan[1] == chan)) in tps23881_is_chan_free()
303 struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS]) in tps23881_match_port_matrix()
314 if (!tps23881_is_chan_free(port_matrix, ret)) { in tps23881_match_port_matrix()
319 port_matrix[pi_id].hw_chan[0] = ret; in tps23881_match_port_matrix()
320 port_matrix[pi_id].exist = true; in tps23881_match_port_matrix()
329 if (!tps23881_is_chan_free(port_matrix, ret)) { in tps23881_match_port_matrix()
334 if (port_matrix[pi_id].hw_chan[0] / 4 != ret / 4) { in tps23881_match_port_matrix()
339 port_matrix[pi_id].hw_chan[1] = ret; in tps23881_match_port_matrix()
340 port_matrix[pi_id].is_4p = true; in tps23881_match_port_matrix()
346 tps23881_get_unused_chan(struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS], in tps23881_get_unused_chan()
356 if (port_matrix[j].hw_chan[0] == i) { in tps23881_get_unused_chan()
361 if (port_matrix[j].is_4p && in tps23881_get_unused_chan()
362 port_matrix[j].hw_chan[1] == i) { in tps23881_get_unused_chan()
383 tps23881_sort_port_matrix(struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS]) in tps23881_sort_port_matrix()
392 if (!port_matrix[i].exist || !port_matrix[i].is_4p) in tps23881_sort_port_matrix()
395 if (port_matrix[i].hw_chan[0] < 4) in tps23881_sort_port_matrix()
403 tmp_port_matrix[port_cnt].hw_chan[0] = port_matrix[i].hw_chan[0]; in tps23881_sort_port_matrix()
404 tmp_port_matrix[port_cnt].hw_chan[1] = port_matrix[i].hw_chan[1]; in tps23881_sort_port_matrix()
419 if (!port_matrix[i].exist || port_matrix[i].is_4p) in tps23881_sort_port_matrix()
422 if (port_matrix[i].hw_chan[0] < 4) in tps23881_sort_port_matrix()
430 tmp_port_matrix[port_cnt].hw_chan[0] = port_matrix[i].hw_chan[0]; in tps23881_sort_port_matrix()
475 memcpy(port_matrix, tmp_port_matrix, sizeof(tmp_port_matrix)); in tps23881_sort_port_matrix()
485 struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS], in tps23881_write_port_matrix()
494 pi_id = port_matrix[i].pi_id; in tps23881_write_port_matrix()
495 lgcl_chan = port_matrix[i].lgcl_chan[0]; in tps23881_write_port_matrix()
496 hw_chan = port_matrix[i].hw_chan[0] % 4; in tps23881_write_port_matrix()
499 if (port_matrix[i].exist) in tps23881_write_port_matrix()
505 if (!port_matrix[i].is_4p) in tps23881_write_port_matrix()
508 lgcl_chan = port_matrix[i].lgcl_chan[1]; in tps23881_write_port_matrix()
509 hw_chan = port_matrix[i].hw_chan[1] % 4; in tps23881_write_port_matrix()
512 if (port_matrix[i].exist) { in tps23881_write_port_matrix()
531 struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS]) in tps23881_set_ports_conf()
551 if (!port_matrix[i].exist) in tps23881_set_ports_conf()
554 if (port_matrix[i].is_4p) in tps23881_set_ports_conf()
555 val |= 0xf << ((port_matrix[i].lgcl_chan[0] / 2) * 4); in tps23881_set_ports_conf()
557 val |= 0x3 << ((port_matrix[i].lgcl_chan[0] / 2) * 4); in tps23881_set_ports_conf()
566 if (!port_matrix[i].exist) in tps23881_set_ports_conf()
569 val |= BIT(port_matrix[i].lgcl_chan[0]) | in tps23881_set_ports_conf()
570 BIT(port_matrix[i].lgcl_chan[0] + 4); in tps23881_set_ports_conf()
571 if (port_matrix[i].is_4p) in tps23881_set_ports_conf()
572 val |= BIT(port_matrix[i].lgcl_chan[1]) | in tps23881_set_ports_conf()
573 BIT(port_matrix[i].lgcl_chan[1] + 4); in tps23881_set_ports_conf()
586 struct tps23881_port_matrix port_matrix[TPS23881_MAX_CHANS] = {0}; in tps23881_set_ports_matrix() local
592 chan_node, port_matrix); in tps23881_set_ports_matrix()
597 ret = tps23881_sort_port_matrix(port_matrix); in tps23881_set_ports_matrix()
601 ret = tps23881_write_port_matrix(priv, port_matrix, ret); in tps23881_set_ports_matrix()
605 ret = tps23881_set_ports_conf(priv, port_matrix); in tps23881_set_ports_matrix()