Lines Matching full:adx

3 // tegra210_adx.c - Tegra210 ADX driver
35 static void tegra210_adx_write_map_ram(struct tegra210_adx *adx) in tegra210_adx_write_map_ram() argument
39 regmap_write(adx->regmap, TEGRA210_ADX_CFG_RAM_CTRL, in tegra210_adx_write_map_ram()
45 regmap_write(adx->regmap, TEGRA210_ADX_CFG_RAM_DATA, in tegra210_adx_write_map_ram()
46 adx->map[i]); in tegra210_adx_write_map_ram()
48 regmap_write(adx->regmap, TEGRA210_ADX_IN_BYTE_EN0, adx->byte_mask[0]); in tegra210_adx_write_map_ram()
49 regmap_write(adx->regmap, TEGRA210_ADX_IN_BYTE_EN1, adx->byte_mask[1]); in tegra210_adx_write_map_ram()
55 struct tegra210_adx *adx = snd_soc_dai_get_drvdata(dai); in tegra210_adx_startup() local
59 /* Ensure if ADX status is disabled */ in tegra210_adx_startup()
60 err = regmap_read_poll_timeout_atomic(adx->regmap, TEGRA210_ADX_STATUS, in tegra210_adx_startup()
63 dev_err(dai->dev, "failed to stop ADX, err = %d\n", err); in tegra210_adx_startup()
73 regmap_update_bits(adx->regmap, TEGRA210_ADX_SOFT_RESET, in tegra210_adx_startup()
77 err = regmap_read_poll_timeout(adx->regmap, TEGRA210_ADX_SOFT_RESET, in tegra210_adx_startup()
80 dev_err(dai->dev, "failed to reset ADX, err = %d\n", err); in tegra210_adx_startup()
89 struct tegra210_adx *adx = dev_get_drvdata(dev); in tegra210_adx_runtime_suspend() local
91 regcache_cache_only(adx->regmap, true); in tegra210_adx_runtime_suspend()
92 regcache_mark_dirty(adx->regmap); in tegra210_adx_runtime_suspend()
99 struct tegra210_adx *adx = dev_get_drvdata(dev); in tegra210_adx_runtime_resume() local
101 regcache_cache_only(adx->regmap, false); in tegra210_adx_runtime_resume()
102 regcache_sync(adx->regmap); in tegra210_adx_runtime_resume()
104 tegra210_adx_write_map_ram(adx); in tegra210_adx_runtime_resume()
114 struct tegra210_adx *adx = snd_soc_dai_get_drvdata(dai); in tegra210_adx_set_audio_cif() local
142 tegra_set_cif(adx->regmap, reg, &cif_conf); in tegra210_adx_set_audio_cif()
169 struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); in tegra210_adx_get_byte_map() local
171 unsigned char *bytes_map = (unsigned char *)&adx->map; in tegra210_adx_get_byte_map()
175 enabled = adx->byte_mask[mc->reg / 32] & (1 << (mc->reg % 32)); in tegra210_adx_get_byte_map()
199 struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); in tegra210_adx_put_byte_map() local
200 unsigned char *bytes_map = (unsigned char *)&adx->map; in tegra210_adx_put_byte_map()
204 unsigned int mask_val = adx->byte_mask[mc->reg / 32]; in tegra210_adx_put_byte_map()
211 if (mask_val == adx->byte_mask[mc->reg / 32]) in tegra210_adx_put_byte_map()
216 adx->byte_mask[mc->reg / 32] = mask_val; in tegra210_adx_put_byte_map()
232 .name = "ADX-RX-CIF", \
256 .name = "ADX-TX" #id "-CIF", \
472 { .compatible = "nvidia,tegra210-adx" },
480 struct tegra210_adx *adx; in tegra210_adx_platform_probe() local
484 adx = devm_kzalloc(dev, sizeof(*adx), GFP_KERNEL); in tegra210_adx_platform_probe()
485 if (!adx) in tegra210_adx_platform_probe()
488 dev_set_drvdata(dev, adx); in tegra210_adx_platform_probe()
494 adx->regmap = devm_regmap_init_mmio(dev, regs, in tegra210_adx_platform_probe()
496 if (IS_ERR(adx->regmap)) { in tegra210_adx_platform_probe()
498 return PTR_ERR(adx->regmap); in tegra210_adx_platform_probe()
501 regcache_cache_only(adx->regmap, true); in tegra210_adx_platform_probe()
507 dev_err(dev, "can't register ADX component, err: %d\n", err); in tegra210_adx_platform_probe()
530 .name = "tegra210-adx",
540 MODULE_DESCRIPTION("Tegra210 ADX ASoC driver");