i2s 282 drivers/bcma/driver_mips.c struct bcma_device *cpu, *pcie, *i2s; i2s 293 drivers/bcma/driver_mips.c i2s = bcma_find_core(bus, BCMA_CORE_I2S); i2s 294 drivers/bcma/driver_mips.c if (cpu && pcie && i2s && i2s 297 drivers/bcma/driver_mips.c bcma_aread32(i2s, BCMA_MIPS_OOBSELOUTA30) == 0x88) { i2s 300 drivers/bcma/driver_mips.c bcma_awrite32(i2s, BCMA_MIPS_OOBSELOUTA30, 0x87); i2s 215 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c .i2s = 1, i2s 742 drivers/gpu/drm/bridge/sii902x.c .i2s = 1, /* Only i2s support for now. */ i2s 169 drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c pdata.i2s = 1; i2s 1646 drivers/gpu/drm/exynos/exynos_hdmi.c .i2s = 1, i2s 1175 drivers/gpu/drm/i2c/tda998x_drv.c codec_data.i2s = 1; i2s 1663 drivers/gpu/drm/mediatek/mtk_hdmi.c .i2s = 1, i2s 520 drivers/gpu/drm/msm/hdmi/hdmi.c .i2s = 1, i2s 863 drivers/gpu/drm/rockchip/cdn-dp-core.c .i2s = 1, i2s 1234 drivers/gpu/drm/sti/sti_hdmi.c .i2s = 1, i2s 61 drivers/macintosh/rack-meter.c struct device_node *i2s; i2s 106 drivers/macintosh/rack-meter.c pmac_call_feature(PMAC_FTR_SOUND_CHIP_ENABLE, rm->i2s, 0, 1); i2s 369 drivers/macintosh/rack-meter.c struct device_node *i2s = NULL, *np = NULL; i2s 377 drivers/macintosh/rack-meter.c for_each_child_of_node(mdev->ofdev.dev.of_node, i2s) i2s 378 drivers/macintosh/rack-meter.c if (of_node_name_eq(i2s, "i2s-a")) i2s 381 drivers/macintosh/rack-meter.c if (i2s == NULL) { i2s 386 drivers/macintosh/rack-meter.c for_each_child_of_node(i2s, np) { i2s 406 drivers/macintosh/rack-meter.c rm->i2s = i2s; i2s 428 drivers/macintosh/rack-meter.c rm->irq = irq_of_parse_and_map(i2s, 1); i2s 430 drivers/macintosh/rack-meter.c of_address_to_resource(i2s, 0, &ri2s) || i2s 431 drivers/macintosh/rack-meter.c of_address_to_resource(i2s, 1, &rdma)) { i2s 520 drivers/macintosh/rack-meter.c of_node_put(i2s); i2s 632 drivers/media/pci/ngene/ngene-core.c 4 * dev->card_info->i2s[stream], 4); i2s 858 drivers/media/pci/ngene/ngene.h u8 i2s[4]; i2s 1050 drivers/pinctrl/meson/pinctrl-meson8.c FUNCTION(i2s), i2s 907 drivers/pinctrl/meson/pinctrl-meson8b.c FUNCTION(i2s), i2s 759 drivers/pinctrl/qcom/pinctrl-msm8660.c FUNCTION(i2s), i2s 889 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(108, i2s, _, _, _, _, _, _), i2s 890 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(109, i2s, _, _, _, _, _, _), i2s 891 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(110, i2s, _, _, _, _, _, _), i2s 896 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(115, i2s, gsbi12, gp_clk_0b, _, _, _, _), i2s 897 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(116, i2s, gsbi12, _, _, _, _, _), i2s 898 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(117, i2s, gsbi12, vfe, _, _, _, _), i2s 899 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(118, i2s, gsbi12, _, _, _, _, _), i2s 900 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(119, i2s, _, _, _, _, _, _), i2s 901 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(120, i2s, _, _, _, _, _, _), i2s 902 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(121, i2s, _, _, _, _, _, _), i2s 903 drivers/pinctrl/qcom/pinctrl-msm8660.c PINGROUP(122, i2s, gp_clk_1b, _, _, _, _, _), i2s 107 include/sound/hdmi-codec.h uint i2s:1; i2s 60 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 83 sound/soc/adi/axi-i2s.c regmap_update_bits(i2s->regmap, AXI_I2S_REG_CTRL, mask, val); i2s 91 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 98 sound/soc/adi/axi-i2s.c bclk_div = DIV_ROUND_UP(clk_get_rate(i2s->clk_ref), bclk_rate) / 2 - 1; i2s 100 sound/soc/adi/axi-i2s.c regmap_write(i2s->regmap, AXI_I2S_REG_CLK_CTRL, (word_size << 16) | i2s 109 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 118 sound/soc/adi/axi-i2s.c regmap_write(i2s->regmap, AXI_I2S_REG_RESET, mask); i2s 122 sound/soc/adi/axi-i2s.c &i2s->rate_constraints); i2s 126 sound/soc/adi/axi-i2s.c return clk_prepare_enable(i2s->clk_ref); i2s 132 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 134 sound/soc/adi/axi-i2s.c clk_disable_unprepare(i2s->clk_ref); i2s 139 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 143 sound/soc/adi/axi-i2s.c i2s->has_playback ? &i2s->playback_dma_data : NULL, i2s 144 sound/soc/adi/axi-i2s.c i2s->has_capture ? &i2s->capture_dma_data : NULL); i2s 173 sound/soc/adi/axi-i2s.c static void axi_i2s_parse_of(struct axi_i2s *i2s, const struct device_node *np) i2s 180 sound/soc/adi/axi-i2s.c i2s->has_capture = true; i2s 182 sound/soc/adi/axi-i2s.c i2s->has_playback = true; i2s 189 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s; i2s 193 sound/soc/adi/axi-i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 194 sound/soc/adi/axi-i2s.c if (!i2s) i2s 197 sound/soc/adi/axi-i2s.c platform_set_drvdata(pdev, i2s); i2s 199 sound/soc/adi/axi-i2s.c axi_i2s_parse_of(i2s, pdev->dev.of_node); i2s 206 sound/soc/adi/axi-i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, base, i2s 208 sound/soc/adi/axi-i2s.c if (IS_ERR(i2s->regmap)) i2s 209 sound/soc/adi/axi-i2s.c return PTR_ERR(i2s->regmap); i2s 211 sound/soc/adi/axi-i2s.c i2s->clk = devm_clk_get(&pdev->dev, "axi"); i2s 212 sound/soc/adi/axi-i2s.c if (IS_ERR(i2s->clk)) i2s 213 sound/soc/adi/axi-i2s.c return PTR_ERR(i2s->clk); i2s 215 sound/soc/adi/axi-i2s.c i2s->clk_ref = devm_clk_get(&pdev->dev, "ref"); i2s 216 sound/soc/adi/axi-i2s.c if (IS_ERR(i2s->clk_ref)) i2s 217 sound/soc/adi/axi-i2s.c return PTR_ERR(i2s->clk_ref); i2s 219 sound/soc/adi/axi-i2s.c ret = clk_prepare_enable(i2s->clk); i2s 223 sound/soc/adi/axi-i2s.c if (i2s->has_playback) { i2s 230 sound/soc/adi/axi-i2s.c i2s->playback_dma_data.addr = res->start + AXI_I2S_REG_TX_FIFO; i2s 231 sound/soc/adi/axi-i2s.c i2s->playback_dma_data.addr_width = 4; i2s 232 sound/soc/adi/axi-i2s.c i2s->playback_dma_data.maxburst = 1; i2s 235 sound/soc/adi/axi-i2s.c if (i2s->has_capture) { i2s 242 sound/soc/adi/axi-i2s.c i2s->capture_dma_data.addr = res->start + AXI_I2S_REG_RX_FIFO; i2s 243 sound/soc/adi/axi-i2s.c i2s->capture_dma_data.addr_width = 4; i2s 244 sound/soc/adi/axi-i2s.c i2s->capture_dma_data.maxburst = 1; i2s 247 sound/soc/adi/axi-i2s.c i2s->ratnum.num = clk_get_rate(i2s->clk_ref) / 2 / AXI_I2S_BITS_PER_FRAME; i2s 248 sound/soc/adi/axi-i2s.c i2s->ratnum.den_step = 1; i2s 249 sound/soc/adi/axi-i2s.c i2s->ratnum.den_min = 1; i2s 250 sound/soc/adi/axi-i2s.c i2s->ratnum.den_max = 64; i2s 252 sound/soc/adi/axi-i2s.c i2s->rate_constraints.rats = &i2s->ratnum; i2s 253 sound/soc/adi/axi-i2s.c i2s->rate_constraints.nrats = 1; i2s 255 sound/soc/adi/axi-i2s.c regmap_write(i2s->regmap, AXI_I2S_REG_RESET, AXI_I2S_RESET_GLOBAL); i2s 267 sound/soc/adi/axi-i2s.c i2s->has_capture ? "enabled" : "disabled", i2s 268 sound/soc/adi/axi-i2s.c i2s->has_playback ? "enabled" : "disabled"); i2s 273 sound/soc/adi/axi-i2s.c clk_disable_unprepare(i2s->clk); i2s 279 sound/soc/adi/axi-i2s.c struct axi_i2s *i2s = platform_get_drvdata(pdev); i2s 281 sound/soc/adi/axi-i2s.c clk_disable_unprepare(i2s->clk); i2s 802 sound/soc/codecs/hdmi-codec.c dai_count = hcd->i2s + hcd->spdif; i2s 818 sound/soc/codecs/hdmi-codec.c if (hcd->i2s) { i2s 81 sound/soc/hisilicon/hi6210-i2s.c static inline void hi6210_write_reg(struct hi6210_i2s *i2s, int reg, u32 val) i2s 83 sound/soc/hisilicon/hi6210-i2s.c writel(val, i2s->base + reg); i2s 86 sound/soc/hisilicon/hi6210-i2s.c static inline u32 hi6210_read_reg(struct hi6210_i2s *i2s, int reg) i2s 88 sound/soc/hisilicon/hi6210-i2s.c return readl(i2s->base + reg); i2s 94 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 99 sound/soc/hisilicon/hi6210-i2s.c regmap_read(i2s->sysctrl, SC_PERIPH_RSTSTAT2, &val); i2s 101 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_RSTDIS2, BIT(4)); i2s 103 sound/soc/hisilicon/hi6210-i2s.c for (n = 0; n < i2s->clocks; n++) { i2s 104 sound/soc/hisilicon/hi6210-i2s.c ret = clk_prepare_enable(i2s->clk[n]); i2s 107 sound/soc/hisilicon/hi6210-i2s.c clk_disable_unprepare(i2s->clk[n]); i2s 112 sound/soc/hisilicon/hi6210-i2s.c ret = clk_set_rate(i2s->clk[CLK_I2S_BASE], 49152000); i2s 114 sound/soc/hisilicon/hi6210-i2s.c dev_err(i2s->dev, "%s: setting 49.152MHz base rate failed %d\n", i2s 120 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_CLKEN12, BIT(9)); i2s 123 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_CLKEN1, BIT(5)); i2s 126 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_RSTEN1, BIT(5)); i2s 127 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_RSTDIS1, BIT(5)); i2s 130 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_CODEC_IRQ_MASK); i2s 132 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_CODEC_IRQ_MASK, val); i2s 136 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_APB_AFIFO_CFG_1); i2s 138 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_APB_AFIFO_CFG_1, val); i2s 140 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_APB_AFIFO_CFG_1); i2s 142 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_APB_AFIFO_CFG_1, val); i2s 145 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_SW_RST_N); i2s 149 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_SW_RST_N, val); i2s 151 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_MISC_CFG); i2s 161 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_MISC_CFG, val); i2s 163 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_SW_RST_N); i2s 165 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_SW_RST_N, val); i2s 173 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 176 sound/soc/hisilicon/hi6210-i2s.c for (n = 0; n < i2s->clocks; n++) i2s 177 sound/soc/hisilicon/hi6210-i2s.c clk_disable_unprepare(i2s->clk[n]); i2s 179 sound/soc/hisilicon/hi6210-i2s.c regmap_write(i2s->sysctrl, SC_PERIPH_RSTEN1, BIT(5)); i2s 184 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 187 sound/soc/hisilicon/hi6210-i2s.c spin_lock(&i2s->lock); i2s 190 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 192 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 195 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 197 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 199 sound/soc/hisilicon/hi6210-i2s.c spin_unlock(&i2s->lock); i2s 204 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 207 sound/soc/hisilicon/hi6210-i2s.c spin_lock(&i2s->lock); i2s 209 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 211 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 213 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 215 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 217 sound/soc/hisilicon/hi6210-i2s.c spin_unlock(&i2s->lock); i2s 222 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 245 sound/soc/hisilicon/hi6210-i2s.c i2s->format = fmt; i2s 246 sound/soc/hisilicon/hi6210-i2s.c i2s->master = (i2s->format & SND_SOC_DAIFMT_MASTER_MASK) == i2s 256 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); i2s 313 sound/soc/hisilicon/hi6210-i2s.c i2s->bits = 32; i2s 317 sound/soc/hisilicon/hi6210-i2s.c i2s->bits = 16; i2s 321 sound/soc/hisilicon/hi6210-i2s.c i2s->rate = params_rate(params); i2s 322 sound/soc/hisilicon/hi6210-i2s.c i2s->channels = params_channels(params); i2s 323 sound/soc/hisilicon/hi6210-i2s.c i2s->channel_length = i2s->channels * i2s->bits; i2s 325 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_ST_DL_FIFO_TH_CFG); i2s 338 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_ST_DL_FIFO_TH_CFG, val); i2s 341 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_IF_CLK_EN_CFG); i2s 348 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_IF_CLK_EN_CFG, val); i2s 351 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_DIG_FILTER_CLK_EN_CFG); i2s 360 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_DIG_FILTER_CLK_EN_CFG, val); i2s 363 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_DIG_FILTER_MODULE_CFG); i2s 366 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_DIG_FILTER_MODULE_CFG, val); i2s 368 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_MUX_TOP_MODULE_CFG); i2s 373 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_MUX_TOP_MODULE_CFG, val); i2s 376 sound/soc/hisilicon/hi6210-i2s.c switch (i2s->format & SND_SOC_DAIFMT_MASTER_MASK) { i2s 378 sound/soc/hisilicon/hi6210-i2s.c i2s->master = false; i2s 379 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 381 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 384 sound/soc/hisilicon/hi6210-i2s.c i2s->master = true; i2s 385 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 387 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 394 sound/soc/hisilicon/hi6210-i2s.c switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { i2s 409 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 413 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 416 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_CLK_SEL); i2s 419 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_CLK_SEL, val); i2s 424 sound/soc/hisilicon/hi6210-i2s.c dma_data->addr = i2s->base_phys + HII2S_ST_DL_CHANNEL; i2s 426 sound/soc/hisilicon/hi6210-i2s.c dma_data->addr = i2s->base_phys + HII2S_STEREO_UPLINK_CHANNEL; i2s 428 sound/soc/hisilicon/hi6210-i2s.c switch (i2s->channels) { i2s 430 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 432 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 435 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 437 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 442 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_I2S_CFG); i2s 450 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_I2S_CFG, val); i2s 453 sound/soc/hisilicon/hi6210-i2s.c if (!i2s->master) i2s 457 sound/soc/hisilicon/hi6210-i2s.c val = hi6210_read_reg(i2s, HII2S_FS_CFG); i2s 468 sound/soc/hisilicon/hi6210-i2s.c hi6210_write_reg(i2s, HII2S_FS_CFG, val); i2s 501 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 504 sound/soc/hisilicon/hi6210-i2s.c &i2s->dma_data[SNDRV_PCM_STREAM_PLAYBACK], i2s 505 sound/soc/hisilicon/hi6210-i2s.c &i2s->dma_data[SNDRV_PCM_STREAM_CAPTURE]); i2s 546 sound/soc/hisilicon/hi6210-i2s.c struct hi6210_i2s *i2s; i2s 550 sound/soc/hisilicon/hi6210-i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 551 sound/soc/hisilicon/hi6210-i2s.c if (!i2s) i2s 554 sound/soc/hisilicon/hi6210-i2s.c i2s->dev = dev; i2s 555 sound/soc/hisilicon/hi6210-i2s.c spin_lock_init(&i2s->lock); i2s 558 sound/soc/hisilicon/hi6210-i2s.c i2s->base = devm_ioremap_resource(dev, res); i2s 559 sound/soc/hisilicon/hi6210-i2s.c if (IS_ERR(i2s->base)) i2s 560 sound/soc/hisilicon/hi6210-i2s.c return PTR_ERR(i2s->base); i2s 562 sound/soc/hisilicon/hi6210-i2s.c i2s->base_phys = (phys_addr_t)res->start; i2s 563 sound/soc/hisilicon/hi6210-i2s.c i2s->dai = hi6210_i2s_dai_init; i2s 565 sound/soc/hisilicon/hi6210-i2s.c dev_set_drvdata(&pdev->dev, i2s); i2s 567 sound/soc/hisilicon/hi6210-i2s.c i2s->sysctrl = syscon_regmap_lookup_by_phandle(node, i2s 569 sound/soc/hisilicon/hi6210-i2s.c if (IS_ERR(i2s->sysctrl)) i2s 570 sound/soc/hisilicon/hi6210-i2s.c return PTR_ERR(i2s->sysctrl); i2s 572 sound/soc/hisilicon/hi6210-i2s.c i2s->clk[CLK_DACODEC] = devm_clk_get(&pdev->dev, "dacodec"); i2s 573 sound/soc/hisilicon/hi6210-i2s.c if (IS_ERR_OR_NULL(i2s->clk[CLK_DACODEC])) i2s 574 sound/soc/hisilicon/hi6210-i2s.c return PTR_ERR(i2s->clk[CLK_DACODEC]); i2s 575 sound/soc/hisilicon/hi6210-i2s.c i2s->clocks++; i2s 577 sound/soc/hisilicon/hi6210-i2s.c i2s->clk[CLK_I2S_BASE] = devm_clk_get(&pdev->dev, "i2s-base"); i2s 578 sound/soc/hisilicon/hi6210-i2s.c if (IS_ERR_OR_NULL(i2s->clk[CLK_I2S_BASE])) i2s 579 sound/soc/hisilicon/hi6210-i2s.c return PTR_ERR(i2s->clk[CLK_I2S_BASE]); i2s 580 sound/soc/hisilicon/hi6210-i2s.c i2s->clocks++; i2s 587 sound/soc/hisilicon/hi6210-i2s.c &i2s->dai, 1); i2s 67 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = dev_get_drvdata(dev); i2s 69 sound/soc/img/img-i2s-in.c clk_disable_unprepare(i2s->clk_sys); i2s 76 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = dev_get_drvdata(dev); i2s 79 sound/soc/img/img-i2s-in.c ret = clk_prepare_enable(i2s->clk_sys); i2s 88 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_writel(struct img_i2s_in *i2s, u32 val, u32 reg) i2s 90 sound/soc/img/img-i2s-in.c writel(val, i2s->base + reg); i2s 93 sound/soc/img/img-i2s-in.c static inline u32 img_i2s_in_readl(struct img_i2s_in *i2s, u32 reg) i2s 95 sound/soc/img/img-i2s-in.c return readl(i2s->base + reg); i2s 98 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_writel(struct img_i2s_in *i2s, u32 chan, i2s 101 sound/soc/img/img-i2s-in.c writel(val, i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg); i2s 104 sound/soc/img/img-i2s-in.c static inline u32 img_i2s_in_ch_readl(struct img_i2s_in *i2s, u32 chan, i2s 107 sound/soc/img/img-i2s-in.c return readl(i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg); i2s 110 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_disable(struct img_i2s_in *i2s, u32 chan) i2s 114 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL); i2s 116 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL); i2s 119 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_enable(struct img_i2s_in *i2s, u32 chan) i2s 123 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL); i2s 125 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL); i2s 128 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_disable(struct img_i2s_in *i2s) i2s 132 sound/soc/img/img-i2s-in.c reg = img_i2s_in_readl(i2s, IMG_I2S_IN_CTL); i2s 134 sound/soc/img/img-i2s-in.c img_i2s_in_writel(i2s, reg, IMG_I2S_IN_CTL); i2s 137 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_enable(struct img_i2s_in *i2s) i2s 141 sound/soc/img/img-i2s-in.c reg = img_i2s_in_readl(i2s, IMG_I2S_IN_CTL); i2s 143 sound/soc/img/img-i2s-in.c img_i2s_in_writel(i2s, reg, IMG_I2S_IN_CTL); i2s 146 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_flush(struct img_i2s_in *i2s) i2s 151 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->active_channels; i++) { i2s 152 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, i, IMG_I2S_IN_CH_CTL); i2s 154 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 156 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 163 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = snd_soc_dai_get_drvdata(dai); i2s 169 sound/soc/img/img-i2s-in.c img_i2s_in_enable(i2s); i2s 175 sound/soc/img/img-i2s-in.c img_i2s_in_disable(i2s); i2s 184 sound/soc/img/img-i2s-in.c static int img_i2s_in_check_rate(struct img_i2s_in *i2s, i2s 193 sound/soc/img/img-i2s-in.c cur_freq = clk_get_rate(i2s->clk_sys); i2s 205 sound/soc/img/img-i2s-in.c dev_err(i2s->dev, i2s 217 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = snd_soc_dai_get_drvdata(dai); i2s 252 sound/soc/img/img-i2s-in.c (channels > (i2s->max_i2s_chan * 2)) || i2s 258 sound/soc/img/img-i2s-in.c ret = img_i2s_in_check_rate(i2s, rate, frame_size, i2s 279 sound/soc/img/img-i2s-in.c reg = img_i2s_in_readl(i2s, IMG_I2S_IN_CTL); i2s 281 sound/soc/img/img-i2s-in.c img_i2s_in_writel(i2s, reg, IMG_I2S_IN_CTL); i2s 283 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->active_channels; i++) i2s 284 sound/soc/img/img-i2s-in.c img_i2s_in_ch_disable(i2s, i); i2s 286 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 287 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, i, IMG_I2S_IN_CH_CTL); i2s 289 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 292 sound/soc/img/img-i2s-in.c i2s->active_channels = i2s_channels; i2s 294 sound/soc/img/img-i2s-in.c img_i2s_in_flush(i2s); i2s 296 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->active_channels; i++) i2s 297 sound/soc/img/img-i2s-in.c img_i2s_in_ch_enable(i2s, i); i2s 304 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = snd_soc_dai_get_drvdata(dai); i2s 345 sound/soc/img/img-i2s-in.c ret = pm_runtime_get_sync(i2s->dev); i2s 349 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->active_channels; i++) i2s 350 sound/soc/img/img-i2s-in.c img_i2s_in_ch_disable(i2s, i); i2s 355 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 356 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, i, IMG_I2S_IN_CH_CTL); i2s 358 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 360 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 362 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 365 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->active_channels; i++) i2s 366 sound/soc/img/img-i2s-in.c img_i2s_in_ch_enable(i2s, i); i2s 368 sound/soc/img/img-i2s-in.c pm_runtime_put(i2s->dev); i2s 381 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = snd_soc_dai_get_drvdata(dai); i2s 383 sound/soc/img/img-i2s-in.c snd_soc_dai_init_dma_data(dai, NULL, &i2s->dma_data); i2s 419 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s; i2s 427 sound/soc/img/img-i2s-in.c i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL); i2s 428 sound/soc/img/img-i2s-in.c if (!i2s) i2s 431 sound/soc/img/img-i2s-in.c platform_set_drvdata(pdev, i2s); i2s 433 sound/soc/img/img-i2s-in.c i2s->dev = dev; i2s 440 sound/soc/img/img-i2s-in.c i2s->base = base; i2s 443 sound/soc/img/img-i2s-in.c &i2s->max_i2s_chan)) { i2s 448 sound/soc/img/img-i2s-in.c max_i2s_chan_pow_2 = 1 << get_count_order(i2s->max_i2s_chan); i2s 450 sound/soc/img/img-i2s-in.c i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20); i2s 452 sound/soc/img/img-i2s-in.c i2s->clk_sys = devm_clk_get(dev, "sys"); i2s 453 sound/soc/img/img-i2s-in.c if (IS_ERR(i2s->clk_sys)) { i2s 454 sound/soc/img/img-i2s-in.c if (PTR_ERR(i2s->clk_sys) != -EPROBE_DEFER) i2s 456 sound/soc/img/img-i2s-in.c return PTR_ERR(i2s->clk_sys); i2s 469 sound/soc/img/img-i2s-in.c i2s->active_channels = 1; i2s 470 sound/soc/img/img-i2s-in.c i2s->dma_data.addr = res->start + IMG_I2S_IN_RX_FIFO; i2s 471 sound/soc/img/img-i2s-in.c i2s->dma_data.addr_width = 4; i2s 473 sound/soc/img/img-i2s-in.c i2s->dai_driver.probe = img_i2s_in_dai_probe; i2s 474 sound/soc/img/img-i2s-in.c i2s->dai_driver.capture.channels_min = 2; i2s 475 sound/soc/img/img-i2s-in.c i2s->dai_driver.capture.channels_max = i2s->max_i2s_chan * 2; i2s 476 sound/soc/img/img-i2s-in.c i2s->dai_driver.capture.rates = SNDRV_PCM_RATE_8000_192000; i2s 477 sound/soc/img/img-i2s-in.c i2s->dai_driver.capture.formats = SNDRV_PCM_FMTBIT_S32_LE | i2s 479 sound/soc/img/img-i2s-in.c i2s->dai_driver.ops = &img_i2s_in_dai_ops; i2s 490 sound/soc/img/img-i2s-in.c img_i2s_in_disable(i2s); i2s 492 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) i2s 493 sound/soc/img/img-i2s-in.c img_i2s_in_ch_disable(i2s, i); i2s 499 sound/soc/img/img-i2s-in.c img_i2s_in_writel(i2s, 0, IMG_I2S_IN_CTL); i2s 501 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) i2s 502 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, i2s 509 sound/soc/img/img-i2s-in.c i2s->suspend_ch_ctl = devm_kcalloc(dev, i2s 510 sound/soc/img/img-i2s-in.c i2s->max_i2s_chan, sizeof(*i2s->suspend_ch_ctl), GFP_KERNEL); i2s 511 sound/soc/img/img-i2s-in.c if (!i2s->suspend_ch_ctl) { i2s 517 sound/soc/img/img-i2s-in.c &i2s->dai_driver, 1); i2s 548 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = dev_get_drvdata(dev); i2s 558 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 559 sound/soc/img/img-i2s-in.c reg = img_i2s_in_ch_readl(i2s, i, IMG_I2S_IN_CH_CTL); i2s 560 sound/soc/img/img-i2s-in.c i2s->suspend_ch_ctl[i] = reg; i2s 563 sound/soc/img/img-i2s-in.c i2s->suspend_ctl = img_i2s_in_readl(i2s, IMG_I2S_IN_CTL); i2s 572 sound/soc/img/img-i2s-in.c struct img_i2s_in *i2s = dev_get_drvdata(dev); i2s 580 sound/soc/img/img-i2s-in.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 581 sound/soc/img/img-i2s-in.c reg = i2s->suspend_ch_ctl[i]; i2s 582 sound/soc/img/img-i2s-in.c img_i2s_in_ch_writel(i2s, i, reg, IMG_I2S_IN_CH_CTL); i2s 585 sound/soc/img/img-i2s-in.c img_i2s_in_writel(i2s, i2s->suspend_ctl, IMG_I2S_IN_CTL); i2s 69 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = dev_get_drvdata(dev); i2s 71 sound/soc/img/img-i2s-out.c clk_disable_unprepare(i2s->clk_ref); i2s 72 sound/soc/img/img-i2s-out.c clk_disable_unprepare(i2s->clk_sys); i2s 79 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = dev_get_drvdata(dev); i2s 82 sound/soc/img/img-i2s-out.c ret = clk_prepare_enable(i2s->clk_sys); i2s 88 sound/soc/img/img-i2s-out.c ret = clk_prepare_enable(i2s->clk_ref); i2s 91 sound/soc/img/img-i2s-out.c clk_disable_unprepare(i2s->clk_sys); i2s 98 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_writel(struct img_i2s_out *i2s, u32 val, i2s 101 sound/soc/img/img-i2s-out.c writel(val, i2s->base + reg); i2s 104 sound/soc/img/img-i2s-out.c static inline u32 img_i2s_out_readl(struct img_i2s_out *i2s, u32 reg) i2s 106 sound/soc/img/img-i2s-out.c return readl(i2s->base + reg); i2s 109 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_ch_writel(struct img_i2s_out *i2s, i2s 112 sound/soc/img/img-i2s-out.c writel(val, i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg); i2s 115 sound/soc/img/img-i2s-out.c static inline u32 img_i2s_out_ch_readl(struct img_i2s_out *i2s, u32 chan, i2s 118 sound/soc/img/img-i2s-out.c return readl(i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg); i2s 121 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_ch_disable(struct img_i2s_out *i2s, u32 chan) i2s 125 sound/soc/img/img-i2s-out.c reg = img_i2s_out_ch_readl(i2s, chan, IMG_I2S_OUT_CH_CTL); i2s 127 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, chan, reg, IMG_I2S_OUT_CH_CTL); i2s 130 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_ch_enable(struct img_i2s_out *i2s, u32 chan) i2s 134 sound/soc/img/img-i2s-out.c reg = img_i2s_out_ch_readl(i2s, chan, IMG_I2S_OUT_CH_CTL); i2s 136 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, chan, reg, IMG_I2S_OUT_CH_CTL); i2s 139 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_disable(struct img_i2s_out *i2s) i2s 143 sound/soc/img/img-i2s-out.c reg = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 145 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 148 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_enable(struct img_i2s_out *i2s) i2s 152 sound/soc/img/img-i2s-out.c reg = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 154 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 157 sound/soc/img/img-i2s-out.c static void img_i2s_out_reset(struct img_i2s_out *i2s) i2s 162 sound/soc/img/img-i2s-out.c core_ctl = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL) & i2s 166 sound/soc/img/img-i2s-out.c if (!i2s->force_clk_active) i2s 169 sound/soc/img/img-i2s-out.c chan_ctl = img_i2s_out_ch_readl(i2s, 0, IMG_I2S_OUT_CH_CTL) & i2s 172 sound/soc/img/img-i2s-out.c reset_control_assert(i2s->rst); i2s 173 sound/soc/img/img-i2s-out.c reset_control_deassert(i2s->rst); i2s 175 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->max_i2s_chan; i++) i2s 176 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, i, chan_ctl, IMG_I2S_OUT_CH_CTL); i2s 178 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->active_channels; i++) i2s 179 sound/soc/img/img-i2s-out.c img_i2s_out_ch_enable(i2s, i); i2s 181 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, core_ctl, IMG_I2S_OUT_CTL); i2s 182 sound/soc/img/img-i2s-out.c img_i2s_out_enable(i2s); i2s 188 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = snd_soc_dai_get_drvdata(dai); i2s 195 sound/soc/img/img-i2s-out.c reg = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 196 sound/soc/img/img-i2s-out.c if (!i2s->force_clk_active) i2s 199 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 204 sound/soc/img/img-i2s-out.c img_i2s_out_reset(i2s); i2s 216 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = snd_soc_dai_get_drvdata(dai); i2s 232 sound/soc/img/img-i2s-out.c (channels > (i2s->max_i2s_chan * 2)) || i2s 236 sound/soc/img/img-i2s-out.c pre_div_a = clk_round_rate(i2s->clk_ref, rate * 256); i2s 239 sound/soc/img/img-i2s-out.c pre_div_b = clk_round_rate(i2s->clk_ref, rate * 384); i2s 248 sound/soc/img/img-i2s-out.c clk_set_rate(i2s->clk_ref, pre_div_b); i2s 250 sound/soc/img/img-i2s-out.c clk_set_rate(i2s->clk_ref, pre_div_a); i2s 257 sound/soc/img/img-i2s-out.c clk_rate = clk_get_rate(i2s->clk_ref); i2s 272 sound/soc/img/img-i2s-out.c img_i2s_out_disable(i2s); i2s 274 sound/soc/img/img-i2s-out.c reg = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 276 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 279 sound/soc/img/img-i2s-out.c img_i2s_out_ch_enable(i2s, i); i2s 281 sound/soc/img/img-i2s-out.c for (; i < i2s->max_i2s_chan; i++) i2s 282 sound/soc/img/img-i2s-out.c img_i2s_out_ch_disable(i2s, i); i2s 284 sound/soc/img/img-i2s-out.c img_i2s_out_enable(i2s); i2s 286 sound/soc/img/img-i2s-out.c i2s->active_channels = i2s_channels; i2s 293 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = snd_soc_dai_get_drvdata(dai); i2s 349 sound/soc/img/img-i2s-out.c ret = pm_runtime_get_sync(i2s->dev); i2s 353 sound/soc/img/img-i2s-out.c img_i2s_out_disable(i2s); i2s 355 sound/soc/img/img-i2s-out.c reg = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 357 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 359 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->active_channels; i++) i2s 360 sound/soc/img/img-i2s-out.c img_i2s_out_ch_disable(i2s, i); i2s 362 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 363 sound/soc/img/img-i2s-out.c reg = img_i2s_out_ch_readl(i2s, i, IMG_I2S_OUT_CH_CTL); i2s 365 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, i, reg, IMG_I2S_OUT_CH_CTL); i2s 368 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->active_channels; i++) i2s 369 sound/soc/img/img-i2s-out.c img_i2s_out_ch_enable(i2s, i); i2s 371 sound/soc/img/img-i2s-out.c img_i2s_out_enable(i2s); i2s 372 sound/soc/img/img-i2s-out.c pm_runtime_put(i2s->dev); i2s 374 sound/soc/img/img-i2s-out.c i2s->force_clk_active = force_clk_active; i2s 387 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = snd_soc_dai_get_drvdata(dai); i2s 389 sound/soc/img/img-i2s-out.c snd_soc_dai_init_dma_data(dai, &i2s->dma_data, NULL); i2s 425 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s; i2s 433 sound/soc/img/img-i2s-out.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 434 sound/soc/img/img-i2s-out.c if (!i2s) i2s 437 sound/soc/img/img-i2s-out.c platform_set_drvdata(pdev, i2s); i2s 439 sound/soc/img/img-i2s-out.c i2s->dev = &pdev->dev; i2s 446 sound/soc/img/img-i2s-out.c i2s->base = base; i2s 449 sound/soc/img/img-i2s-out.c &i2s->max_i2s_chan)) { i2s 454 sound/soc/img/img-i2s-out.c max_i2s_chan_pow_2 = 1 << get_count_order(i2s->max_i2s_chan); i2s 456 sound/soc/img/img-i2s-out.c i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20); i2s 458 sound/soc/img/img-i2s-out.c i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst"); i2s 459 sound/soc/img/img-i2s-out.c if (IS_ERR(i2s->rst)) { i2s 460 sound/soc/img/img-i2s-out.c if (PTR_ERR(i2s->rst) != -EPROBE_DEFER) i2s 462 sound/soc/img/img-i2s-out.c return PTR_ERR(i2s->rst); i2s 465 sound/soc/img/img-i2s-out.c i2s->clk_sys = devm_clk_get(&pdev->dev, "sys"); i2s 466 sound/soc/img/img-i2s-out.c if (IS_ERR(i2s->clk_sys)) { i2s 467 sound/soc/img/img-i2s-out.c if (PTR_ERR(i2s->clk_sys) != -EPROBE_DEFER) i2s 469 sound/soc/img/img-i2s-out.c return PTR_ERR(i2s->clk_sys); i2s 472 sound/soc/img/img-i2s-out.c i2s->clk_ref = devm_clk_get(&pdev->dev, "ref"); i2s 473 sound/soc/img/img-i2s-out.c if (IS_ERR(i2s->clk_ref)) { i2s 474 sound/soc/img/img-i2s-out.c if (PTR_ERR(i2s->clk_ref) != -EPROBE_DEFER) i2s 476 sound/soc/img/img-i2s-out.c return PTR_ERR(i2s->clk_ref); i2s 479 sound/soc/img/img-i2s-out.c i2s->suspend_ch_ctl = devm_kcalloc(dev, i2s 480 sound/soc/img/img-i2s-out.c i2s->max_i2s_chan, sizeof(*i2s->suspend_ch_ctl), GFP_KERNEL); i2s 481 sound/soc/img/img-i2s-out.c if (!i2s->suspend_ch_ctl) i2s 495 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, reg, IMG_I2S_OUT_CTL); i2s 502 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->max_i2s_chan; i++) i2s 503 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, i, reg, IMG_I2S_OUT_CH_CTL); i2s 505 sound/soc/img/img-i2s-out.c img_i2s_out_reset(i2s); i2s 508 sound/soc/img/img-i2s-out.c i2s->active_channels = 1; i2s 509 sound/soc/img/img-i2s-out.c i2s->dma_data.addr = res->start + IMG_I2S_OUT_TX_FIFO; i2s 510 sound/soc/img/img-i2s-out.c i2s->dma_data.addr_width = 4; i2s 511 sound/soc/img/img-i2s-out.c i2s->dma_data.maxburst = 4; i2s 513 sound/soc/img/img-i2s-out.c i2s->dai_driver.probe = img_i2s_out_dai_probe; i2s 514 sound/soc/img/img-i2s-out.c i2s->dai_driver.playback.channels_min = 2; i2s 515 sound/soc/img/img-i2s-out.c i2s->dai_driver.playback.channels_max = i2s->max_i2s_chan * 2; i2s 516 sound/soc/img/img-i2s-out.c i2s->dai_driver.playback.rates = SNDRV_PCM_RATE_8000_192000; i2s 517 sound/soc/img/img-i2s-out.c i2s->dai_driver.playback.formats = SNDRV_PCM_FMTBIT_S32_LE; i2s 518 sound/soc/img/img-i2s-out.c i2s->dai_driver.ops = &img_i2s_out_dai_ops; i2s 521 sound/soc/img/img-i2s-out.c &img_i2s_out_component, &i2s->dai_driver, 1); i2s 553 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = dev_get_drvdata(dev); i2s 563 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 564 sound/soc/img/img-i2s-out.c reg = img_i2s_out_ch_readl(i2s, i, IMG_I2S_OUT_CH_CTL); i2s 565 sound/soc/img/img-i2s-out.c i2s->suspend_ch_ctl[i] = reg; i2s 568 sound/soc/img/img-i2s-out.c i2s->suspend_ctl = img_i2s_out_readl(i2s, IMG_I2S_OUT_CTL); i2s 577 sound/soc/img/img-i2s-out.c struct img_i2s_out *i2s = dev_get_drvdata(dev); i2s 585 sound/soc/img/img-i2s-out.c for (i = 0; i < i2s->max_i2s_chan; i++) { i2s 586 sound/soc/img/img-i2s-out.c reg = i2s->suspend_ch_ctl[i]; i2s 587 sound/soc/img/img-i2s-out.c img_i2s_out_ch_writel(i2s, i, reg, IMG_I2S_OUT_CH_CTL); i2s 590 sound/soc/img/img-i2s-out.c img_i2s_out_writel(i2s, i2s->suspend_ctl, IMG_I2S_OUT_CTL); i2s 110 sound/soc/jz4740/jz4740-i2s.c static inline uint32_t jz4740_i2s_read(const struct jz4740_i2s *i2s, i2s 113 sound/soc/jz4740/jz4740-i2s.c return readl(i2s->base + reg); i2s 116 sound/soc/jz4740/jz4740-i2s.c static inline void jz4740_i2s_write(const struct jz4740_i2s *i2s, i2s 119 sound/soc/jz4740/jz4740-i2s.c writel(value, i2s->base + reg); i2s 125 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 132 sound/soc/jz4740/jz4740-i2s.c ctrl = jz4740_i2s_read(i2s, JZ_REG_AIC_CTRL); i2s 134 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); i2s 136 sound/soc/jz4740/jz4740-i2s.c ret = clk_prepare_enable(i2s->clk_i2s); i2s 140 sound/soc/jz4740/jz4740-i2s.c conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); i2s 142 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 150 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 156 sound/soc/jz4740/jz4740-i2s.c conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); i2s 158 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 160 sound/soc/jz4740/jz4740-i2s.c clk_disable_unprepare(i2s->clk_i2s); i2s 166 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 176 sound/soc/jz4740/jz4740-i2s.c ctrl = jz4740_i2s_read(i2s, JZ_REG_AIC_CTRL); i2s 193 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); i2s 200 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 205 sound/soc/jz4740/jz4740-i2s.c conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); i2s 243 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 244 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_I2S_FMT, format); i2s 252 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 257 sound/soc/jz4740/jz4740-i2s.c ctrl = jz4740_i2s_read(i2s, JZ_REG_AIC_CTRL); i2s 259 sound/soc/jz4740/jz4740-i2s.c div_reg = jz4740_i2s_read(i2s, JZ_REG_AIC_CLK_DIV); i2s 260 sound/soc/jz4740/jz4740-i2s.c div = clk_get_rate(i2s->clk_i2s) / (64 * params_rate(params)); i2s 287 sound/soc/jz4740/jz4740-i2s.c if (i2s->version >= JZ_I2S_JZ4780) { i2s 296 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); i2s 297 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CLK_DIV, div_reg); i2s 305 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 312 sound/soc/jz4740/jz4740-i2s.c clk_set_parent(i2s->clk_i2s, parent); i2s 316 sound/soc/jz4740/jz4740-i2s.c clk_set_parent(i2s->clk_i2s, parent); i2s 317 sound/soc/jz4740/jz4740-i2s.c ret = clk_set_rate(i2s->clk_i2s, freq); i2s 329 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 333 sound/soc/jz4740/jz4740-i2s.c conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); i2s 335 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 337 sound/soc/jz4740/jz4740-i2s.c clk_disable_unprepare(i2s->clk_i2s); i2s 340 sound/soc/jz4740/jz4740-i2s.c clk_disable_unprepare(i2s->clk_aic); i2s 347 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 351 sound/soc/jz4740/jz4740-i2s.c ret = clk_prepare_enable(i2s->clk_aic); i2s 356 sound/soc/jz4740/jz4740-i2s.c ret = clk_prepare_enable(i2s->clk_i2s); i2s 358 sound/soc/jz4740/jz4740-i2s.c clk_disable_unprepare(i2s->clk_aic); i2s 362 sound/soc/jz4740/jz4740-i2s.c conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); i2s 364 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 370 sound/soc/jz4740/jz4740-i2s.c static void jz4740_i2c_init_pcm_config(struct jz4740_i2s *i2s) i2s 375 sound/soc/jz4740/jz4740-i2s.c dma_data = &i2s->playback_dma_data; i2s 378 sound/soc/jz4740/jz4740-i2s.c dma_data->addr = i2s->phys_base + JZ_REG_AIC_FIFO; i2s 381 sound/soc/jz4740/jz4740-i2s.c dma_data = &i2s->capture_dma_data; i2s 384 sound/soc/jz4740/jz4740-i2s.c dma_data->addr = i2s->phys_base + JZ_REG_AIC_FIFO; i2s 389 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 393 sound/soc/jz4740/jz4740-i2s.c ret = clk_prepare_enable(i2s->clk_aic); i2s 397 sound/soc/jz4740/jz4740-i2s.c jz4740_i2c_init_pcm_config(i2s); i2s 398 sound/soc/jz4740/jz4740-i2s.c snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data, i2s 399 sound/soc/jz4740/jz4740-i2s.c &i2s->capture_dma_data); i2s 401 sound/soc/jz4740/jz4740-i2s.c if (i2s->version >= JZ_I2S_JZ4780) { i2s 415 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, JZ_AIC_CONF_RESET); i2s 416 sound/soc/jz4740/jz4740-i2s.c jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); i2s 423 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 425 sound/soc/jz4740/jz4740-i2s.c clk_disable_unprepare(i2s->clk_aic); i2s 497 sound/soc/jz4740/jz4740-i2s.c struct jz4740_i2s *i2s; i2s 502 sound/soc/jz4740/jz4740-i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 503 sound/soc/jz4740/jz4740-i2s.c if (!i2s) i2s 508 sound/soc/jz4740/jz4740-i2s.c i2s->version = (enum jz47xx_i2s_version)match->data; i2s 511 sound/soc/jz4740/jz4740-i2s.c i2s->base = devm_ioremap_resource(&pdev->dev, mem); i2s 512 sound/soc/jz4740/jz4740-i2s.c if (IS_ERR(i2s->base)) i2s 513 sound/soc/jz4740/jz4740-i2s.c return PTR_ERR(i2s->base); i2s 515 sound/soc/jz4740/jz4740-i2s.c i2s->phys_base = mem->start; i2s 517 sound/soc/jz4740/jz4740-i2s.c i2s->clk_aic = devm_clk_get(&pdev->dev, "aic"); i2s 518 sound/soc/jz4740/jz4740-i2s.c if (IS_ERR(i2s->clk_aic)) i2s 519 sound/soc/jz4740/jz4740-i2s.c return PTR_ERR(i2s->clk_aic); i2s 521 sound/soc/jz4740/jz4740-i2s.c i2s->clk_i2s = devm_clk_get(&pdev->dev, "i2s"); i2s 522 sound/soc/jz4740/jz4740-i2s.c if (IS_ERR(i2s->clk_i2s)) i2s 523 sound/soc/jz4740/jz4740-i2s.c return PTR_ERR(i2s->clk_i2s); i2s 525 sound/soc/jz4740/jz4740-i2s.c platform_set_drvdata(pdev, i2s); i2s 527 sound/soc/jz4740/jz4740-i2s.c if (i2s->version == JZ_I2S_JZ4780) i2s 83 sound/soc/pxa/ttc-dkb.c SND_SOC_DAILINK_DEFS(i2s, i2s 95 sound/soc/pxa/ttc-dkb.c SND_SOC_DAILINK_REG(i2s), i2s 159 sound/soc/qcom/qdsp6/q6afe-dai.c struct q6afe_i2s_cfg *i2s = &dai_data->port_config[dai->id].i2s_cfg; i2s 161 sound/soc/qcom/qdsp6/q6afe-dai.c i2s->sample_rate = params_rate(params); i2s 162 sound/soc/qcom/qdsp6/q6afe-dai.c i2s->bit_width = params_width(params); i2s 163 sound/soc/qcom/qdsp6/q6afe-dai.c i2s->num_channels = params_channels(params); i2s 164 sound/soc/qcom/qdsp6/q6afe-dai.c i2s->sd_line_mask = dai_data->priv[dai->id].sd_line_mask; i2s 172 sound/soc/qcom/qdsp6/q6afe-dai.c struct q6afe_i2s_cfg *i2s = &dai_data->port_config[dai->id].i2s_cfg; i2s 174 sound/soc/qcom/qdsp6/q6afe-dai.c i2s->fmt = fmt; i2s 56 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = dev_get_drvdata(dev); i2s 58 sound/soc/rockchip/rockchip_i2s.c regcache_cache_only(i2s->regmap, true); i2s 59 sound/soc/rockchip/rockchip_i2s.c clk_disable_unprepare(i2s->mclk); i2s 66 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = dev_get_drvdata(dev); i2s 69 sound/soc/rockchip/rockchip_i2s.c ret = clk_prepare_enable(i2s->mclk); i2s 71 sound/soc/rockchip/rockchip_i2s.c dev_err(i2s->dev, "clock enable failed %d\n", ret); i2s 75 sound/soc/rockchip/rockchip_i2s.c regcache_cache_only(i2s->regmap, false); i2s 76 sound/soc/rockchip/rockchip_i2s.c regcache_mark_dirty(i2s->regmap); i2s 78 sound/soc/rockchip/rockchip_i2s.c ret = regcache_sync(i2s->regmap); i2s 80 sound/soc/rockchip/rockchip_i2s.c clk_disable_unprepare(i2s->mclk); i2s 90 sound/soc/rockchip/rockchip_i2s.c static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on) i2s 96 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, i2s 99 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_XFER, i2s 103 sound/soc/rockchip/rockchip_i2s.c i2s->tx_start = true; i2s 105 sound/soc/rockchip/rockchip_i2s.c i2s->tx_start = false; i2s 107 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, i2s 110 sound/soc/rockchip/rockchip_i2s.c if (!i2s->rx_start) { i2s 111 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_XFER, i2s 118 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CLR, i2s 122 sound/soc/rockchip/rockchip_i2s.c regmap_read(i2s->regmap, I2S_CLR, &val); i2s 126 sound/soc/rockchip/rockchip_i2s.c regmap_read(i2s->regmap, I2S_CLR, &val); i2s 129 sound/soc/rockchip/rockchip_i2s.c dev_warn(i2s->dev, "fail to clear\n"); i2s 137 sound/soc/rockchip/rockchip_i2s.c static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) i2s 143 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, i2s 146 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_XFER, i2s 150 sound/soc/rockchip/rockchip_i2s.c i2s->rx_start = true; i2s 152 sound/soc/rockchip/rockchip_i2s.c i2s->rx_start = false; i2s 154 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, i2s 157 sound/soc/rockchip/rockchip_i2s.c if (!i2s->tx_start) { i2s 158 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_XFER, i2s 165 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CLR, i2s 169 sound/soc/rockchip/rockchip_i2s.c regmap_read(i2s->regmap, I2S_CLR, &val); i2s 173 sound/soc/rockchip/rockchip_i2s.c regmap_read(i2s->regmap, I2S_CLR, &val); i2s 176 sound/soc/rockchip/rockchip_i2s.c dev_warn(i2s->dev, "fail to clear\n"); i2s 187 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = to_info(cpu_dai); i2s 195 sound/soc/rockchip/rockchip_i2s.c i2s->is_master_mode = true; i2s 199 sound/soc/rockchip/rockchip_i2s.c i2s->is_master_mode = false; i2s 205 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CKR, mask, val); i2s 219 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CKR, mask, val); i2s 242 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_TXCR, mask, val); i2s 265 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_RXCR, mask, val); i2s 274 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = to_info(dai); i2s 279 sound/soc/rockchip/rockchip_i2s.c if (i2s->is_master_mode) { i2s 280 sound/soc/rockchip/rockchip_i2s.c mclk_rate = clk_get_rate(i2s->mclk); i2s 287 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CKR, i2s 291 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CKR, i2s 332 sound/soc/rockchip/rockchip_i2s.c dev_err(i2s->dev, "invalid channel: %d\n", i2s 338 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_RXCR, i2s 342 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_TXCR, i2s 346 sound/soc/rockchip/rockchip_i2s.c if (!IS_ERR(i2s->grf) && i2s->pins) { i2s 347 sound/soc/rockchip/rockchip_i2s.c regmap_read(i2s->regmap, I2S_TXCR, &val); i2s 365 sound/soc/rockchip/rockchip_i2s.c val <<= i2s->pins->shift; i2s 366 sound/soc/rockchip/rockchip_i2s.c val |= (I2S_IO_DIRECTION_MASK << i2s->pins->shift) << 16; i2s 367 sound/soc/rockchip/rockchip_i2s.c regmap_write(i2s->grf, i2s->pins->reg_offset, val); i2s 370 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_TDL_MASK, i2s 372 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK, i2s 379 sound/soc/rockchip/rockchip_i2s.c regmap_update_bits(i2s->regmap, I2S_CKR, i2s 388 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = to_info(dai); i2s 396 sound/soc/rockchip/rockchip_i2s.c rockchip_snd_rxctrl(i2s, 1); i2s 398 sound/soc/rockchip/rockchip_i2s.c rockchip_snd_txctrl(i2s, 1); i2s 404 sound/soc/rockchip/rockchip_i2s.c rockchip_snd_rxctrl(i2s, 0); i2s 406 sound/soc/rockchip/rockchip_i2s.c rockchip_snd_txctrl(i2s, 0); i2s 419 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = to_info(cpu_dai); i2s 425 sound/soc/rockchip/rockchip_i2s.c ret = clk_set_rate(i2s->mclk, freq); i2s 427 sound/soc/rockchip/rockchip_i2s.c dev_err(i2s->dev, "Fail to set mclk %d\n", ret); i2s 434 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = snd_soc_dai_get_drvdata(dai); i2s 436 sound/soc/rockchip/rockchip_i2s.c dai->capture_dma_data = &i2s->capture_dma_data; i2s 437 sound/soc/rockchip/rockchip_i2s.c dai->playback_dma_data = &i2s->playback_dma_data; i2s 581 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s; i2s 588 sound/soc/rockchip/rockchip_i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 589 sound/soc/rockchip/rockchip_i2s.c if (!i2s) i2s 592 sound/soc/rockchip/rockchip_i2s.c i2s->dev = &pdev->dev; i2s 594 sound/soc/rockchip/rockchip_i2s.c i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf"); i2s 595 sound/soc/rockchip/rockchip_i2s.c if (!IS_ERR(i2s->grf)) { i2s 600 sound/soc/rockchip/rockchip_i2s.c i2s->pins = of_id->data; i2s 604 sound/soc/rockchip/rockchip_i2s.c i2s->hclk = devm_clk_get(&pdev->dev, "i2s_hclk"); i2s 605 sound/soc/rockchip/rockchip_i2s.c if (IS_ERR(i2s->hclk)) { i2s 607 sound/soc/rockchip/rockchip_i2s.c return PTR_ERR(i2s->hclk); i2s 609 sound/soc/rockchip/rockchip_i2s.c ret = clk_prepare_enable(i2s->hclk); i2s 611 sound/soc/rockchip/rockchip_i2s.c dev_err(i2s->dev, "hclock enable failed %d\n", ret); i2s 615 sound/soc/rockchip/rockchip_i2s.c i2s->mclk = devm_clk_get(&pdev->dev, "i2s_clk"); i2s 616 sound/soc/rockchip/rockchip_i2s.c if (IS_ERR(i2s->mclk)) { i2s 618 sound/soc/rockchip/rockchip_i2s.c return PTR_ERR(i2s->mclk); i2s 626 sound/soc/rockchip/rockchip_i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, i2s 628 sound/soc/rockchip/rockchip_i2s.c if (IS_ERR(i2s->regmap)) { i2s 631 sound/soc/rockchip/rockchip_i2s.c return PTR_ERR(i2s->regmap); i2s 634 sound/soc/rockchip/rockchip_i2s.c i2s->playback_dma_data.addr = res->start + I2S_TXDR; i2s 635 sound/soc/rockchip/rockchip_i2s.c i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 636 sound/soc/rockchip/rockchip_i2s.c i2s->playback_dma_data.maxburst = 4; i2s 638 sound/soc/rockchip/rockchip_i2s.c i2s->capture_dma_data.addr = res->start + I2S_RXDR; i2s 639 sound/soc/rockchip/rockchip_i2s.c i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 640 sound/soc/rockchip/rockchip_i2s.c i2s->capture_dma_data.maxburst = 4; i2s 642 sound/soc/rockchip/rockchip_i2s.c dev_set_drvdata(&pdev->dev, i2s); i2s 696 sound/soc/rockchip/rockchip_i2s.c struct rk_i2s_dev *i2s = dev_get_drvdata(&pdev->dev); i2s 702 sound/soc/rockchip/rockchip_i2s.c clk_disable_unprepare(i2s->hclk); i2s 131 sound/soc/samsung/i2s.c static inline bool is_secondary(struct i2s_dai *i2s) i2s 133 sound/soc/samsung/i2s.c return i2s->drv->id == SAMSUNG_I2S_ID_SECONDARY; i2s 137 sound/soc/samsung/i2s.c static inline bool tx_active(struct i2s_dai *i2s) i2s 141 sound/soc/samsung/i2s.c if (!i2s) i2s 144 sound/soc/samsung/i2s.c active = readl(i2s->priv->addr + I2SCON); i2s 146 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 155 sound/soc/samsung/i2s.c static inline struct i2s_dai *get_other_dai(struct i2s_dai *i2s) i2s 157 sound/soc/samsung/i2s.c return i2s->pri_dai ? : i2s->sec_dai; i2s 161 sound/soc/samsung/i2s.c static inline bool other_tx_active(struct i2s_dai *i2s) i2s 163 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 169 sound/soc/samsung/i2s.c static inline bool any_tx_active(struct i2s_dai *i2s) i2s 171 sound/soc/samsung/i2s.c return tx_active(i2s) || other_tx_active(i2s); i2s 175 sound/soc/samsung/i2s.c static inline bool rx_active(struct i2s_dai *i2s) i2s 179 sound/soc/samsung/i2s.c if (!i2s) i2s 182 sound/soc/samsung/i2s.c active = readl(i2s->priv->addr + I2SCON) & CON_RXDMA_ACTIVE; i2s 188 sound/soc/samsung/i2s.c static inline bool other_rx_active(struct i2s_dai *i2s) i2s 190 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 196 sound/soc/samsung/i2s.c static inline bool any_rx_active(struct i2s_dai *i2s) i2s 198 sound/soc/samsung/i2s.c return rx_active(i2s) || other_rx_active(i2s); i2s 202 sound/soc/samsung/i2s.c static inline bool other_active(struct i2s_dai *i2s) i2s 204 sound/soc/samsung/i2s.c return other_rx_active(i2s) || other_tx_active(i2s); i2s 208 sound/soc/samsung/i2s.c static inline bool this_active(struct i2s_dai *i2s) i2s 210 sound/soc/samsung/i2s.c return tx_active(i2s) || rx_active(i2s); i2s 214 sound/soc/samsung/i2s.c static inline bool any_active(struct i2s_dai *i2s) i2s 216 sound/soc/samsung/i2s.c return this_active(i2s) || other_active(i2s); i2s 226 sound/soc/samsung/i2s.c static inline bool is_opened(struct i2s_dai *i2s) i2s 228 sound/soc/samsung/i2s.c if (i2s && (i2s->mode & DAI_OPENED)) i2s 234 sound/soc/samsung/i2s.c static inline bool is_manager(struct i2s_dai *i2s) i2s 236 sound/soc/samsung/i2s.c if (is_opened(i2s) && (i2s->mode & DAI_MANAGER)) i2s 243 sound/soc/samsung/i2s.c static inline unsigned get_rfs(struct i2s_dai *i2s) i2s 245 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 264 sound/soc/samsung/i2s.c static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs) i2s 266 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 303 sound/soc/samsung/i2s.c static inline unsigned get_bfs(struct i2s_dai *i2s) i2s 305 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 325 sound/soc/samsung/i2s.c static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) i2s 327 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 334 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "Unsupported BCLK divider\n"); i2s 369 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "Wrong BCLK Divider!\n"); i2s 377 sound/soc/samsung/i2s.c static inline int get_blc(struct i2s_dai *i2s) i2s 379 sound/soc/samsung/i2s.c int blc = readl(i2s->priv->addr + I2SMOD); i2s 391 sound/soc/samsung/i2s.c static void i2s_txctrl(struct i2s_dai *i2s, int on) i2s 393 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 403 sound/soc/samsung/i2s.c if (is_secondary(i2s)) { i2s 411 sound/soc/samsung/i2s.c if (any_rx_active(i2s)) i2s 416 sound/soc/samsung/i2s.c if (is_secondary(i2s)) { i2s 424 sound/soc/samsung/i2s.c if (other_tx_active(i2s)) { i2s 431 sound/soc/samsung/i2s.c if (any_rx_active(i2s)) i2s 442 sound/soc/samsung/i2s.c static void i2s_rxctrl(struct i2s_dai *i2s, int on) i2s 444 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 454 sound/soc/samsung/i2s.c if (any_tx_active(i2s)) i2s 462 sound/soc/samsung/i2s.c if (any_tx_active(i2s)) i2s 473 sound/soc/samsung/i2s.c static inline void i2s_fifo(struct i2s_dai *i2s, u32 flush) i2s 478 sound/soc/samsung/i2s.c if (!i2s) i2s 481 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 482 sound/soc/samsung/i2s.c fic = i2s->priv->addr + I2SFICS; i2s 484 sound/soc/samsung/i2s.c fic = i2s->priv->addr + I2SFIC; i2s 501 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 502 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 528 sound/soc/samsung/i2s.c (any_active(i2s) && i2s 533 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 542 sound/soc/samsung/i2s.c i2s->rfs = rfs; i2s 555 sound/soc/samsung/i2s.c if (!any_active(i2s)) { i2s 569 sound/soc/samsung/i2s.c priv->op_clk = clk_get(&i2s->pdev->dev, i2s 572 sound/soc/samsung/i2s.c priv->op_clk = clk_get(&i2s->pdev->dev, i2s 591 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 604 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "We don't serve that!\n"); i2s 626 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 652 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "Format not supported\n"); i2s 670 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "Polarity not supported\n"); i2s 689 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "master/slave format not supported\n"); i2s 700 sound/soc/samsung/i2s.c if (any_active(i2s) && i2s 704 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 723 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 730 sound/soc/samsung/i2s.c if (!is_secondary(i2s)) i2s 742 sound/soc/samsung/i2s.c i2s->dma_playback.addr_width = 4; i2s 744 sound/soc/samsung/i2s.c i2s->dma_capture.addr_width = 4; i2s 748 sound/soc/samsung/i2s.c i2s->dma_playback.addr_width = 2; i2s 750 sound/soc/samsung/i2s.c i2s->dma_capture.addr_width = 2; i2s 754 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "%d channels not supported\n", i2s 759 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 764 sound/soc/samsung/i2s.c if (is_manager(i2s)) i2s 769 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 773 sound/soc/samsung/i2s.c if (is_manager(i2s)) i2s 777 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 781 sound/soc/samsung/i2s.c if (is_manager(i2s)) i2s 785 sound/soc/samsung/i2s.c if (is_secondary(i2s)) i2s 789 sound/soc/samsung/i2s.c if (is_manager(i2s)) i2s 793 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, "Format(%d) not supported\n", i2s 804 sound/soc/samsung/i2s.c snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); i2s 806 sound/soc/samsung/i2s.c i2s->frmclk = params_rate(params); i2s 820 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 821 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 828 sound/soc/samsung/i2s.c i2s->mode |= DAI_OPENED; i2s 831 sound/soc/samsung/i2s.c i2s->mode &= ~DAI_MANAGER; i2s 833 sound/soc/samsung/i2s.c i2s->mode |= DAI_MANAGER; i2s 835 sound/soc/samsung/i2s.c if (!any_active(i2s) && (priv->quirks & QUIRK_NEED_RSTCLR)) i2s 836 sound/soc/samsung/i2s.c writel(CON_RSTCLR, i2s->priv->addr + I2SCON); i2s 847 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 848 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 853 sound/soc/samsung/i2s.c i2s->mode &= ~DAI_OPENED; i2s 854 sound/soc/samsung/i2s.c i2s->mode &= ~DAI_MANAGER; i2s 860 sound/soc/samsung/i2s.c i2s->rfs = 0; i2s 861 sound/soc/samsung/i2s.c i2s->bfs = 0; i2s 868 sound/soc/samsung/i2s.c static int config_setup(struct i2s_dai *i2s) i2s 870 sound/soc/samsung/i2s.c struct samsung_i2s_priv *priv = i2s->priv; i2s 871 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 875 sound/soc/samsung/i2s.c blc = get_blc(i2s); i2s 877 sound/soc/samsung/i2s.c bfs = i2s->bfs; i2s 886 sound/soc/samsung/i2s.c rfs = i2s->rfs; i2s 892 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 905 sound/soc/samsung/i2s.c if (any_active(i2s) && (get_rfs(i2s) != rfs || get_bfs(i2s) != bfs)) { i2s 906 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 911 sound/soc/samsung/i2s.c set_bfs(i2s, bfs); i2s 912 sound/soc/samsung/i2s.c set_rfs(i2s, rfs); i2s 919 sound/soc/samsung/i2s.c psr = priv->rclk_srcrate / i2s->frmclk / rfs; i2s 921 sound/soc/samsung/i2s.c dev_dbg(&i2s->pdev->dev, i2s 935 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(rtd->cpu_dai); i2s 945 sound/soc/samsung/i2s.c if (config_setup(i2s)) { i2s 951 sound/soc/samsung/i2s.c i2s_rxctrl(i2s, 1); i2s 953 sound/soc/samsung/i2s.c i2s_txctrl(i2s, 1); i2s 963 sound/soc/samsung/i2s.c i2s_rxctrl(i2s, 0); i2s 964 sound/soc/samsung/i2s.c i2s_fifo(i2s, FIC_RXFLUSH); i2s 966 sound/soc/samsung/i2s.c i2s_txctrl(i2s, 0); i2s 967 sound/soc/samsung/i2s.c i2s_fifo(i2s, FIC_TXFLUSH); i2s 981 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 982 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 987 sound/soc/samsung/i2s.c if ((any_active(i2s) && div && (get_bfs(i2s) != div)) i2s 990 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 994 sound/soc/samsung/i2s.c i2s->bfs = div; i2s 998 sound/soc/samsung/i2s.c dev_err(&i2s->pdev->dev, i2s 1010 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 1018 sound/soc/samsung/i2s.c else if (is_secondary(i2s)) i2s 1044 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 1045 sound/soc/samsung/i2s.c struct i2s_dai *other = get_other_dai(i2s); i2s 1050 sound/soc/samsung/i2s.c if (is_secondary(i2s)) { i2s 1052 sound/soc/samsung/i2s.c snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, NULL); i2s 1054 sound/soc/samsung/i2s.c snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, i2s 1055 sound/soc/samsung/i2s.c &i2s->dma_capture); i2s 1066 sound/soc/samsung/i2s.c i2s->rfs = 0; i2s 1067 sound/soc/samsung/i2s.c i2s->bfs = 0; i2s 1070 sound/soc/samsung/i2s.c i2s_txctrl(i2s, 0); i2s 1071 sound/soc/samsung/i2s.c i2s_rxctrl(i2s, 0); i2s 1072 sound/soc/samsung/i2s.c i2s_fifo(i2s, FIC_TXFLUSH); i2s 1074 sound/soc/samsung/i2s.c i2s_fifo(i2s, FIC_RXFLUSH); i2s 1089 sound/soc/samsung/i2s.c struct i2s_dai *i2s = to_info(dai); i2s 1094 sound/soc/samsung/i2s.c if (!is_secondary(i2s)) { i2s 72 sound/soc/samsung/s3c-i2s-v2.c static void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on) i2s 74 sound/soc/samsung/s3c-i2s-v2.c void __iomem *regs = i2s->regs; i2s 102 sound/soc/samsung/s3c-i2s-v2.c dev_err(i2s->dev, "TXEN: Invalid MODE %x in IISMOD\n", i2s 131 sound/soc/samsung/s3c-i2s-v2.c dev_err(i2s->dev, "TXDIS: Invalid MODE %x in IISMOD\n", i2s 145 sound/soc/samsung/s3c-i2s-v2.c static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) i2s 147 sound/soc/samsung/s3c-i2s-v2.c void __iomem *regs = i2s->regs; i2s 175 sound/soc/samsung/s3c-i2s-v2.c dev_err(i2s->dev, "RXEN: Invalid MODE %x in IISMOD\n", i2s 200 sound/soc/samsung/s3c-i2s-v2.c dev_err(i2s->dev, "RXDIS: Invalid MODE %x in IISMOD\n", i2s 218 sound/soc/samsung/s3c-i2s-v2.c static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) i2s 226 sound/soc/samsung/s3c-i2s-v2.c iiscon = readl(i2s->regs + S3C2412_IISCON); i2s 247 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(cpu_dai); i2s 252 sound/soc/samsung/s3c-i2s-v2.c iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 257 sound/soc/samsung/s3c-i2s-v2.c i2s->master = 0; i2s 261 sound/soc/samsung/s3c-i2s-v2.c i2s->master = 1; i2s 289 sound/soc/samsung/s3c-i2s-v2.c writel(iismod, i2s->regs + S3C2412_IISMOD); i2s 298 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(dai); i2s 305 sound/soc/samsung/s3c-i2s-v2.c dma_data = i2s->dma_playback; i2s 307 sound/soc/samsung/s3c-i2s-v2.c dma_data = i2s->dma_capture; i2s 312 sound/soc/samsung/s3c-i2s-v2.c iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 328 sound/soc/samsung/s3c-i2s-v2.c writel(iismod, i2s->regs + S3C2412_IISMOD); i2s 337 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(cpu_dai); i2s 338 sound/soc/samsung/s3c-i2s-v2.c u32 iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 354 sound/soc/samsung/s3c-i2s-v2.c if (!(i2s->feature & S3C_FEATURE_CDCLKCON)) i2s 373 sound/soc/samsung/s3c-i2s-v2.c writel(iismod, i2s->regs + S3C2412_IISMOD); i2s 383 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(rtd->cpu_dai); i2s 395 sound/soc/samsung/s3c-i2s-v2.c i2s->regs + S3C2412_IISFIC); i2s 398 sound/soc/samsung/s3c-i2s-v2.c writel(0x0, i2s->regs + S3C2412_IISFIC); i2s 402 sound/soc/samsung/s3c-i2s-v2.c if (!i2s->master) { i2s 403 sound/soc/samsung/s3c-i2s-v2.c ret = s3c2412_snd_lrsync(i2s); i2s 411 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_rxctrl(i2s, 1); i2s 413 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_txctrl(i2s, 1); i2s 425 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_rxctrl(i2s, 0); i2s 427 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_txctrl(i2s, 0); i2s 446 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(cpu_dai); i2s 474 sound/soc/samsung/s3c-i2s-v2.c reg = readl(i2s->regs + S3C2412_IISMOD); i2s 476 sound/soc/samsung/s3c-i2s-v2.c writel(reg | div, i2s->regs + S3C2412_IISMOD); i2s 478 sound/soc/samsung/s3c-i2s-v2.c pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); i2s 503 sound/soc/samsung/s3c-i2s-v2.c reg = readl(i2s->regs + S3C2412_IISMOD); i2s 505 sound/soc/samsung/s3c-i2s-v2.c writel(reg | div, i2s->regs + S3C2412_IISMOD); i2s 506 sound/soc/samsung/s3c-i2s-v2.c pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); i2s 512 sound/soc/samsung/s3c-i2s-v2.c i2s->regs + S3C2412_IISPSR); i2s 514 sound/soc/samsung/s3c-i2s-v2.c writel(0x0, i2s->regs + S3C2412_IISPSR); i2s 516 sound/soc/samsung/s3c-i2s-v2.c pr_debug("%s: PSR=%08x\n", __func__, readl(i2s->regs + S3C2412_IISPSR)); i2s 529 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(dai); i2s 530 sound/soc/samsung/s3c-i2s-v2.c u32 reg = readl(i2s->regs + S3C2412_IISFIC); i2s 543 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(cpu_dai); i2s 544 sound/soc/samsung/s3c-i2s-v2.c u32 iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 547 sound/soc/samsung/s3c-i2s-v2.c return i2s->iis_cclk; i2s 549 sound/soc/samsung/s3c-i2s-v2.c return i2s->iis_pclk; i2s 619 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s, i2s 625 sound/soc/samsung/s3c-i2s-v2.c i2s->dev = dev; i2s 628 sound/soc/samsung/s3c-i2s-v2.c snd_soc_dai_set_drvdata(dai, i2s); i2s 630 sound/soc/samsung/s3c-i2s-v2.c i2s->iis_pclk = clk_get(dev, "iis"); i2s 631 sound/soc/samsung/s3c-i2s-v2.c if (IS_ERR(i2s->iis_pclk)) { i2s 636 sound/soc/samsung/s3c-i2s-v2.c clk_prepare_enable(i2s->iis_pclk); i2s 640 sound/soc/samsung/s3c-i2s-v2.c iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 642 sound/soc/samsung/s3c-i2s-v2.c writel(iismod, i2s->regs + S3C2412_IISMOD); i2s 643 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_txctrl(i2s, 0); i2s 644 sound/soc/samsung/s3c-i2s-v2.c s3c2412_snd_rxctrl(i2s, 0); i2s 651 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s) i2s 653 sound/soc/samsung/s3c-i2s-v2.c clk_disable_unprepare(i2s->iis_pclk); i2s 654 sound/soc/samsung/s3c-i2s-v2.c clk_put(i2s->iis_pclk); i2s 655 sound/soc/samsung/s3c-i2s-v2.c i2s->iis_pclk = NULL; i2s 662 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(dai); i2s 666 sound/soc/samsung/s3c-i2s-v2.c i2s->suspend_iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 667 sound/soc/samsung/s3c-i2s-v2.c i2s->suspend_iiscon = readl(i2s->regs + S3C2412_IISCON); i2s 668 sound/soc/samsung/s3c-i2s-v2.c i2s->suspend_iispsr = readl(i2s->regs + S3C2412_IISPSR); i2s 672 sound/soc/samsung/s3c-i2s-v2.c iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 689 sound/soc/samsung/s3c-i2s-v2.c struct s3c_i2sv2_info *i2s = to_info(dai); i2s 692 sound/soc/samsung/s3c-i2s-v2.c dai->active, i2s->suspend_iismod, i2s->suspend_iiscon); i2s 695 sound/soc/samsung/s3c-i2s-v2.c writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON); i2s 696 sound/soc/samsung/s3c-i2s-v2.c writel(i2s->suspend_iismod, i2s->regs + S3C2412_IISMOD); i2s 697 sound/soc/samsung/s3c-i2s-v2.c writel(i2s->suspend_iispsr, i2s->regs + S3C2412_IISPSR); i2s 700 sound/soc/samsung/s3c-i2s-v2.c i2s->regs + S3C2412_IISFIC); i2s 703 sound/soc/samsung/s3c-i2s-v2.c writel(0x0, i2s->regs + S3C2412_IISFIC); i2s 86 sound/soc/samsung/s3c-i2s-v2.h struct s3c_i2sv2_info *i2s, i2s 95 sound/soc/samsung/s3c-i2s-v2.h struct s3c_i2sv2_info *i2s); i2s 97 sound/soc/samsung/s3c2412-i2s.c struct s3c_i2sv2_info *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 102 sound/soc/samsung/s3c2412-i2s.c iismod = readl(i2s->regs + S3C2412_IISMOD); i2s 114 sound/soc/samsung/s3c2412-i2s.c writel(iismod, i2s->regs + S3C2412_IISMOD); i2s 50 sound/soc/sh/siu_dai.c u32 i2s; i2s 66 sound/soc/sh/siu_dai.c .i2s = 0x50000000, i2s 72 sound/soc/sh/siu_dai.c .i2s = 0x05000000, i2s 80 sound/soc/sh/siu_dai.c .i2s = 0x00500000, i2s 86 sound/soc/sh/siu_dai.c .i2s = 0x00050000, i2s 605 sound/soc/sh/siu_dai.c ifctl = siu_flags[info->port_id].playback.i2s | i2s 606 sound/soc/sh/siu_dai.c siu_flags[info->port_id].capture.i2s; i2s 245 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = (struct stm32_i2s_data *)devid; i2s 246 sound/soc/stm/stm32_i2s.c struct platform_device *pdev = i2s->pdev; i2s 251 sound/soc/stm/stm32_i2s.c regmap_read(i2s->regmap, STM32_I2S_SR_REG, &sr); i2s 252 sound/soc/stm/stm32_i2s.c regmap_read(i2s->regmap, STM32_I2S_IER_REG, &ier); i2s 261 sound/soc/stm/stm32_i2s.c regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG, i2s 277 sound/soc/stm/stm32_i2s.c spin_lock(&i2s->irq_lock); i2s 278 sound/soc/stm/stm32_i2s.c if (err && i2s->substream) i2s 279 sound/soc/stm/stm32_i2s.c snd_pcm_stop_xrun(i2s->substream); i2s 280 sound/soc/stm/stm32_i2s.c spin_unlock(&i2s->irq_lock); i2s 334 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 388 sound/soc/stm/stm32_i2s.c i2s->ms_flg = I2S_MS_SLAVE; i2s 391 sound/soc/stm/stm32_i2s.c i2s->ms_flg = I2S_MS_MASTER; i2s 399 sound/soc/stm/stm32_i2s.c i2s->fmt = fmt; i2s 400 sound/soc/stm/stm32_i2s.c return regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 407 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 411 sound/soc/stm/stm32_i2s.c if ((dir == SND_SOC_CLOCK_OUT) && STM32_I2S_IS_MASTER(i2s)) { i2s 412 sound/soc/stm/stm32_i2s.c i2s->mclk_rate = freq; i2s 415 sound/soc/stm/stm32_i2s.c return regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 425 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 434 sound/soc/stm/stm32_i2s.c clk_set_parent(i2s->i2sclk, i2s->x11kclk); i2s 436 sound/soc/stm/stm32_i2s.c clk_set_parent(i2s->i2sclk, i2s->x8kclk); i2s 437 sound/soc/stm/stm32_i2s.c i2s_clock_rate = clk_get_rate(i2s->i2sclk); i2s 451 sound/soc/stm/stm32_i2s.c if (i2s->mclk_rate) { i2s 452 sound/soc/stm/stm32_i2s.c tmp = DIV_ROUND_CLOSEST(i2s_clock_rate, i2s->mclk_rate); i2s 455 sound/soc/stm/stm32_i2s.c if ((i2s->fmt & SND_SOC_DAIFMT_FORMAT_MASK) == i2s 460 sound/soc/stm/stm32_i2s.c ret = regmap_read(i2s->regmap, STM32_I2S_CGFR_REG, &cgfr); i2s 491 sound/soc/stm/stm32_i2s.c ret = regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 497 sound/soc/stm/stm32_i2s.c return regmap_update_bits(i2s->regmap, STM32_I2S_CFG2_REG, i2s 505 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 526 sound/soc/stm/stm32_i2s.c if (STM32_I2S_IS_SLAVE(i2s)) { i2s 537 sound/soc/stm/stm32_i2s.c ret = regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 545 sound/soc/stm/stm32_i2s.c return regmap_update_bits(i2s->regmap, STM32_I2S_CFG1_REG, i2s 552 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 556 sound/soc/stm/stm32_i2s.c spin_lock_irqsave(&i2s->irq_lock, flags); i2s 557 sound/soc/stm/stm32_i2s.c i2s->substream = substream; i2s 558 sound/soc/stm/stm32_i2s.c spin_unlock_irqrestore(&i2s->irq_lock, flags); i2s 560 sound/soc/stm/stm32_i2s.c if ((i2s->fmt & SND_SOC_DAIFMT_FORMAT_MASK) != SND_SOC_DAIFMT_DSP_A) i2s 564 sound/soc/stm/stm32_i2s.c ret = clk_prepare_enable(i2s->i2sclk); i2s 570 sound/soc/stm/stm32_i2s.c return regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG, i2s 578 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 587 sound/soc/stm/stm32_i2s.c if (STM32_I2S_IS_MASTER(i2s)) i2s 596 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 610 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_CFG1_REG, i2s 613 sound/soc/stm/stm32_i2s.c ret = regmap_update_bits(i2s->regmap, STM32_I2S_CR1_REG, i2s 620 sound/soc/stm/stm32_i2s.c ret = regmap_write_bits(i2s->regmap, STM32_I2S_CR1_REG, i2s 627 sound/soc/stm/stm32_i2s.c regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG, i2s 630 sound/soc/stm/stm32_i2s.c spin_lock(&i2s->lock_fd); i2s 631 sound/soc/stm/stm32_i2s.c i2s->refcount++; i2s 637 sound/soc/stm/stm32_i2s.c if (STM32_I2S_IS_MASTER(i2s) && i2s->refcount == 1) i2s 639 sound/soc/stm/stm32_i2s.c regmap_write(i2s->regmap, i2s 642 sound/soc/stm/stm32_i2s.c spin_unlock(&i2s->lock_fd); i2s 644 sound/soc/stm/stm32_i2s.c if (STM32_I2S_IS_SLAVE(i2s)) i2s 647 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_IER_REG, ier, ier); i2s 656 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_IER_REG, i2s 660 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_IER_REG, i2s 664 sound/soc/stm/stm32_i2s.c spin_lock(&i2s->lock_fd); i2s 665 sound/soc/stm/stm32_i2s.c i2s->refcount--; i2s 666 sound/soc/stm/stm32_i2s.c if (i2s->refcount) { i2s 667 sound/soc/stm/stm32_i2s.c spin_unlock(&i2s->lock_fd); i2s 671 sound/soc/stm/stm32_i2s.c ret = regmap_update_bits(i2s->regmap, STM32_I2S_CR1_REG, i2s 675 sound/soc/stm/stm32_i2s.c spin_unlock(&i2s->lock_fd); i2s 678 sound/soc/stm/stm32_i2s.c spin_unlock(&i2s->lock_fd); i2s 681 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_CFG1_REG, i2s 694 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 697 sound/soc/stm/stm32_i2s.c regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 700 sound/soc/stm/stm32_i2s.c clk_disable_unprepare(i2s->i2sclk); i2s 702 sound/soc/stm/stm32_i2s.c spin_lock_irqsave(&i2s->irq_lock, flags); i2s 703 sound/soc/stm/stm32_i2s.c i2s->substream = NULL; i2s 704 sound/soc/stm/stm32_i2s.c spin_unlock_irqrestore(&i2s->irq_lock, flags); i2s 709 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = dev_get_drvdata(cpu_dai->dev); i2s 710 sound/soc/stm/stm32_i2s.c struct snd_dmaengine_dai_dma_data *dma_data_tx = &i2s->dma_data_tx; i2s 711 sound/soc/stm/stm32_i2s.c struct snd_dmaengine_dai_dma_data *dma_data_rx = &i2s->dma_data_rx; i2s 715 sound/soc/stm/stm32_i2s.c dma_data_tx->addr = (dma_addr_t)(i2s->phys_addr) + STM32_I2S_TXDR_REG; i2s 718 sound/soc/stm/stm32_i2s.c dma_data_rx->addr = (dma_addr_t)(i2s->phys_addr) + STM32_I2S_RXDR_REG; i2s 779 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s) i2s 793 sound/soc/stm/stm32_i2s.c i2s->dai_drv = dai_ptr; i2s 807 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s) i2s 820 sound/soc/stm/stm32_i2s.c i2s->regmap_conf = (const struct regmap_config *)of_id->data; i2s 825 sound/soc/stm/stm32_i2s.c i2s->base = devm_ioremap_resource(&pdev->dev, res); i2s 826 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->base)) i2s 827 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->base); i2s 829 sound/soc/stm/stm32_i2s.c i2s->phys_addr = res->start; i2s 832 sound/soc/stm/stm32_i2s.c i2s->pclk = devm_clk_get(&pdev->dev, "pclk"); i2s 833 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->pclk)) { i2s 835 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->pclk); i2s 838 sound/soc/stm/stm32_i2s.c i2s->i2sclk = devm_clk_get(&pdev->dev, "i2sclk"); i2s 839 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->i2sclk)) { i2s 841 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->i2sclk); i2s 844 sound/soc/stm/stm32_i2s.c i2s->x8kclk = devm_clk_get(&pdev->dev, "x8k"); i2s 845 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->x8kclk)) { i2s 847 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->x8kclk); i2s 850 sound/soc/stm/stm32_i2s.c i2s->x11kclk = devm_clk_get(&pdev->dev, "x11k"); i2s 851 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->x11kclk)) { i2s 853 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->x11kclk); i2s 862 sound/soc/stm/stm32_i2s.c dev_name(&pdev->dev), i2s); i2s 881 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s; i2s 885 sound/soc/stm/stm32_i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 886 sound/soc/stm/stm32_i2s.c if (!i2s) i2s 889 sound/soc/stm/stm32_i2s.c ret = stm32_i2s_parse_dt(pdev, i2s); i2s 893 sound/soc/stm/stm32_i2s.c i2s->pdev = pdev; i2s 894 sound/soc/stm/stm32_i2s.c i2s->ms_flg = I2S_MS_NOT_SET; i2s 895 sound/soc/stm/stm32_i2s.c spin_lock_init(&i2s->lock_fd); i2s 896 sound/soc/stm/stm32_i2s.c spin_lock_init(&i2s->irq_lock); i2s 897 sound/soc/stm/stm32_i2s.c platform_set_drvdata(pdev, i2s); i2s 899 sound/soc/stm/stm32_i2s.c ret = stm32_i2s_dais_init(pdev, i2s); i2s 903 sound/soc/stm/stm32_i2s.c i2s->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "pclk", i2s 904 sound/soc/stm/stm32_i2s.c i2s->base, i2s->regmap_conf); i2s 905 sound/soc/stm/stm32_i2s.c if (IS_ERR(i2s->regmap)) { i2s 907 sound/soc/stm/stm32_i2s.c return PTR_ERR(i2s->regmap); i2s 911 sound/soc/stm/stm32_i2s.c i2s->dai_drv, 1); i2s 921 sound/soc/stm/stm32_i2s.c ret = regmap_update_bits(i2s->regmap, STM32_I2S_CGFR_REG, i2s 926 sound/soc/stm/stm32_i2s.c ret = regmap_read(i2s->regmap, STM32_I2S_IPIDR_REG, &val); i2s 931 sound/soc/stm/stm32_i2s.c ret = regmap_read(i2s->regmap, STM32_I2S_HWCFGR_REG, &val); i2s 941 sound/soc/stm/stm32_i2s.c ret = regmap_read(i2s->regmap, STM32_I2S_VERR_REG, &val); i2s 956 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = dev_get_drvdata(dev); i2s 958 sound/soc/stm/stm32_i2s.c regcache_cache_only(i2s->regmap, true); i2s 959 sound/soc/stm/stm32_i2s.c regcache_mark_dirty(i2s->regmap); i2s 966 sound/soc/stm/stm32_i2s.c struct stm32_i2s_data *i2s = dev_get_drvdata(dev); i2s 968 sound/soc/stm/stm32_i2s.c regcache_cache_only(i2s->regmap, false); i2s 969 sound/soc/stm/stm32_i2s.c return regcache_sync(i2s->regmap); i2s 229 sound/soc/sunxi/sun4i-i2s.c static unsigned long sun4i_i2s_get_bclk_parent_rate(const struct sun4i_i2s *i2s) i2s 231 sound/soc/sunxi/sun4i-i2s.c return i2s->mclk_freq; i2s 234 sound/soc/sunxi/sun4i-i2s.c static unsigned long sun8i_i2s_get_bclk_parent_rate(const struct sun4i_i2s *i2s) i2s 236 sound/soc/sunxi/sun4i-i2s.c return clk_get_rate(i2s->mod_clk); i2s 239 sound/soc/sunxi/sun4i-i2s.c static int sun4i_i2s_get_bclk_div(struct sun4i_i2s *i2s, i2s 245 sound/soc/sunxi/sun4i-i2s.c const struct sun4i_i2s_clk_div *dividers = i2s->variant->bclk_dividers; i2s 249 sound/soc/sunxi/sun4i-i2s.c for (i = 0; i < i2s->variant->num_bclk_dividers; i++) { i2s 259 sound/soc/sunxi/sun4i-i2s.c static int sun4i_i2s_get_mclk_div(struct sun4i_i2s *i2s, i2s 263 sound/soc/sunxi/sun4i-i2s.c const struct sun4i_i2s_clk_div *dividers = i2s->variant->mclk_dividers; i2s 267 sound/soc/sunxi/sun4i-i2s.c for (i = 0; i < i2s->variant->num_mclk_dividers; i++) { i2s 294 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 326 sound/soc/sunxi/sun4i-i2s.c ret = clk_set_rate(i2s->mod_clk, clk_rate); i2s 330 sound/soc/sunxi/sun4i-i2s.c oversample_rate = i2s->mclk_freq / rate; i2s 337 sound/soc/sunxi/sun4i-i2s.c bclk_parent_rate = i2s->variant->get_bclk_parent_rate(i2s); i2s 338 sound/soc/sunxi/sun4i-i2s.c bclk_div = sun4i_i2s_get_bclk_div(i2s, bclk_parent_rate, i2s 345 sound/soc/sunxi/sun4i-i2s.c mclk_div = sun4i_i2s_get_mclk_div(i2s, clk_rate, i2s->mclk_freq); i2s 351 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN4I_I2S_CLK_DIV_REG, i2s 355 sound/soc/sunxi/sun4i-i2s.c regmap_field_write(i2s->field_clkdiv_mclk_en, 1); i2s 360 sound/soc/sunxi/sun4i-i2s.c static s8 sun4i_i2s_get_sr(const struct sun4i_i2s *i2s, int width) i2s 371 sound/soc/sunxi/sun4i-i2s.c static s8 sun4i_i2s_get_wss(const struct sun4i_i2s *i2s, int width) i2s 382 sound/soc/sunxi/sun4i-i2s.c static s8 sun8i_i2s_get_sr_wss(const struct sun4i_i2s *i2s, int width) i2s 393 sound/soc/sunxi/sun4i-i2s.c static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, i2s 399 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN4I_I2S_TX_CHAN_MAP_REG, 0x76543210); i2s 400 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN4I_I2S_RX_CHAN_MAP_REG, 0x00003210); i2s 403 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_TX_CHAN_SEL_REG, i2s 406 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_RX_CHAN_SEL_REG, i2s 413 sound/soc/sunxi/sun4i-i2s.c static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, i2s 420 sound/soc/sunxi/sun4i-i2s.c if (i2s->slots) i2s 421 sound/soc/sunxi/sun4i-i2s.c slots = i2s->slots; i2s 424 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG, 0x76543210); i2s 425 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN8I_I2S_RX_CHAN_MAP_REG, 0x76543210); i2s 428 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, i2s 431 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG, i2s 435 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, i2s 438 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, i2s 442 sound/soc/sunxi/sun4i-i2s.c switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { i2s 458 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, i2s 462 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, i2s 473 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 481 sound/soc/sunxi/sun4i-i2s.c if (i2s->slots) i2s 482 sound/soc/sunxi/sun4i-i2s.c slots = i2s->slots; i2s 484 sound/soc/sunxi/sun4i-i2s.c if (i2s->slot_width) i2s 485 sound/soc/sunxi/sun4i-i2s.c slot_width = i2s->slot_width; i2s 487 sound/soc/sunxi/sun4i-i2s.c ret = i2s->variant->set_chan_cfg(i2s, params); i2s 502 sound/soc/sunxi/sun4i-i2s.c i2s->playback_dma_data.addr_width = width; i2s 504 sound/soc/sunxi/sun4i-i2s.c sr = i2s->variant->get_sr(i2s, word_size); i2s 508 sound/soc/sunxi/sun4i-i2s.c wss = i2s->variant->get_wss(i2s, slot_width); i2s 512 sound/soc/sunxi/sun4i-i2s.c regmap_field_write(i2s->field_fmt_wss, wss); i2s 513 sound/soc/sunxi/sun4i-i2s.c regmap_field_write(i2s->field_fmt_sr, sr); i2s 519 sound/soc/sunxi/sun4i-i2s.c static int sun4i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, i2s 546 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, i2s 569 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, i2s 587 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 592 sound/soc/sunxi/sun4i-i2s.c static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, i2s 626 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, i2s 662 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 664 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, i2s 667 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG, i2s 687 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 696 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 699 sound/soc/sunxi/sun4i-i2s.c ret = i2s->variant->set_fmt(i2s, fmt); i2s 706 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, i2s 712 sound/soc/sunxi/sun4i-i2s.c i2s->format = fmt; i2s 717 sound/soc/sunxi/sun4i-i2s.c static void sun4i_i2s_start_capture(struct sun4i_i2s *i2s) i2s 720 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, i2s 725 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN4I_I2S_RX_CNT_REG, 0); i2s 728 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 733 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_DMA_INT_CTRL_REG, i2s 738 sound/soc/sunxi/sun4i-i2s.c static void sun4i_i2s_start_playback(struct sun4i_i2s *i2s) i2s 741 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, i2s 746 sound/soc/sunxi/sun4i-i2s.c regmap_write(i2s->regmap, SUN4I_I2S_TX_CNT_REG, 0); i2s 749 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 754 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_DMA_INT_CTRL_REG, i2s 759 sound/soc/sunxi/sun4i-i2s.c static void sun4i_i2s_stop_capture(struct sun4i_i2s *i2s) i2s 762 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 767 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_DMA_INT_CTRL_REG, i2s 772 sound/soc/sunxi/sun4i-i2s.c static void sun4i_i2s_stop_playback(struct sun4i_i2s *i2s) i2s 775 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 780 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_DMA_INT_CTRL_REG, i2s 788 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 795 sound/soc/sunxi/sun4i-i2s.c sun4i_i2s_start_playback(i2s); i2s 797 sound/soc/sunxi/sun4i-i2s.c sun4i_i2s_start_capture(i2s); i2s 804 sound/soc/sunxi/sun4i-i2s.c sun4i_i2s_stop_playback(i2s); i2s 806 sound/soc/sunxi/sun4i-i2s.c sun4i_i2s_stop_capture(i2s); i2s 819 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 824 sound/soc/sunxi/sun4i-i2s.c i2s->mclk_freq = freq; i2s 833 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 838 sound/soc/sunxi/sun4i-i2s.c i2s->slots = slots; i2s 839 sound/soc/sunxi/sun4i-i2s.c i2s->slot_width = slot_width; i2s 854 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 857 sound/soc/sunxi/sun4i-i2s.c &i2s->playback_dma_data, i2s 858 sound/soc/sunxi/sun4i-i2s.c &i2s->capture_dma_data); i2s 860 sound/soc/sunxi/sun4i-i2s.c snd_soc_dai_set_drvdata(dai, i2s); i2s 1003 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = dev_get_drvdata(dev); i2s 1006 sound/soc/sunxi/sun4i-i2s.c ret = clk_prepare_enable(i2s->bus_clk); i2s 1012 sound/soc/sunxi/sun4i-i2s.c regcache_cache_only(i2s->regmap, false); i2s 1013 sound/soc/sunxi/sun4i-i2s.c regcache_mark_dirty(i2s->regmap); i2s 1015 sound/soc/sunxi/sun4i-i2s.c ret = regcache_sync(i2s->regmap); i2s 1022 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 1026 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 1030 sound/soc/sunxi/sun4i-i2s.c ret = clk_prepare_enable(i2s->mod_clk); i2s 1039 sound/soc/sunxi/sun4i-i2s.c clk_disable_unprepare(i2s->bus_clk); i2s 1045 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = dev_get_drvdata(dev); i2s 1047 sound/soc/sunxi/sun4i-i2s.c clk_disable_unprepare(i2s->mod_clk); i2s 1050 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 1054 sound/soc/sunxi/sun4i-i2s.c regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, i2s 1057 sound/soc/sunxi/sun4i-i2s.c regcache_cache_only(i2s->regmap, true); i2s 1059 sound/soc/sunxi/sun4i-i2s.c clk_disable_unprepare(i2s->bus_clk); i2s 1160 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s) i2s 1162 sound/soc/sunxi/sun4i-i2s.c i2s->field_clkdiv_mclk_en = i2s 1163 sound/soc/sunxi/sun4i-i2s.c devm_regmap_field_alloc(dev, i2s->regmap, i2s 1164 sound/soc/sunxi/sun4i-i2s.c i2s->variant->field_clkdiv_mclk_en); i2s 1165 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->field_clkdiv_mclk_en)) i2s 1166 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->field_clkdiv_mclk_en); i2s 1168 sound/soc/sunxi/sun4i-i2s.c i2s->field_fmt_wss = i2s 1169 sound/soc/sunxi/sun4i-i2s.c devm_regmap_field_alloc(dev, i2s->regmap, i2s 1170 sound/soc/sunxi/sun4i-i2s.c i2s->variant->field_fmt_wss); i2s 1171 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->field_fmt_wss)) i2s 1172 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->field_fmt_wss); i2s 1174 sound/soc/sunxi/sun4i-i2s.c i2s->field_fmt_sr = i2s 1175 sound/soc/sunxi/sun4i-i2s.c devm_regmap_field_alloc(dev, i2s->regmap, i2s 1176 sound/soc/sunxi/sun4i-i2s.c i2s->variant->field_fmt_sr); i2s 1177 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->field_fmt_sr)) i2s 1178 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->field_fmt_sr); i2s 1185 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s; i2s 1190 sound/soc/sunxi/sun4i-i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 1191 sound/soc/sunxi/sun4i-i2s.c if (!i2s) i2s 1193 sound/soc/sunxi/sun4i-i2s.c platform_set_drvdata(pdev, i2s); i2s 1204 sound/soc/sunxi/sun4i-i2s.c i2s->variant = of_device_get_match_data(&pdev->dev); i2s 1205 sound/soc/sunxi/sun4i-i2s.c if (!i2s->variant) { i2s 1210 sound/soc/sunxi/sun4i-i2s.c i2s->bus_clk = devm_clk_get(&pdev->dev, "apb"); i2s 1211 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->bus_clk)) { i2s 1213 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->bus_clk); i2s 1216 sound/soc/sunxi/sun4i-i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, i2s 1217 sound/soc/sunxi/sun4i-i2s.c i2s->variant->sun4i_i2s_regmap); i2s 1218 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->regmap)) { i2s 1220 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->regmap); i2s 1223 sound/soc/sunxi/sun4i-i2s.c i2s->mod_clk = devm_clk_get(&pdev->dev, "mod"); i2s 1224 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->mod_clk)) { i2s 1226 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->mod_clk); i2s 1229 sound/soc/sunxi/sun4i-i2s.c if (i2s->variant->has_reset) { i2s 1230 sound/soc/sunxi/sun4i-i2s.c i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL); i2s 1231 sound/soc/sunxi/sun4i-i2s.c if (IS_ERR(i2s->rst)) { i2s 1233 sound/soc/sunxi/sun4i-i2s.c return PTR_ERR(i2s->rst); i2s 1237 sound/soc/sunxi/sun4i-i2s.c if (!IS_ERR(i2s->rst)) { i2s 1238 sound/soc/sunxi/sun4i-i2s.c ret = reset_control_deassert(i2s->rst); i2s 1246 sound/soc/sunxi/sun4i-i2s.c i2s->playback_dma_data.addr = res->start + i2s 1247 sound/soc/sunxi/sun4i-i2s.c i2s->variant->reg_offset_txdata; i2s 1248 sound/soc/sunxi/sun4i-i2s.c i2s->playback_dma_data.maxburst = 8; i2s 1250 sound/soc/sunxi/sun4i-i2s.c i2s->capture_dma_data.addr = res->start + SUN4I_I2S_FIFO_RX_REG; i2s 1251 sound/soc/sunxi/sun4i-i2s.c i2s->capture_dma_data.maxburst = 8; i2s 1260 sound/soc/sunxi/sun4i-i2s.c ret = sun4i_i2s_init_regmap_fields(&pdev->dev, i2s); i2s 1287 sound/soc/sunxi/sun4i-i2s.c if (!IS_ERR(i2s->rst)) i2s 1288 sound/soc/sunxi/sun4i-i2s.c reset_control_assert(i2s->rst); i2s 1295 sound/soc/sunxi/sun4i-i2s.c struct sun4i_i2s *i2s = dev_get_drvdata(&pdev->dev); i2s 1301 sound/soc/sunxi/sun4i-i2s.c if (!IS_ERR(i2s->rst)) i2s 1302 sound/soc/sunxi/sun4i-i2s.c reset_control_assert(i2s->rst); i2s 38 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = dev_get_drvdata(dev); i2s 40 sound/soc/tegra/tegra20_i2s.c clk_disable_unprepare(i2s->clk_i2s); i2s 47 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = dev_get_drvdata(dev); i2s 50 sound/soc/tegra/tegra20_i2s.c ret = clk_prepare_enable(i2s->clk_i2s); i2s 62 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 110 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, mask, val); i2s 120 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 145 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, mask, val); i2s 152 sound/soc/tegra/tegra20_i2s.c ret = clk_set_rate(i2s->clk_i2s, i2sclock); i2s 166 sound/soc/tegra/tegra20_i2s.c regmap_write(i2s->regmap, TEGRA20_I2S_TIMING, val); i2s 168 sound/soc/tegra/tegra20_i2s.c regmap_write(i2s->regmap, TEGRA20_I2S_FIFO_SCR, i2s 175 sound/soc/tegra/tegra20_i2s.c static void tegra20_i2s_start_playback(struct tegra20_i2s *i2s) i2s 177 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, i2s 182 sound/soc/tegra/tegra20_i2s.c static void tegra20_i2s_stop_playback(struct tegra20_i2s *i2s) i2s 184 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, i2s 188 sound/soc/tegra/tegra20_i2s.c static void tegra20_i2s_start_capture(struct tegra20_i2s *i2s) i2s 190 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, i2s 195 sound/soc/tegra/tegra20_i2s.c static void tegra20_i2s_stop_capture(struct tegra20_i2s *i2s) i2s 197 sound/soc/tegra/tegra20_i2s.c regmap_update_bits(i2s->regmap, TEGRA20_I2S_CTRL, i2s 204 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 211 sound/soc/tegra/tegra20_i2s.c tegra20_i2s_start_playback(i2s); i2s 213 sound/soc/tegra/tegra20_i2s.c tegra20_i2s_start_capture(i2s); i2s 219 sound/soc/tegra/tegra20_i2s.c tegra20_i2s_stop_playback(i2s); i2s 221 sound/soc/tegra/tegra20_i2s.c tegra20_i2s_stop_capture(i2s); i2s 232 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 234 sound/soc/tegra/tegra20_i2s.c dai->capture_dma_data = &i2s->capture_dma_data; i2s 235 sound/soc/tegra/tegra20_i2s.c dai->playback_dma_data = &i2s->playback_dma_data; i2s 327 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s; i2s 332 sound/soc/tegra/tegra20_i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_i2s), GFP_KERNEL); i2s 333 sound/soc/tegra/tegra20_i2s.c if (!i2s) { i2s 337 sound/soc/tegra/tegra20_i2s.c dev_set_drvdata(&pdev->dev, i2s); i2s 339 sound/soc/tegra/tegra20_i2s.c i2s->dai = tegra20_i2s_dai_template; i2s 340 sound/soc/tegra/tegra20_i2s.c i2s->dai.name = dev_name(&pdev->dev); i2s 342 sound/soc/tegra/tegra20_i2s.c i2s->clk_i2s = clk_get(&pdev->dev, NULL); i2s 343 sound/soc/tegra/tegra20_i2s.c if (IS_ERR(i2s->clk_i2s)) { i2s 345 sound/soc/tegra/tegra20_i2s.c ret = PTR_ERR(i2s->clk_i2s); i2s 356 sound/soc/tegra/tegra20_i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, i2s 358 sound/soc/tegra/tegra20_i2s.c if (IS_ERR(i2s->regmap)) { i2s 360 sound/soc/tegra/tegra20_i2s.c ret = PTR_ERR(i2s->regmap); i2s 364 sound/soc/tegra/tegra20_i2s.c i2s->capture_dma_data.addr = mem->start + TEGRA20_I2S_FIFO2; i2s 365 sound/soc/tegra/tegra20_i2s.c i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 366 sound/soc/tegra/tegra20_i2s.c i2s->capture_dma_data.maxburst = 4; i2s 368 sound/soc/tegra/tegra20_i2s.c i2s->playback_dma_data.addr = mem->start + TEGRA20_I2S_FIFO1; i2s 369 sound/soc/tegra/tegra20_i2s.c i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 370 sound/soc/tegra/tegra20_i2s.c i2s->playback_dma_data.maxburst = 4; i2s 380 sound/soc/tegra/tegra20_i2s.c &i2s->dai, 1); i2s 403 sound/soc/tegra/tegra20_i2s.c clk_put(i2s->clk_i2s); i2s 410 sound/soc/tegra/tegra20_i2s.c struct tegra20_i2s *i2s = dev_get_drvdata(&pdev->dev); i2s 419 sound/soc/tegra/tegra20_i2s.c clk_put(i2s->clk_i2s); i2s 40 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = dev_get_drvdata(dev); i2s 42 sound/soc/tegra/tegra30_i2s.c regcache_cache_only(i2s->regmap, true); i2s 44 sound/soc/tegra/tegra30_i2s.c clk_disable_unprepare(i2s->clk_i2s); i2s 51 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = dev_get_drvdata(dev); i2s 54 sound/soc/tegra/tegra30_i2s.c ret = clk_prepare_enable(i2s->clk_i2s); i2s 60 sound/soc/tegra/tegra30_i2s.c regcache_cache_only(i2s->regmap, false); i2s 68 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 117 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, mask, val); i2s 128 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 146 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, mask, val); i2s 157 sound/soc/tegra/tegra30_i2s.c ret = clk_set_rate(i2s->clk_i2s, i2sclock); i2s 168 sound/soc/tegra/tegra30_i2s.c regmap_write(i2s->regmap, TEGRA30_I2S_TIMING, val); i2s 189 sound/soc/tegra/tegra30_i2s.c i2s->soc_data->set_audio_cif(i2s->regmap, reg, &cif_conf); i2s 193 sound/soc/tegra/tegra30_i2s.c regmap_write(i2s->regmap, TEGRA30_I2S_OFFSET, val); i2s 198 sound/soc/tegra/tegra30_i2s.c static void tegra30_i2s_start_playback(struct tegra30_i2s *i2s) i2s 200 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_enable_tx_fifo(i2s->playback_fifo_cif); i2s 201 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, i2s 206 sound/soc/tegra/tegra30_i2s.c static void tegra30_i2s_stop_playback(struct tegra30_i2s *i2s) i2s 208 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_disable_tx_fifo(i2s->playback_fifo_cif); i2s 209 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, i2s 213 sound/soc/tegra/tegra30_i2s.c static void tegra30_i2s_start_capture(struct tegra30_i2s *i2s) i2s 215 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_enable_rx_fifo(i2s->capture_fifo_cif); i2s 216 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, i2s 221 sound/soc/tegra/tegra30_i2s.c static void tegra30_i2s_stop_capture(struct tegra30_i2s *i2s) i2s 223 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_disable_rx_fifo(i2s->capture_fifo_cif); i2s 224 sound/soc/tegra/tegra30_i2s.c regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, i2s 231 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 238 sound/soc/tegra/tegra30_i2s.c tegra30_i2s_start_playback(i2s); i2s 240 sound/soc/tegra/tegra30_i2s.c tegra30_i2s_start_capture(i2s); i2s 246 sound/soc/tegra/tegra30_i2s.c tegra30_i2s_stop_playback(i2s); i2s 248 sound/soc/tegra/tegra30_i2s.c tegra30_i2s_stop_capture(i2s); i2s 259 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 261 sound/soc/tegra/tegra30_i2s.c dai->capture_dma_data = &i2s->capture_dma_data; i2s 262 sound/soc/tegra/tegra30_i2s.c dai->playback_dma_data = &i2s->playback_dma_data; i2s 368 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s; i2s 374 sound/soc/tegra/tegra30_i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_i2s), GFP_KERNEL); i2s 375 sound/soc/tegra/tegra30_i2s.c if (!i2s) { i2s 379 sound/soc/tegra/tegra30_i2s.c dev_set_drvdata(&pdev->dev, i2s); i2s 387 sound/soc/tegra/tegra30_i2s.c i2s->soc_data = (struct tegra30_i2s_soc_data *)match->data; i2s 389 sound/soc/tegra/tegra30_i2s.c i2s->dai = tegra30_i2s_dai_template; i2s 390 sound/soc/tegra/tegra30_i2s.c i2s->dai.name = dev_name(&pdev->dev); i2s 398 sound/soc/tegra/tegra30_i2s.c i2s->playback_i2s_cif = cif_ids[0]; i2s 399 sound/soc/tegra/tegra30_i2s.c i2s->capture_i2s_cif = cif_ids[1]; i2s 401 sound/soc/tegra/tegra30_i2s.c i2s->clk_i2s = clk_get(&pdev->dev, NULL); i2s 402 sound/soc/tegra/tegra30_i2s.c if (IS_ERR(i2s->clk_i2s)) { i2s 404 sound/soc/tegra/tegra30_i2s.c ret = PTR_ERR(i2s->clk_i2s); i2s 414 sound/soc/tegra/tegra30_i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, i2s 416 sound/soc/tegra/tegra30_i2s.c if (IS_ERR(i2s->regmap)) { i2s 418 sound/soc/tegra/tegra30_i2s.c ret = PTR_ERR(i2s->regmap); i2s 421 sound/soc/tegra/tegra30_i2s.c regcache_cache_only(i2s->regmap, true); i2s 430 sound/soc/tegra/tegra30_i2s.c i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 431 sound/soc/tegra/tegra30_i2s.c i2s->playback_dma_data.maxburst = 4; i2s 432 sound/soc/tegra/tegra30_i2s.c ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif, i2s 433 sound/soc/tegra/tegra30_i2s.c i2s->playback_dma_chan, i2s 434 sound/soc/tegra/tegra30_i2s.c sizeof(i2s->playback_dma_chan), i2s 435 sound/soc/tegra/tegra30_i2s.c &i2s->playback_dma_data.addr); i2s 440 sound/soc/tegra/tegra30_i2s.c ret = tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif, i2s 441 sound/soc/tegra/tegra30_i2s.c i2s->playback_fifo_cif); i2s 447 sound/soc/tegra/tegra30_i2s.c i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; i2s 448 sound/soc/tegra/tegra30_i2s.c i2s->capture_dma_data.maxburst = 4; i2s 449 sound/soc/tegra/tegra30_i2s.c ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif, i2s 450 sound/soc/tegra/tegra30_i2s.c i2s->capture_dma_chan, i2s 451 sound/soc/tegra/tegra30_i2s.c sizeof(i2s->capture_dma_chan), i2s 452 sound/soc/tegra/tegra30_i2s.c &i2s->capture_dma_data.addr); i2s 457 sound/soc/tegra/tegra30_i2s.c ret = tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif, i2s 458 sound/soc/tegra/tegra30_i2s.c i2s->capture_i2s_cif); i2s 465 sound/soc/tegra/tegra30_i2s.c &i2s->dai, 1); i2s 473 sound/soc/tegra/tegra30_i2s.c &i2s->dma_config, i2s->playback_dma_chan, i2s 474 sound/soc/tegra/tegra30_i2s.c i2s->capture_dma_chan); i2s 485 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); i2s 487 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); i2s 489 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); i2s 491 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); i2s 498 sound/soc/tegra/tegra30_i2s.c clk_put(i2s->clk_i2s); i2s 505 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = dev_get_drvdata(&pdev->dev); i2s 514 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif); i2s 515 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif); i2s 517 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif); i2s 518 sound/soc/tegra/tegra30_i2s.c tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); i2s 520 sound/soc/tegra/tegra30_i2s.c clk_put(i2s->clk_i2s); i2s 528 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = dev_get_drvdata(dev); i2s 530 sound/soc/tegra/tegra30_i2s.c regcache_mark_dirty(i2s->regmap); i2s 537 sound/soc/tegra/tegra30_i2s.c struct tegra30_i2s *i2s = dev_get_drvdata(dev); i2s 543 sound/soc/tegra/tegra30_i2s.c ret = regcache_sync(i2s->regmap); i2s 76 sound/soc/xtensa/xtfpga-i2s.c unsigned (*tx_fn)(struct xtfpga_i2s *i2s, i2s 131 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s, struct snd_pcm_runtime *runtime, \ i2s 137 sound/soc/xtensa/xtfpga-i2s.c for (; i2s->tx_fifo_level < i2s->tx_fifo_high; \ i2s 138 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_level += 2) { \ i2s 140 sound/soc/xtensa/xtfpga-i2s.c i2s->regs + XTFPGA_I2S_CHAN0_DATA); \ i2s 142 sound/soc/xtensa/xtfpga-i2s.c i2s->regs + XTFPGA_I2S_CHAN0_DATA); \ i2s 156 sound/soc/xtensa/xtfpga-i2s.c static bool xtfpga_pcm_push_tx(struct xtfpga_i2s *i2s) i2s 162 sound/soc/xtensa/xtfpga-i2s.c tx_substream = rcu_dereference(i2s->tx_substream); i2s 165 sound/soc/xtensa/xtfpga-i2s.c unsigned tx_ptr = READ_ONCE(i2s->tx_ptr); i2s 166 sound/soc/xtensa/xtfpga-i2s.c unsigned new_tx_ptr = i2s->tx_fn(i2s, tx_substream->runtime, i2s 169 sound/soc/xtensa/xtfpga-i2s.c cmpxchg(&i2s->tx_ptr, tx_ptr, new_tx_ptr); i2s 176 sound/soc/xtensa/xtfpga-i2s.c static void xtfpga_pcm_refill_fifo(struct xtfpga_i2s *i2s) i2s 181 sound/soc/xtensa/xtfpga-i2s.c regmap_read(i2s->regmap, XTFPGA_I2S_INT_STATUS, i2s 185 sound/soc/xtensa/xtfpga-i2s.c bool tx_active = xtfpga_pcm_push_tx(i2s); i2s 187 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_STATUS, i2s 190 sound/soc/xtensa/xtfpga-i2s.c regmap_read(i2s->regmap, XTFPGA_I2S_INT_STATUS, i2s 201 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_level = i2s->tx_fifo_low; i2s 205 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_MASK, i2s 208 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_MASK, i2s 212 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 218 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 225 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = dev_id; i2s 229 sound/soc/xtensa/xtfpga-i2s.c regmap_read(i2s->regmap, XTFPGA_I2S_CONFIG, &config); i2s 230 sound/soc/xtensa/xtfpga-i2s.c regmap_read(i2s->regmap, XTFPGA_I2S_INT_MASK, &int_mask); i2s 231 sound/soc/xtensa/xtfpga-i2s.c regmap_read(i2s->regmap, XTFPGA_I2S_INT_STATUS, &int_status); i2s 241 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_level = 0; i2s 242 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 248 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_level = i2s->tx_fifo_low; i2s 252 sound/soc/xtensa/xtfpga-i2s.c tx_substream = rcu_dereference(i2s->tx_substream); i2s 257 sound/soc/xtensa/xtfpga-i2s.c dev_dbg_ratelimited(i2s->dev, "%s: underrun\n", i2s 265 sound/soc/xtensa/xtfpga-i2s.c xtfpga_pcm_refill_fifo(i2s); i2s 273 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 275 sound/soc/xtensa/xtfpga-i2s.c snd_soc_dai_set_dma_data(dai, substream, i2s); i2s 283 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = snd_soc_dai_get_drvdata(dai); i2s 291 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 296 sound/soc/xtensa/xtfpga-i2s.c err = clk_set_rate(i2s->clk, freq); i2s 309 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 313 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_low = XTFPGA_I2S_FIFO_SIZE / 2; i2s 317 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_low / 2 >= period_size * 2 && i2s 320 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_low /= 2; i2s 322 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fifo_high = 2 * i2s->tx_fifo_low; i2s 324 sound/soc/xtensa/xtfpga-i2s.c regmap_update_bits(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 328 sound/soc/xtensa/xtfpga-i2s.c dev_dbg(i2s->dev, i2s 331 sound/soc/xtensa/xtfpga-i2s.c dev_dbg(i2s->dev, "%s freq: %u, ratio: %u, level: %u\n", i2s 392 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = runtime->private_data; i2s 407 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fn = (channels == 1) ? i2s 413 sound/soc/xtensa/xtfpga-i2s.c i2s->tx_fn = (channels == 1) ? i2s 431 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = runtime->private_data; i2s 437 sound/soc/xtensa/xtfpga-i2s.c WRITE_ONCE(i2s->tx_ptr, 0); i2s 438 sound/soc/xtensa/xtfpga-i2s.c rcu_assign_pointer(i2s->tx_substream, substream); i2s 439 sound/soc/xtensa/xtfpga-i2s.c xtfpga_pcm_refill_fifo(i2s); i2s 445 sound/soc/xtensa/xtfpga-i2s.c rcu_assign_pointer(i2s->tx_substream, NULL); i2s 458 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = runtime->private_data; i2s 459 sound/soc/xtensa/xtfpga-i2s.c snd_pcm_uframes_t pos = READ_ONCE(i2s->tx_ptr); i2s 512 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = dev_get_drvdata(dev); i2s 514 sound/soc/xtensa/xtfpga-i2s.c clk_disable_unprepare(i2s->clk); i2s 520 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = dev_get_drvdata(dev); i2s 523 sound/soc/xtensa/xtfpga-i2s.c ret = clk_prepare_enable(i2s->clk); i2s 533 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s; i2s 536 sound/soc/xtensa/xtfpga-i2s.c i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); i2s 537 sound/soc/xtensa/xtfpga-i2s.c if (!i2s) { i2s 541 sound/soc/xtensa/xtfpga-i2s.c platform_set_drvdata(pdev, i2s); i2s 542 sound/soc/xtensa/xtfpga-i2s.c i2s->dev = &pdev->dev; i2s 543 sound/soc/xtensa/xtfpga-i2s.c dev_dbg(&pdev->dev, "dev: %p, i2s: %p\n", &pdev->dev, i2s); i2s 545 sound/soc/xtensa/xtfpga-i2s.c i2s->regs = devm_platform_ioremap_resource(pdev, 0); i2s 546 sound/soc/xtensa/xtfpga-i2s.c if (IS_ERR(i2s->regs)) { i2s 547 sound/soc/xtensa/xtfpga-i2s.c err = PTR_ERR(i2s->regs); i2s 551 sound/soc/xtensa/xtfpga-i2s.c i2s->regmap = devm_regmap_init_mmio(&pdev->dev, i2s->regs, i2s 553 sound/soc/xtensa/xtfpga-i2s.c if (IS_ERR(i2s->regmap)) { i2s 555 sound/soc/xtensa/xtfpga-i2s.c err = PTR_ERR(i2s->regmap); i2s 559 sound/soc/xtensa/xtfpga-i2s.c i2s->clk = devm_clk_get(&pdev->dev, NULL); i2s 560 sound/soc/xtensa/xtfpga-i2s.c if (IS_ERR(i2s->clk)) { i2s 562 sound/soc/xtensa/xtfpga-i2s.c err = PTR_ERR(i2s->clk); i2s 566 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_CONFIG, i2s 568 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_STATUS, XTFPGA_I2S_INT_VALID); i2s 569 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_MASK, XTFPGA_I2S_INT_UNDERRUN); i2s 579 sound/soc/xtensa/xtfpga-i2s.c pdev->name, i2s); i2s 611 sound/soc/xtensa/xtfpga-i2s.c struct xtfpga_i2s *i2s = dev_get_drvdata(&pdev->dev); i2s 613 sound/soc/xtensa/xtfpga-i2s.c if (i2s->regmap && !IS_ERR(i2s->regmap)) { i2s 614 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_CONFIG, 0); i2s 615 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_MASK, 0); i2s 616 sound/soc/xtensa/xtfpga-i2s.c regmap_write(i2s->regmap, XTFPGA_I2S_INT_STATUS, i2s 177 sound/soc/zte/zx-i2s.c struct zx_i2s_info *i2s = snd_soc_dai_get_drvdata(cpu_dai); i2s 180 sound/soc/zte/zx-i2s.c val = readl_relaxed(i2s->reg_base + ZX_I2S_TIMING_CTRL); i2s 203 sound/soc/zte/zx-i2s.c i2s->master = 0; i2s 208 sound/soc/zte/zx-i2s.c i2s->master = 1; i2s 216 sound/soc/zte/zx-i2s.c writel_relaxed(val, i2s->reg_base + ZX_I2S_TIMING_CTRL); i2s 224 sound/soc/zte/zx-i2s.c struct zx_i2s_info *i2s = snd_soc_dai_get_drvdata(socdai); i2s 234 sound/soc/zte/zx-i2s.c val = readl_relaxed(i2s->reg_base + ZX_I2S_TIMING_CTRL); i2s 275 sound/soc/zte/zx-i2s.c writel_relaxed(val, i2s->reg_base + ZX_I2S_TIMING_CTRL); i2s 277 sound/soc/zte/zx-i2s.c if (i2s->master) i2s 278 sound/soc/zte/zx-i2s.c ret = clk_set_rate(i2s->dai_wclk,