Lines Matching refs:ak4118

153 static int ak4118_set_dai_fmt_provider(struct ak4118_priv *ak4118,  in ak4118_set_dai_fmt_provider()  argument
175 static int ak4118_set_dai_fmt_consumer(struct ak4118_priv *ak4118, in ak4118_set_dai_fmt_consumer() argument
199 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_set_dai_fmt() local
205 dif = ak4118_set_dai_fmt_provider(ak4118, format); in ak4118_set_dai_fmt()
208 dif = ak4118_set_dai_fmt_consumer(ak4118, format); in ak4118_set_dai_fmt()
221 ret = regmap_update_bits(ak4118->regmap, AK4118_REG_FORMAT_CTL, in ak4118_set_dai_fmt()
263 struct ak4118_priv *ak4118 = data; in ak4118_irq_handler() local
264 struct snd_soc_component *component = ak4118->component; in ak4118_irq_handler()
282 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_probe() local
285 ak4118->component = component; in ak4118_probe()
288 gpiod_set_value(ak4118->reset, 0); in ak4118_probe()
291 ret = regmap_write(ak4118->regmap, AK4118_REG_INT1_MASK, 0x00); in ak4118_probe()
300 ret = regmap_write(ak4118->regmap, AK4118_REG_RX_DETECT, 0xff); in ak4118_probe()
321 struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component); in ak4118_remove() local
324 gpiod_set_value(ak4118->reset, 1); in ak4118_remove()
352 struct ak4118_priv *ak4118; in ak4118_i2c_probe() local
355 ak4118 = devm_kzalloc(&i2c->dev, sizeof(struct ak4118_priv), in ak4118_i2c_probe()
357 if (ak4118 == NULL) in ak4118_i2c_probe()
360 ak4118->regmap = devm_regmap_init_i2c(i2c, &ak4118_regmap); in ak4118_i2c_probe()
361 if (IS_ERR(ak4118->regmap)) in ak4118_i2c_probe()
362 return PTR_ERR(ak4118->regmap); in ak4118_i2c_probe()
364 i2c_set_clientdata(i2c, ak4118); in ak4118_i2c_probe()
366 ak4118->reset = devm_gpiod_get(&i2c->dev, "reset", GPIOD_OUT_HIGH); in ak4118_i2c_probe()
367 if (IS_ERR(ak4118->reset)) in ak4118_i2c_probe()
368 return dev_err_probe(&i2c->dev, PTR_ERR(ak4118->reset), in ak4118_i2c_probe()
371 ak4118->irq = devm_gpiod_get(&i2c->dev, "irq", GPIOD_IN); in ak4118_i2c_probe()
372 if (IS_ERR(ak4118->irq)) in ak4118_i2c_probe()
373 return dev_err_probe(&i2c->dev, PTR_ERR(ak4118->irq), in ak4118_i2c_probe()
376 ret = devm_request_threaded_irq(&i2c->dev, gpiod_to_irq(ak4118->irq), in ak4118_i2c_probe()
379 "ak4118-irq", ak4118); in ak4118_i2c_probe()