Lines Matching refs:ak4118
154 static int ak4118_set_dai_fmt_master(struct ak4118_priv *ak4118, in ak4118_set_dai_fmt_master() argument
176 static int ak4118_set_dai_fmt_slave(struct ak4118_priv *ak4118, in ak4118_set_dai_fmt_slave() argument
200 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_set_dai_fmt() local
207 dif = ak4118_set_dai_fmt_master(ak4118, format); in ak4118_set_dai_fmt()
211 dif = ak4118_set_dai_fmt_slave(ak4118, format); in ak4118_set_dai_fmt()
224 ret = regmap_update_bits(ak4118->regmap, AK4118_REG_FORMAT_CTL, in ak4118_set_dai_fmt()
266 struct ak4118_priv *ak4118 = data; in ak4118_irq_handler() local
267 struct snd_soc_component *component = ak4118->component; in ak4118_irq_handler()
292 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_probe() local
295 ak4118->component = component; in ak4118_probe()
298 gpiod_set_value(ak4118->reset, 0); in ak4118_probe()
301 ret = regmap_write(ak4118->regmap, AK4118_REG_INT1_MASK, 0x00); in ak4118_probe()
310 ret = regmap_write(ak4118->regmap, AK4118_REG_RX_DETECT, 0xff); in ak4118_probe()
331 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_remove() local
334 gpiod_set_value(ak4118->reset, 1); in ak4118_remove()
364 struct ak4118_priv *ak4118; in ak4118_i2c_probe() local
367 ak4118 = devm_kzalloc(&i2c->dev, sizeof(struct ak4118_priv), in ak4118_i2c_probe()
369 if (ak4118 == NULL) in ak4118_i2c_probe()
372 ak4118->regmap = devm_regmap_init_i2c(i2c, &ak4118_regmap); in ak4118_i2c_probe()
373 if (IS_ERR(ak4118->regmap)) in ak4118_i2c_probe()
374 return PTR_ERR(ak4118->regmap); in ak4118_i2c_probe()
376 i2c_set_clientdata(i2c, ak4118); in ak4118_i2c_probe()
378 ak4118->reset = devm_gpiod_get(&i2c->dev, "reset", GPIOD_OUT_HIGH); in ak4118_i2c_probe()
379 if (IS_ERR(ak4118->reset)) { in ak4118_i2c_probe()
380 ret = PTR_ERR(ak4118->reset); in ak4118_i2c_probe()
386 ak4118->irq = devm_gpiod_get(&i2c->dev, "irq", GPIOD_IN); in ak4118_i2c_probe()
387 if (IS_ERR(ak4118->irq)) { in ak4118_i2c_probe()
388 ret = PTR_ERR(ak4118->irq); in ak4118_i2c_probe()
394 ret = devm_request_threaded_irq(&i2c->dev, gpiod_to_irq(ak4118->irq), in ak4118_i2c_probe()
397 "ak4118-irq", ak4118); in ak4118_i2c_probe()