Lines Matching full:pdi

387 	/* number of PDI and ports is interchangeable */  in cdns_reg_show()
549 debugfs_create_file("cdns-pdi-loopback-source", 0200, root, cdns, in sdw_cdns_debugfs_init()
552 debugfs_create_file("cdns-pdi-loopback-target", 0200, root, cdns, in sdw_cdns_debugfs_init()
1272 struct sdw_cdns_pdi *pdi; in cdns_allocate_pdi() local
1278 pdi = devm_kcalloc(cdns->dev, num, sizeof(*pdi), GFP_KERNEL); in cdns_allocate_pdi()
1279 if (!pdi) in cdns_allocate_pdi()
1283 pdi[i].num = i + pdi_offset; in cdns_allocate_pdi()
1286 *stream = pdi; in cdns_allocate_pdi()
1291 * sdw_cdns_pdi_init() - PDI initialization routine
1837 * cdns_find_pdi() - Find a free PDI
1842 * @pdi: PDI instances
1845 * Find a PDI for a given PDI array. The PDI num and dai_id are
1851 struct sdw_cdns_pdi *pdi, in cdns_find_pdi() argument
1857 if (pdi[i].num == dai_id) in cdns_find_pdi()
1858 return &pdi[i]; in cdns_find_pdi()
1869 * @pdi: PDI to be used
1872 u32 ch, u32 dir, struct sdw_cdns_pdi *pdi) in sdw_cdns_config_stream() argument
1882 offset = CDNS_PORTCTRL + pdi->num * CDNS_PORT_OFFSET; in sdw_cdns_config_stream()
1887 val = pdi->num; in sdw_cdns_config_stream()
1890 cdns_writel(cdns, CDNS_PDI_CONFIG(pdi->num), val); in sdw_cdns_config_stream()
1895 * sdw_cdns_alloc_pdi() - Allocate a PDI
1907 struct sdw_cdns_pdi *pdi = NULL; in sdw_cdns_alloc_pdi() local
1910 pdi = cdns_find_pdi(cdns, 0, stream->num_in, stream->in, in sdw_cdns_alloc_pdi()
1913 pdi = cdns_find_pdi(cdns, 0, stream->num_out, stream->out, in sdw_cdns_alloc_pdi()
1916 /* check if we found a PDI, else find in bi-directional */ in sdw_cdns_alloc_pdi()
1917 if (!pdi) in sdw_cdns_alloc_pdi()
1918 pdi = cdns_find_pdi(cdns, 0, stream->num_bd, stream->bd, in sdw_cdns_alloc_pdi()
1921 if (pdi) { in sdw_cdns_alloc_pdi()
1922 pdi->l_ch_num = 0; in sdw_cdns_alloc_pdi()
1923 pdi->h_ch_num = ch - 1; in sdw_cdns_alloc_pdi()
1924 pdi->dir = dir; in sdw_cdns_alloc_pdi()
1925 pdi->ch_count = ch; in sdw_cdns_alloc_pdi()
1928 return pdi; in sdw_cdns_alloc_pdi()