da7218 429 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 438 sound/soc/codecs/da7218.c if ((ret == 1) && (da7218->alc_en)) da7218 450 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 458 sound/soc/codecs/da7218.c if ((lvalue || rvalue) && (!da7218->alc_en)) da7218 462 sound/soc/codecs/da7218.c da7218->alc_en &= ~mask; da7218 463 sound/soc/codecs/da7218.c da7218->alc_en |= (lvalue << lshift) | (rvalue << rshift); da7218 473 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 484 sound/soc/codecs/da7218.c ret = regmap_raw_read(da7218->regmap, reg, &val, 2); da7218 497 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 510 sound/soc/codecs/da7218.c return regmap_raw_write(da7218->regmap, reg, &val, 2); da7218 517 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 526 sound/soc/codecs/da7218.c da7218->mic_lvl_det_en &= ~mask; da7218 527 sound/soc/codecs/da7218.c da7218->mic_lvl_det_en |= (lvalue << lshift) | (rvalue << rshift); da7218 537 sound/soc/codecs/da7218.c (da7218->in_filt_en & da7218->mic_lvl_det_en)); da7218 544 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 553 sound/soc/codecs/da7218.c (da7218->mic_lvl_det_en & lmask) >> lshift; da7218 555 sound/soc/codecs/da7218.c (da7218->mic_lvl_det_en & rmask) >> rshift; da7218 564 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 571 sound/soc/codecs/da7218.c memcpy(ucontrol->value.bytes.data, da7218->biq_5stage_coeff, da7218 575 sound/soc/codecs/da7218.c memcpy(ucontrol->value.bytes.data, da7218->stbiq_3stage_coeff, da7218 589 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 603 sound/soc/codecs/da7218.c memcpy(da7218->biq_5stage_coeff, ucontrol->value.bytes.data, da7218 608 sound/soc/codecs/da7218.c memcpy(da7218->stbiq_3stage_coeff, ucontrol->value.bytes.data, da7218 623 sound/soc/codecs/da7218.c regmap_raw_write(da7218->regmap, reg, cfg, DA7218_BIQ_CFG_SIZE); da7218 1349 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1371 sound/soc/codecs/da7218.c da7218->in_filt_en |= mask; da7218 1377 sound/soc/codecs/da7218.c if (mask & da7218->mic_lvl_det_en) da7218 1381 sound/soc/codecs/da7218.c da7218->in_filt_en &= ~mask; da7218 1389 sound/soc/codecs/da7218.c (da7218->in_filt_en & da7218->mic_lvl_det_en)); da7218 1398 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1405 sound/soc/codecs/da7218.c if (da7218->master) da7218 1466 sound/soc/codecs/da7218.c if (da7218->master) da7218 1481 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1487 sound/soc/codecs/da7218.c if (da7218->hp_single_supply) da7218 1813 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1816 sound/soc/codecs/da7218.c if (da7218->mclk_rate == freq) da7218 1840 sound/soc/codecs/da7218.c if (da7218->mclk) { da7218 1841 sound/soc/codecs/da7218.c freq = clk_round_rate(da7218->mclk, freq); da7218 1842 sound/soc/codecs/da7218.c ret = clk_set_rate(da7218->mclk, freq); da7218 1850 sound/soc/codecs/da7218.c da7218->mclk_rate = freq; da7218 1859 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1867 sound/soc/codecs/da7218.c if (da7218->mclk_rate < 2000000) { da7218 1869 sound/soc/codecs/da7218.c da7218->mclk_rate); da7218 1871 sound/soc/codecs/da7218.c } else if (da7218->mclk_rate <= 4500000) { da7218 1874 sound/soc/codecs/da7218.c } else if (da7218->mclk_rate <= 9000000) { da7218 1877 sound/soc/codecs/da7218.c } else if (da7218->mclk_rate <= 18000000) { da7218 1880 sound/soc/codecs/da7218.c } else if (da7218->mclk_rate <= 36000000) { da7218 1883 sound/soc/codecs/da7218.c } else if (da7218->mclk_rate <= 54000000) { da7218 1888 sound/soc/codecs/da7218.c da7218->mclk_rate); da7218 1891 sound/soc/codecs/da7218.c freq_ref = (da7218->mclk_rate / indiv); da7218 1934 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 1939 sound/soc/codecs/da7218.c da7218->master = true; da7218 1942 sound/soc/codecs/da7218.c da7218->master = false; da7218 2209 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2211 sound/soc/codecs/da7218.c if (da7218->dev_id == DA7217_DEV_ID) da7218 2214 sound/soc/codecs/da7218.c da7218->jack = jack; da7218 2235 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2246 sound/soc/codecs/da7218.c snd_soc_jack_report(da7218->jack, report, SND_JACK_HEADPHONE); da7218 2445 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2511 sound/soc/codecs/da7218.c if (da7218->dev_id == DA7217_DEV_ID) { da7218 2516 sound/soc/codecs/da7218.c if (da7218->dev_id == DA7218_DEV_ID) { da7218 2574 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2583 sound/soc/codecs/da7218.c if (da7218->mclk) { da7218 2584 sound/soc/codecs/da7218.c ret = clk_prepare_enable(da7218->mclk); da7218 2606 sound/soc/codecs/da7218.c if (da7218->mclk) da7218 2607 sound/soc/codecs/da7218.c clk_disable_unprepare(da7218->mclk); da7218 2612 sound/soc/codecs/da7218.c if (!da7218->jack) { da7218 2635 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2642 sound/soc/codecs/da7218.c da7218->supplies[i].supply = da7218_supply_names[i]; da7218 2645 sound/soc/codecs/da7218.c da7218->supplies); da7218 2652 sound/soc/codecs/da7218.c vddio = da7218->supplies[DA7218_SUPPLY_VDDIO].consumer; da7218 2660 sound/soc/codecs/da7218.c ret = regulator_bulk_enable(DA7218_NUM_SUPPLIES, da7218->supplies); da7218 2677 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2678 sound/soc/codecs/da7218.c struct da7218_pdata *pdata = da7218->pdata; da7218 2800 sound/soc/codecs/da7218.c if (da7218->dev_id == DA7217_DEV_ID) { da7218 2801 sound/soc/codecs/da7218.c da7218->hp_single_supply = da7218 2804 sound/soc/codecs/da7218.c if (da7218->hp_single_supply) { da7218 2814 sound/soc/codecs/da7218.c if ((da7218->dev_id == DA7218_DEV_ID) && da7218 2879 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2889 sound/soc/codecs/da7218.c da7218->pdata = da7218_of_to_pdata(component); da7218 2891 sound/soc/codecs/da7218.c da7218->pdata = dev_get_platdata(component->dev); da7218 2896 sound/soc/codecs/da7218.c da7218->mclk = devm_clk_get(component->dev, "mclk"); da7218 2897 sound/soc/codecs/da7218.c if (IS_ERR(da7218->mclk)) { da7218 2898 sound/soc/codecs/da7218.c if (PTR_ERR(da7218->mclk) != -ENOENT) { da7218 2899 sound/soc/codecs/da7218.c ret = PTR_ERR(da7218->mclk); da7218 2902 sound/soc/codecs/da7218.c da7218->mclk = NULL; da7218 2958 sound/soc/codecs/da7218.c if (da7218->dev_id == DA7217_DEV_ID) { da7218 2968 sound/soc/codecs/da7218.c if (da7218->irq) { da7218 2969 sound/soc/codecs/da7218.c ret = devm_request_threaded_irq(component->dev, da7218->irq, NULL, da7218 2975 sound/soc/codecs/da7218.c da7218->irq, ret); da7218 2984 sound/soc/codecs/da7218.c regulator_bulk_disable(DA7218_NUM_SUPPLIES, da7218->supplies); da7218 2991 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 2993 sound/soc/codecs/da7218.c regulator_bulk_disable(DA7218_NUM_SUPPLIES, da7218->supplies); da7218 2999 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 3004 sound/soc/codecs/da7218.c if (!da7218->jack) da7218 3012 sound/soc/codecs/da7218.c struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); da7218 3015 sound/soc/codecs/da7218.c if (!da7218->jack) da7218 3264 sound/soc/codecs/da7218.c struct da7218_priv *da7218; da7218 3267 sound/soc/codecs/da7218.c da7218 = devm_kzalloc(&i2c->dev, sizeof(*da7218), GFP_KERNEL); da7218 3268 sound/soc/codecs/da7218.c if (!da7218) da7218 3271 sound/soc/codecs/da7218.c i2c_set_clientdata(i2c, da7218); da7218 3274 sound/soc/codecs/da7218.c da7218->dev_id = da7218_of_get_id(&i2c->dev); da7218 3276 sound/soc/codecs/da7218.c da7218->dev_id = id->driver_data; da7218 3278 sound/soc/codecs/da7218.c if ((da7218->dev_id != DA7217_DEV_ID) && da7218 3279 sound/soc/codecs/da7218.c (da7218->dev_id != DA7218_DEV_ID)) { da7218 3284 sound/soc/codecs/da7218.c da7218->irq = i2c->irq; da7218 3286 sound/soc/codecs/da7218.c da7218->regmap = devm_regmap_init_i2c(i2c, &da7218_regmap_config); da7218 3287 sound/soc/codecs/da7218.c if (IS_ERR(da7218->regmap)) { da7218 3288 sound/soc/codecs/da7218.c ret = PTR_ERR(da7218->regmap);