aic26 51 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 67 sound/soc/codecs/tlv320aic26.c rc = spi_write_then_read(aic26->spi, buffer, 2, buffer, 2); aic26 69 sound/soc/codecs/tlv320aic26.c dev_err(&aic26->spi->dev, "AIC26 reg read error\n"); aic26 95 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 113 sound/soc/codecs/tlv320aic26.c rc = spi_write(aic26->spi, buffer, 4); aic26 115 sound/soc/codecs/tlv320aic26.c dev_err(&aic26->spi->dev, "AIC26 reg read error\n"); aic26 133 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 137 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "aic26_hw_params(substream=%p, params=%p)\n", aic26 139 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "rate=%i format=%i\n", params_rate(params), aic26 153 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "bad rate\n"); return -EINVAL; aic26 163 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL; aic26 179 sound/soc/codecs/tlv320aic26.c if (aic26->master) aic26 188 sound/soc/codecs/tlv320aic26.c reg |= wlen | aic26->datfm | (divisor << 3) | divisor; aic26 200 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 203 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n", aic26 219 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 221 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i," aic26 229 sound/soc/codecs/tlv320aic26.c aic26->mclk = freq; aic26 236 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = codec->private_data; aic26 238 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n", aic26 243 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_CBM_CFM: aic26->master = 1; break; aic26 244 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_CBS_CFS: aic26->master = 0; break; aic26 246 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "bad master\n"); return -EINVAL; aic26 251 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_I2S: aic26->datfm = AIC26_DATFM_I2S; break; aic26 252 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_DSP_A: aic26->datfm = AIC26_DATFM_DSP; break; aic26 253 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_RIGHT_J: aic26->datfm = AIC26_DATFM_RIGHTJ; break; aic26 254 sound/soc/codecs/tlv320aic26.c case SND_SOC_DAIFMT_LEFT_J: aic26->datfm = AIC26_DATFM_LEFTJ; break; aic26 256 sound/soc/codecs/tlv320aic26.c dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL; aic26 327 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26; aic26 336 sound/soc/codecs/tlv320aic26.c aic26 = socdev->codec_data; aic26 337 sound/soc/codecs/tlv320aic26.c if (aic26 == NULL) { aic26 341 sound/soc/codecs/tlv320aic26.c codec = &aic26->codec; aic26 395 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = dev_get_drvdata(dev); aic26 398 sound/soc/codecs/tlv320aic26.c val = aic26_reg_read_cache(&aic26->codec, AIC26_REG_AUDIO_CTRL2); aic26 411 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = dev_get_drvdata(dev); aic26 414 sound/soc/codecs/tlv320aic26.c val = aic26_reg_read_cache(&aic26->codec, AIC26_REG_AUDIO_CTRL2); aic26 416 sound/soc/codecs/tlv320aic26.c aic26_reg_write(&aic26->codec, AIC26_REG_AUDIO_CTRL2, val); aic26 429 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26; aic26 435 sound/soc/codecs/tlv320aic26.c aic26 = kzalloc(sizeof *aic26, GFP_KERNEL); aic26 436 sound/soc/codecs/tlv320aic26.c if (!aic26) aic26 440 sound/soc/codecs/tlv320aic26.c aic26->spi = spi; aic26 441 sound/soc/codecs/tlv320aic26.c dev_set_drvdata(&spi->dev, aic26); aic26 446 sound/soc/codecs/tlv320aic26.c aic26->codec.private_data = aic26; aic26 447 sound/soc/codecs/tlv320aic26.c aic26->codec.name = "aic26"; aic26 448 sound/soc/codecs/tlv320aic26.c aic26->codec.owner = THIS_MODULE; aic26 449 sound/soc/codecs/tlv320aic26.c aic26->codec.dai = &aic26_dai; aic26 450 sound/soc/codecs/tlv320aic26.c aic26->codec.num_dai = 1; aic26 451 sound/soc/codecs/tlv320aic26.c aic26->codec.read = aic26_reg_read; aic26 452 sound/soc/codecs/tlv320aic26.c aic26->codec.write = aic26_reg_write; aic26 453 sound/soc/codecs/tlv320aic26.c aic26->master = 1; aic26 454 sound/soc/codecs/tlv320aic26.c mutex_init(&aic26->codec.mutex); aic26 455 sound/soc/codecs/tlv320aic26.c INIT_LIST_HEAD(&aic26->codec.dapm_widgets); aic26 456 sound/soc/codecs/tlv320aic26.c INIT_LIST_HEAD(&aic26->codec.dapm_paths); aic26 457 sound/soc/codecs/tlv320aic26.c aic26->codec.reg_cache_size = AIC26_NUM_REGS; aic26 458 sound/soc/codecs/tlv320aic26.c aic26->codec.reg_cache = aic26->reg_cache; aic26 461 sound/soc/codecs/tlv320aic26.c aic26_reg_write(&aic26->codec, AIC26_REG_RESET, 0xBB00); aic26 464 sound/soc/codecs/tlv320aic26.c aic26_reg_write(&aic26->codec, AIC26_REG_POWER_CTRL, 0); aic26 467 sound/soc/codecs/tlv320aic26.c reg = aic26_reg_read(&aic26->codec, AIC26_REG_AUDIO_CTRL3); aic26 470 sound/soc/codecs/tlv320aic26.c aic26_reg_write(&aic26->codec, AIC26_REG_AUDIO_CTRL3, reg); aic26 473 sound/soc/codecs/tlv320aic26.c for (i = 0; i < ARRAY_SIZE(aic26->reg_cache); i++) aic26 474 sound/soc/codecs/tlv320aic26.c aic26_reg_read(&aic26->codec, i); aic26 484 sound/soc/codecs/tlv320aic26.c of_snd_soc_register_codec(&aic26_soc_codec_dev, aic26, &aic26_dai, aic26 494 sound/soc/codecs/tlv320aic26.c struct aic26 *aic26 = dev_get_drvdata(&spi->dev); aic26 496 sound/soc/codecs/tlv320aic26.c kfree(aic26);