Lines Matching refs:aic32x4

616 	struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);  in aic32x4_set_dai_fmt()  local
659 aic32x4->fmt = fmt; in aic32x4_set_dai_fmt()
689 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_set_processing_blocks() local
691 if (aic32x4->type == AIC32X4_TYPE_TAS2505) { in aic32x4_set_processing_blocks()
711 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_clocks() local
738 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
747 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
756 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
766 if ((aic32x4->fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) in aic32x4_setup_clocks()
831 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_hw_params() local
863 if (aic32x4->swapdacs) in aic32x4_hw_params()
955 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_gpios() local
959 if (aic32x4->setup->gpio_func[0] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
961 aic32x4->setup->gpio_func[0]); in aic32x4_setup_gpios()
967 if (aic32x4->setup->gpio_func[1] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
969 aic32x4->setup->gpio_func[1]); in aic32x4_setup_gpios()
975 if (aic32x4->setup->gpio_func[2] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
977 aic32x4->setup->gpio_func[2]); in aic32x4_setup_gpios()
983 if (aic32x4->setup->gpio_func[3] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
985 aic32x4->setup->gpio_func[3]); in aic32x4_setup_gpios()
991 if (aic32x4->setup->gpio_func[4] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
993 aic32x4->setup->gpio_func[4]); in aic32x4_setup_gpios()
1001 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_component_probe() local
1016 if (aic32x4->setup) in aic32x4_component_probe()
1023 if (aic32x4->power_cfg & AIC32X4_PWR_MICBIAS_2075_LDOIN) { in aic32x4_component_probe()
1027 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_component_probe()
1030 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_component_probe()
1035 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_component_probe()
1037 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_component_probe()
1042 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) in aic32x4_component_probe()
1048 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) in aic32x4_component_probe()
1150 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_tas2505_component_probe() local
1165 if (aic32x4->setup) in aic32x4_tas2505_component_probe()
1172 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_tas2505_component_probe()
1175 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_tas2505_component_probe()
1180 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_tas2505_component_probe()
1182 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_tas2505_component_probe()
1212 static int aic32x4_parse_dt(struct aic32x4_priv *aic32x4, in aic32x4_parse_dt() argument
1218 aic32x4_setup = devm_kzalloc(aic32x4->dev, sizeof(*aic32x4_setup), in aic32x4_parse_dt()
1226 aic32x4->mclk_name = of_clk_get_parent_name(np, ret); in aic32x4_parse_dt()
1228 aic32x4->swapdacs = false; in aic32x4_parse_dt()
1229 aic32x4->micpga_routing = 0; in aic32x4_parse_dt()
1230 aic32x4->rstn_gpio = of_get_named_gpio(np, "reset-gpios", 0); in aic32x4_parse_dt()
1234 aic32x4->setup = aic32x4_setup; in aic32x4_parse_dt()
1238 static void aic32x4_disable_regulators(struct aic32x4_priv *aic32x4) in aic32x4_disable_regulators() argument
1240 regulator_disable(aic32x4->supply_iov); in aic32x4_disable_regulators()
1242 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_disable_regulators()
1243 regulator_disable(aic32x4->supply_ldo); in aic32x4_disable_regulators()
1245 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_disable_regulators()
1246 regulator_disable(aic32x4->supply_dv); in aic32x4_disable_regulators()
1248 if (!IS_ERR(aic32x4->supply_av)) in aic32x4_disable_regulators()
1249 regulator_disable(aic32x4->supply_av); in aic32x4_disable_regulators()
1253 struct aic32x4_priv *aic32x4) in aic32x4_setup_regulators() argument
1257 aic32x4->supply_ldo = devm_regulator_get_optional(dev, "ldoin"); in aic32x4_setup_regulators()
1258 aic32x4->supply_iov = devm_regulator_get(dev, "iov"); in aic32x4_setup_regulators()
1259 aic32x4->supply_dv = devm_regulator_get_optional(dev, "dv"); in aic32x4_setup_regulators()
1260 aic32x4->supply_av = devm_regulator_get_optional(dev, "av"); in aic32x4_setup_regulators()
1264 if (IS_ERR(aic32x4->supply_iov)) { in aic32x4_setup_regulators()
1266 return PTR_ERR(aic32x4->supply_iov); in aic32x4_setup_regulators()
1269 if (IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1270 if (PTR_ERR(aic32x4->supply_ldo) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1273 if (IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1275 return PTR_ERR(aic32x4->supply_dv); in aic32x4_setup_regulators()
1277 if (IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1279 return PTR_ERR(aic32x4->supply_av); in aic32x4_setup_regulators()
1282 if (PTR_ERR(aic32x4->supply_dv) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1284 if (PTR_ERR(aic32x4->supply_av) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1288 ret = regulator_enable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1294 if (!IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1295 ret = regulator_enable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1302 if (!IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1303 ret = regulator_enable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1310 if (!IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1311 ret = regulator_enable(aic32x4->supply_av); in aic32x4_setup_regulators()
1318 if (!IS_ERR(aic32x4->supply_ldo) && IS_ERR(aic32x4->supply_av)) in aic32x4_setup_regulators()
1319 aic32x4->power_cfg |= AIC32X4_PWR_AIC32X4_LDO_ENABLE; in aic32x4_setup_regulators()
1324 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_setup_regulators()
1325 regulator_disable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1328 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_setup_regulators()
1329 regulator_disable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1332 regulator_disable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1338 struct aic32x4_priv *aic32x4; in aic32x4_probe() local
1346 aic32x4 = devm_kzalloc(dev, sizeof(struct aic32x4_priv), in aic32x4_probe()
1348 if (aic32x4 == NULL) in aic32x4_probe()
1351 aic32x4->dev = dev; in aic32x4_probe()
1352 aic32x4->type = (uintptr_t)dev_get_drvdata(dev); in aic32x4_probe()
1354 dev_set_drvdata(dev, aic32x4); in aic32x4_probe()
1357 aic32x4->power_cfg = pdata->power_cfg; in aic32x4_probe()
1358 aic32x4->swapdacs = pdata->swapdacs; in aic32x4_probe()
1359 aic32x4->micpga_routing = pdata->micpga_routing; in aic32x4_probe()
1360 aic32x4->rstn_gpio = pdata->rstn_gpio; in aic32x4_probe()
1361 aic32x4->mclk_name = "mclk"; in aic32x4_probe()
1363 ret = aic32x4_parse_dt(aic32x4, np); in aic32x4_probe()
1369 aic32x4->power_cfg = 0; in aic32x4_probe()
1370 aic32x4->swapdacs = false; in aic32x4_probe()
1371 aic32x4->micpga_routing = 0; in aic32x4_probe()
1372 aic32x4->rstn_gpio = -1; in aic32x4_probe()
1373 aic32x4->mclk_name = "mclk"; in aic32x4_probe()
1376 if (gpio_is_valid(aic32x4->rstn_gpio)) { in aic32x4_probe()
1377 ret = devm_gpio_request_one(dev, aic32x4->rstn_gpio, in aic32x4_probe()
1383 ret = aic32x4_setup_regulators(dev, aic32x4); in aic32x4_probe()
1389 if (gpio_is_valid(aic32x4->rstn_gpio)) { in aic32x4_probe()
1391 gpio_set_value_cansleep(aic32x4->rstn_gpio, 1); in aic32x4_probe()
1399 ret = aic32x4_register_clocks(dev, aic32x4->mclk_name); in aic32x4_probe()
1403 switch (aic32x4->type) { in aic32x4_probe()
1421 aic32x4_disable_regulators(aic32x4); in aic32x4_probe()
1429 struct aic32x4_priv *aic32x4 = dev_get_drvdata(dev); in aic32x4_remove() local
1431 aic32x4_disable_regulators(aic32x4); in aic32x4_remove()