H A D | adau1373.c | 23 #include <sound/adau1373.h> 25 #include "adau1373.h" 34 struct adau1373 { struct 552 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_pll_event() local 561 regmap_update_bits(adau1373->regmap, ADAU1373_PLL_CTRL6(pll_id), adau1373_pll_event() 824 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_check_aif_clk() local 830 if (!adau1373->dais[dai].master) adau1373_check_aif_clk() 833 if (adau1373->dais[dai].clk_src == ADAU1373_CLK_SRC_PLL1) adau1373_check_aif_clk() 845 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_check_src() local 850 return adau1373->dais[dai].enable_src; adau1373_check_src() 1034 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_hw_params() local 1035 struct adau1373_dai *adau1373_dai = &adau1373->dais[dai->id]; adau1373_hw_params() 1073 regmap_update_bits(adau1373->regmap, ADAU1373_BCLKDIV(dai->id), adau1373_hw_params() 1094 return regmap_update_bits(adau1373->regmap, ADAU1373_DAI(dai->id), adau1373_hw_params() 1101 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_set_dai_fmt() local 1102 struct adau1373_dai *adau1373_dai = &adau1373->dais[dai->id]; adau1373_set_dai_fmt() 1151 regmap_update_bits(adau1373->regmap, ADAU1373_DAI(dai->id), adau1373_set_dai_fmt() 1160 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(dai->codec); adau1373_set_dai_sysclk() local 1161 struct adau1373_dai *adau1373_dai = &adau1373->dais[dai->id]; adau1373_set_dai_sysclk() 1174 regmap_update_bits(adau1373->regmap, ADAU1373_BCLKDIV(dai->id), adau1373_set_dai_sysclk() 1192 .name = "adau1373-aif1", 1212 .name = "adau1373-aif2", 1232 .name = "adau1373-aif3", 1255 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_set_pll() local 1323 regmap_update_bits(adau1373->regmap, ADAU1373_PLL_CTRL6(pll_id), adau1373_set_pll() 1326 regmap_update_bits(adau1373->regmap, ADAU1373_PLL_CTRL6(pll_id), adau1373_set_pll() 1331 regmap_write(adau1373->regmap, ADAU1373_DPLL_CTRL(pll_id), adau1373_set_pll() 1333 regmap_write(adau1373->regmap, ADAU1373_PLL_CTRL1(pll_id), (m >> 8) & 0xff); adau1373_set_pll() 1334 regmap_write(adau1373->regmap, ADAU1373_PLL_CTRL2(pll_id), m & 0xff); adau1373_set_pll() 1335 regmap_write(adau1373->regmap, ADAU1373_PLL_CTRL3(pll_id), (n >> 8) & 0xff); adau1373_set_pll() 1336 regmap_write(adau1373->regmap, ADAU1373_PLL_CTRL4(pll_id), n & 0xff); adau1373_set_pll() 1337 regmap_write(adau1373->regmap, ADAU1373_PLL_CTRL5(pll_id), adau1373_set_pll() 1341 regmap_update_bits(adau1373->regmap, ADAU1373_CLK_SRC_DIV(pll_id), 0x3f, 0x09); adau1373_set_pll() 1346 static void adau1373_load_drc_settings(struct adau1373 *adau1373, adau1373_load_drc_settings() argument 1352 regmap_write(adau1373->regmap, ADAU1373_DRC(nr) + i, drc[i]); adau1373_load_drc_settings() 1371 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_probe() local 1386 adau1373_load_drc_settings(adau1373, i, adau1373_probe() 1398 regmap_write(adau1373->regmap, ADAU1373_INPUT_MODE, val); adau1373_probe() 1405 regmap_write(adau1373->regmap, ADAU1373_OUTPUT_CTRL, val); adau1373_probe() 1409 regmap_write(adau1373->regmap, ADAU1373_EP_CTRL, adau1373_probe() 1419 regmap_write(adau1373->regmap, ADAU1373_ADC_CTRL, adau1373_probe() 1428 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_set_bias_level() local 1436 regmap_update_bits(adau1373->regmap, ADAU1373_PWDN_CTRL3, adau1373_set_bias_level() 1440 regmap_update_bits(adau1373->regmap, ADAU1373_PWDN_CTRL3, adau1373_set_bias_level() 1449 struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec); adau1373_resume() local 1451 regcache_sync(adau1373->regmap); adau1373_resume() 1498 struct adau1373 *adau1373; adau1373_i2c_probe() local 1501 adau1373 = devm_kzalloc(&client->dev, sizeof(*adau1373), GFP_KERNEL); adau1373_i2c_probe() 1502 if (!adau1373) adau1373_i2c_probe() 1505 adau1373->regmap = devm_regmap_init_i2c(client, adau1373_i2c_probe() 1507 if (IS_ERR(adau1373->regmap)) adau1373_i2c_probe() 1508 return PTR_ERR(adau1373->regmap); adau1373_i2c_probe() 1510 regmap_write(adau1373->regmap, ADAU1373_SOFT_RESET, 0x00); adau1373_i2c_probe() 1512 dev_set_drvdata(&client->dev, adau1373); adau1373_i2c_probe() 1526 { "adau1373", 0 }, 1533 .name = "adau1373",
|