static int es8328_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct snd_soc_device *socdev = es8328_socdev; struct snd_soc_codec *codec = socdev->card->codec; int ret; i2c_set_clientdata(i2c, codec); codec->control_data = i2c; // printk("*********es8328_i2d_probe!\n"); ret = es8328_init(socdev); if (ret < 0) pr_err("failed to initialise WM8971\n"); return ret; }
static int es8328_probe(struct snd_soc_codec *codec) { int ret; struct device *dev = codec->dev; dev_dbg(dev, "probing es8328 audio codec\n"); ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP); if (ret < 0) { dev_err(dev, "failed to configure cache I/O: %d\n", ret); return ret; } /* power on device */ es8328_set_bias_level(codec, SND_SOC_BIAS_STANDBY); es8328_init(codec); return 0; }