Lines Matching refs:amx

49 static void tegra210_amx_write_map_ram(struct tegra210_amx *amx)  in tegra210_amx_write_map_ram()  argument
53 regmap_write(amx->regmap, TEGRA210_AMX_CFG_RAM_CTRL, in tegra210_amx_write_map_ram()
59 regmap_write(amx->regmap, TEGRA210_AMX_CFG_RAM_DATA, in tegra210_amx_write_map_ram()
60 amx->map[i]); in tegra210_amx_write_map_ram()
62 regmap_write(amx->regmap, TEGRA210_AMX_OUT_BYTE_EN0, amx->byte_mask[0]); in tegra210_amx_write_map_ram()
63 regmap_write(amx->regmap, TEGRA210_AMX_OUT_BYTE_EN1, amx->byte_mask[1]); in tegra210_amx_write_map_ram()
69 struct tegra210_amx *amx = snd_soc_dai_get_drvdata(dai); in tegra210_amx_startup() local
74 err = regmap_read_poll_timeout(amx->regmap, TEGRA210_AMX_STATUS, val, in tegra210_amx_startup()
87 regmap_update_bits(amx->regmap, TEGRA210_AMX_SOFT_RESET, in tegra210_amx_startup()
91 err = regmap_read_poll_timeout(amx->regmap, TEGRA210_AMX_SOFT_RESET, in tegra210_amx_startup()
103 struct tegra210_amx *amx = dev_get_drvdata(dev); in tegra210_amx_runtime_suspend() local
105 regcache_cache_only(amx->regmap, true); in tegra210_amx_runtime_suspend()
106 regcache_mark_dirty(amx->regmap); in tegra210_amx_runtime_suspend()
113 struct tegra210_amx *amx = dev_get_drvdata(dev); in tegra210_amx_runtime_resume() local
115 regcache_cache_only(amx->regmap, false); in tegra210_amx_runtime_resume()
116 regcache_sync(amx->regmap); in tegra210_amx_runtime_resume()
118 regmap_update_bits(amx->regmap, in tegra210_amx_runtime_resume()
123 tegra210_amx_write_map_ram(amx); in tegra210_amx_runtime_resume()
132 struct tegra210_amx *amx = snd_soc_dai_get_drvdata(dai); in tegra210_amx_set_audio_cif() local
160 tegra_set_cif(amx->regmap, reg, &cif_conf); in tegra210_amx_set_audio_cif()
169 struct tegra210_amx *amx = snd_soc_dai_get_drvdata(dai); in tegra210_amx_in_hw_params() local
171 if (amx->soc_data->auto_disable) { in tegra210_amx_in_hw_params()
172 regmap_write(amx->regmap, in tegra210_amx_in_hw_params()
175 regmap_write(amx->regmap, TEGRA210_AMX_CYA, 1); in tegra210_amx_in_hw_params()
196 struct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt); in tegra210_amx_get_byte_map() local
197 unsigned char *bytes_map = (unsigned char *)&amx->map; in tegra210_amx_get_byte_map()
202 enabled = amx->byte_mask[1] & (1 << (reg - 32)); in tegra210_amx_get_byte_map()
204 enabled = amx->byte_mask[0] & (1 << reg); in tegra210_amx_get_byte_map()
230 struct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt); in tegra210_amx_put_byte_map() local
231 unsigned char *bytes_map = (unsigned char *)&amx->map; in tegra210_amx_put_byte_map()
234 unsigned int mask_val = amx->byte_mask[reg / 32]; in tegra210_amx_put_byte_map()
241 if (mask_val == amx->byte_mask[reg / 32]) in tegra210_amx_put_byte_map()
246 amx->byte_mask[reg / 32] = mask_val; in tegra210_amx_put_byte_map()
540 struct tegra210_amx *amx; in tegra210_amx_platform_probe() local
544 amx = devm_kzalloc(dev, sizeof(*amx), GFP_KERNEL); in tegra210_amx_platform_probe()
545 if (!amx) in tegra210_amx_platform_probe()
548 amx->soc_data = device_get_match_data(dev); in tegra210_amx_platform_probe()
550 dev_set_drvdata(dev, amx); in tegra210_amx_platform_probe()
556 amx->regmap = devm_regmap_init_mmio(dev, regs, in tegra210_amx_platform_probe()
557 amx->soc_data->regmap_conf); in tegra210_amx_platform_probe()
558 if (IS_ERR(amx->regmap)) { in tegra210_amx_platform_probe()
560 return PTR_ERR(amx->regmap); in tegra210_amx_platform_probe()
563 regcache_cache_only(amx->regmap, true); in tegra210_amx_platform_probe()