Lines Matching defs:ak5558
25 #include "ak5558.h"
49 /* ak5558 register cache & default register settings */
176 struct ak5558_priv *ak5558 = snd_soc_component_get_drvdata(component);
178 int pcm_width = max(params_physical_width(params), ak5558->slot_width);
238 struct ak5558_priv *ak5558 = snd_soc_component_get_drvdata(component);
241 ak5558->slots = slots;
242 ak5558->slot_width = slot_width;
298 .name = "ak5558-aif",
321 static void ak5558_reset(struct ak5558_priv *ak5558, bool active)
323 if (!ak5558->reset_gpiod)
326 gpiod_set_value_cansleep(ak5558->reset_gpiod, active);
332 struct ak5558_priv *ak5558 = snd_soc_component_get_drvdata(component);
334 ak5558_reset(ak5558, false);
340 struct ak5558_priv *ak5558 = snd_soc_component_get_drvdata(component);
342 ak5558_reset(ak5558, true);
347 struct ak5558_priv *ak5558 = dev_get_drvdata(dev);
349 regcache_cache_only(ak5558->regmap, true);
350 ak5558_reset(ak5558, true);
352 regulator_bulk_disable(ARRAY_SIZE(ak5558->supplies),
353 ak5558->supplies);
359 struct ak5558_priv *ak5558 = dev_get_drvdata(dev);
362 ret = regulator_bulk_enable(ARRAY_SIZE(ak5558->supplies),
363 ak5558->supplies);
369 ak5558_reset(ak5558, true);
370 ak5558_reset(ak5558, false);
372 regcache_cache_only(ak5558->regmap, false);
373 regcache_mark_dirty(ak5558->regmap);
375 return regcache_sync(ak5558->regmap);
424 struct ak5558_priv *ak5558;
429 ak5558 = devm_kzalloc(&i2c->dev, sizeof(*ak5558), GFP_KERNEL);
430 if (!ak5558)
433 ak5558->regmap = devm_regmap_init_i2c(i2c, &ak5558_regmap);
434 if (IS_ERR(ak5558->regmap))
435 return PTR_ERR(ak5558->regmap);
437 i2c_set_clientdata(i2c, ak5558);
438 ak5558->i2c = i2c;
440 ak5558->reset_gpiod = devm_gpiod_get_optional(&i2c->dev, "reset",
442 if (IS_ERR(ak5558->reset_gpiod))
443 return PTR_ERR(ak5558->reset_gpiod);
445 for (i = 0; i < ARRAY_SIZE(ak5558->supplies); i++)
446 ak5558->supplies[i].supply = ak5558_supply_names[i];
448 ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(ak5558->supplies),
449 ak5558->supplies);
477 regcache_cache_only(ak5558->regmap, true);
488 { .compatible = "asahi-kasei,ak5558", .data = (void *) AK5558 },
496 .name = "ak5558",