rt274 340 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 344 sound/soc/codecs/rt274.c snd_soc_component_write(component, rt274->index_cache[i].reg, rt274 345 sound/soc/codecs/rt274.c rt274->index_cache[i].def); rt274 350 sound/soc/codecs/rt274.c static int rt274_jack_detect(struct rt274_priv *rt274, bool *hp, bool *mic) rt274 358 sound/soc/codecs/rt274.c if (!rt274->component) rt274 361 sound/soc/codecs/rt274.c ret = regmap_read(rt274->regmap, RT274_GET_HP_SENSE, &buf); rt274 366 sound/soc/codecs/rt274.c ret = regmap_read(rt274->regmap, RT274_GET_MIC_SENSE, &buf); rt274 379 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = rt274 385 sound/soc/codecs/rt274.c if (rt274_jack_detect(rt274, &hp, &mic) < 0) rt274 394 sound/soc/codecs/rt274.c snd_soc_jack_report(rt274->jack, status, rt274 403 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 405 sound/soc/codecs/rt274.c rt274->jack = jack; rt274 409 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL, rt274 415 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL, rt274 419 sound/soc/codecs/rt274.c rt274_irq(0, rt274); rt274 618 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 632 sound/soc/codecs/rt274.c switch (rt274->sys_clk) { rt274 637 sound/soc/codecs/rt274.c params_rate(params), rt274->sys_clk); rt274 645 sound/soc/codecs/rt274.c params_rate(params), rt274->sys_clk); rt274 690 sound/soc/codecs/rt274.c if (rt274->master) rt274 706 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 712 sound/soc/codecs/rt274.c rt274->master = true; rt274 717 sound/soc/codecs/rt274.c rt274->master = false; rt274 754 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 773 sound/soc/codecs/rt274.c switch (rt274->fs) { rt274 807 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 868 sound/soc/codecs/rt274.c rt274->sys_clk = freq; rt274 869 sound/soc/codecs/rt274.c rt274->clk_id = clk_id; rt274 877 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 880 sound/soc/codecs/rt274.c rt274->fs = ratio; rt274 951 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = data; rt274 957 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL, rt274 960 sound/soc/codecs/rt274.c ret = rt274_jack_detect(rt274, &hp, &mic); rt274 969 sound/soc/codecs/rt274.c snd_soc_jack_report(rt274->jack, status, rt274 972 sound/soc/codecs/rt274.c pm_wakeup_event(&rt274->i2c->dev, 300); rt274 980 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 982 sound/soc/codecs/rt274.c rt274->component = component; rt274 984 sound/soc/codecs/rt274.c if (rt274->i2c->irq) { rt274 985 sound/soc/codecs/rt274.c INIT_DELAYED_WORK(&rt274->jack_detect_work, rt274 987 sound/soc/codecs/rt274.c schedule_delayed_work(&rt274->jack_detect_work, rt274 996 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 998 sound/soc/codecs/rt274.c cancel_delayed_work_sync(&rt274->jack_detect_work); rt274 1004 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 1006 sound/soc/codecs/rt274.c regcache_cache_only(rt274->regmap, true); rt274 1007 sound/soc/codecs/rt274.c regcache_mark_dirty(rt274->regmap); rt274 1014 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); rt274 1016 sound/soc/codecs/rt274.c regcache_cache_only(rt274->regmap, false); rt274 1018 sound/soc/codecs/rt274.c regcache_sync(rt274->regmap); rt274 1118 sound/soc/codecs/rt274.c struct rt274_priv *rt274; rt274 1123 sound/soc/codecs/rt274.c rt274 = devm_kzalloc(&i2c->dev, sizeof(*rt274), rt274 1125 sound/soc/codecs/rt274.c if (rt274 == NULL) rt274 1128 sound/soc/codecs/rt274.c rt274->regmap = devm_regmap_init(&i2c->dev, NULL, i2c, &rt274_regmap); rt274 1129 sound/soc/codecs/rt274.c if (IS_ERR(rt274->regmap)) { rt274 1130 sound/soc/codecs/rt274.c ret = PTR_ERR(rt274->regmap); rt274 1136 sound/soc/codecs/rt274.c ret = regmap_read(rt274->regmap, rt274 1147 sound/soc/codecs/rt274.c rt274->index_cache = devm_kmemdup(&i2c->dev, rt274_index_def, rt274 1149 sound/soc/codecs/rt274.c if (!rt274->index_cache) rt274 1152 sound/soc/codecs/rt274.c rt274->index_cache_size = INDEX_CACHE_SIZE; rt274 1153 sound/soc/codecs/rt274.c rt274->i2c = i2c; rt274 1154 sound/soc/codecs/rt274.c i2c_set_clientdata(i2c, rt274); rt274 1157 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_RESET, 0); rt274 1158 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, 0x1a, 0x4000, 0x4000); rt274 1161 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_PAD_CTRL12, 0x3, 0x0); rt274 1162 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF5b_INDEX, 0x01); rt274 1163 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF5b_COEF, 0x8540); rt274 1164 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, 0x6f, 0x0100, 0x0100); rt274 1166 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, 0x4a, 0x201b); rt274 1168 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, 0x6f, 0x3000, 0x2000); rt274 1170 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, 0x6f, 0xf, 0x0); rt274 1172 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF58_INDEX, 0x00); rt274 1173 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF58_COEF, 0xb888); rt274 1175 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, 0x6f, 0xf, 0xb); rt274 1176 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF58_INDEX, 0x00); rt274 1177 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_COEF58_COEF, 0x3888); rt274 1179 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_SET_PIN_HPO, 0x40); rt274 1180 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_SET_PIN_LOUT3, 0x40); rt274 1181 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_SET_MIC, 0x20); rt274 1182 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_SET_PIN_DMIC1, 0x20); rt274 1184 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_I2S_CTRL2, 0xc004, 0x4004); rt274 1185 sound/soc/codecs/rt274.c regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL, rt274 1189 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_UNSOLICITED_HP_OUT, 0x81); rt274 1190 sound/soc/codecs/rt274.c regmap_write(rt274->regmap, RT274_UNSOLICITED_MIC, 0x82); rt274 1192 sound/soc/codecs/rt274.c if (rt274->i2c->irq) { rt274 1193 sound/soc/codecs/rt274.c ret = request_threaded_irq(rt274->i2c->irq, NULL, rt274_irq, rt274 1194 sound/soc/codecs/rt274.c IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt274", rt274); rt274 1211 sound/soc/codecs/rt274.c struct rt274_priv *rt274 = i2c_get_clientdata(i2c); rt274 1214 sound/soc/codecs/rt274.c free_irq(i2c->irq, rt274);