Lines Matching full:i2s
3 // loongson_i2s_pci.c -- Loongson I2S controller driver
79 struct loongson_i2s *i2s; in loongson_i2s_pci_probe() local
87 i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL); in loongson_i2s_pci_probe()
88 if (!i2s) in loongson_i2s_pci_probe()
91 i2s->rev_id = pdev->revision; in loongson_i2s_pci_probe()
92 i2s->dev = dev; in loongson_i2s_pci_probe()
93 pci_set_drvdata(pdev, i2s); in loongson_i2s_pci_probe()
101 i2s->reg_base = pcim_iomap_table(pdev)[0]; in loongson_i2s_pci_probe()
102 i2s->regmap = devm_regmap_init_mmio(dev, i2s->reg_base, in loongson_i2s_pci_probe()
104 if (IS_ERR(i2s->regmap)) in loongson_i2s_pci_probe()
105 return dev_err_probe(dev, PTR_ERR(i2s->regmap), "regmap_init_mmio failed\n"); in loongson_i2s_pci_probe()
107 tx_data = &i2s->tx_dma_data; in loongson_i2s_pci_probe()
108 rx_data = &i2s->rx_dma_data; in loongson_i2s_pci_probe()
111 tx_data->order_addr = i2s->reg_base + LS_I2S_TX_ORDER; in loongson_i2s_pci_probe()
114 rx_data->order_addr = i2s->reg_base + LS_I2S_RX_ORDER; in loongson_i2s_pci_probe()
124 ret = device_property_read_u32(dev, "clock-frequency", &i2s->clk_rate); in loongson_i2s_pci_probe()
130 if (i2s->rev_id == 1) { in loongson_i2s_pci_probe()
131 regmap_write(i2s->regmap, LS_I2S_CTRL, I2S_CTRL_RESET); in loongson_i2s_pci_probe()
150 .name = "loongson-i2s-pci",
159 MODULE_DESCRIPTION("Loongson I2S Master Mode ASoC Driver");