Lines Matching +full:3 +full:- +full:ch1 +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0
22 #include <sound/soc-dapm.h>
78 "Sharp Roll-Off", "Slow Roll-Off",
79 "Short Delay Sharp Roll-Off", "Short Delay Slow Roll-Off",
108 SND_SOC_DAPM_ADC("ADC Ch1", NULL, AK5558_00_POWER_MANAGEMENT1, 0, 0),
111 SND_SOC_DAPM_ADC("ADC Ch4", NULL, AK5558_00_POWER_MANAGEMENT1, 3, 0),
125 SND_SOC_DAPM_ADC("ADC Ch1", NULL, AK5558_00_POWER_MANAGEMENT1, 0, 0),
132 {"ADC Ch1", NULL, "AIN1"},
133 {"SDTO", NULL, "ADC Ch1"},
158 {"ADC Ch1", NULL, "AIN1"},
159 {"SDTO", NULL, "ADC Ch1"},
175 struct snd_soc_component *component = dai->component; in ak5558_hw_params()
178 int pcm_width = max(params_physical_width(params), ak5558->slot_width); in ak5558_hw_params()
188 return -EINVAL; in ak5558_hw_params()
198 struct snd_soc_component *component = dai->component; in ak5558_set_dai_fmt()
209 dev_err(dai->dev, "Clock mode unsupported"); in ak5558_set_dai_fmt()
210 return -EINVAL; in ak5558_set_dai_fmt()
225 return -EINVAL; in ak5558_set_dai_fmt()
237 struct snd_soc_component *component = dai->component; in ak5558_set_tdm_slot()
241 ak5558->slots = slots; in ak5558_set_tdm_slot()
242 ak5558->slot_width = slot_width; in ak5558_set_tdm_slot()
284 return snd_pcm_hw_constraint_list(substream->runtime, 0, in ak5558_startup()
298 .name = "ak5558-aif",
310 .name = "ak5552-aif",
323 if (!ak5558->reset_gpiod) in ak5558_reset()
326 gpiod_set_value_cansleep(ak5558->reset_gpiod, active); in ak5558_reset()
349 regcache_cache_only(ak5558->regmap, true); in ak5558_runtime_suspend()
352 regulator_bulk_disable(ARRAY_SIZE(ak5558->supplies), in ak5558_runtime_suspend()
353 ak5558->supplies); in ak5558_runtime_suspend()
362 ret = regulator_bulk_enable(ARRAY_SIZE(ak5558->supplies), in ak5558_runtime_resume()
363 ak5558->supplies); in ak5558_runtime_resume()
372 regcache_cache_only(ak5558->regmap, false); in ak5558_runtime_resume()
373 regcache_mark_dirty(ak5558->regmap); in ak5558_runtime_resume()
375 return regcache_sync(ak5558->regmap); in ak5558_runtime_resume()
429 ak5558 = devm_kzalloc(&i2c->dev, sizeof(*ak5558), GFP_KERNEL); in ak5558_i2c_probe()
431 return -ENOMEM; in ak5558_i2c_probe()
433 ak5558->regmap = devm_regmap_init_i2c(i2c, &ak5558_regmap); in ak5558_i2c_probe()
434 if (IS_ERR(ak5558->regmap)) in ak5558_i2c_probe()
435 return PTR_ERR(ak5558->regmap); in ak5558_i2c_probe()
438 ak5558->i2c = i2c; in ak5558_i2c_probe()
440 ak5558->reset_gpiod = devm_gpiod_get_optional(&i2c->dev, "reset", in ak5558_i2c_probe()
442 if (IS_ERR(ak5558->reset_gpiod)) in ak5558_i2c_probe()
443 return PTR_ERR(ak5558->reset_gpiod); in ak5558_i2c_probe()
445 for (i = 0; i < ARRAY_SIZE(ak5558->supplies); i++) in ak5558_i2c_probe()
446 ak5558->supplies[i].supply = ak5558_supply_names[i]; in ak5558_i2c_probe()
448 ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(ak5558->supplies), in ak5558_i2c_probe()
449 ak5558->supplies); in ak5558_i2c_probe()
451 dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); in ak5558_i2c_probe()
455 dev_id = (uintptr_t)of_device_get_match_data(&i2c->dev); in ak5558_i2c_probe()
458 ret = devm_snd_soc_register_component(&i2c->dev, in ak5558_i2c_probe()
463 ret = devm_snd_soc_register_component(&i2c->dev, in ak5558_i2c_probe()
468 dev_err(&i2c->dev, "unexpected device type\n"); in ak5558_i2c_probe()
469 return -EINVAL; in ak5558_i2c_probe()
472 dev_err(&i2c->dev, "failed to register component: %d\n", ret); in ak5558_i2c_probe()
476 pm_runtime_enable(&i2c->dev); in ak5558_i2c_probe()
477 regcache_cache_only(ak5558->regmap, true); in ak5558_i2c_probe()
484 pm_runtime_disable(&i2c->dev); in ak5558_i2c_remove()
488 { .compatible = "asahi-kasei,ak5558", .data = (void *) AK5558 },
489 { .compatible = "asahi-kasei,ak5552", .data = (void *) AK5552 },
506 MODULE_AUTHOR("Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp>");