Lines Matching refs:aic32x4

615 	struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);  in aic32x4_set_dai_fmt()  local
658 aic32x4->fmt = fmt; in aic32x4_set_dai_fmt()
688 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_set_processing_blocks() local
690 if (aic32x4->type == AIC32X4_TYPE_TAS2505) { in aic32x4_set_processing_blocks()
710 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_clocks() local
737 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
746 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
755 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
765 if ((aic32x4->fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) in aic32x4_setup_clocks()
830 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_hw_params() local
862 if (aic32x4->swapdacs) in aic32x4_hw_params()
954 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_gpios() local
958 if (aic32x4->setup->gpio_func[0] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
960 aic32x4->setup->gpio_func[0]); in aic32x4_setup_gpios()
966 if (aic32x4->setup->gpio_func[1] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
968 aic32x4->setup->gpio_func[1]); in aic32x4_setup_gpios()
974 if (aic32x4->setup->gpio_func[2] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
976 aic32x4->setup->gpio_func[2]); in aic32x4_setup_gpios()
982 if (aic32x4->setup->gpio_func[3] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
984 aic32x4->setup->gpio_func[3]); in aic32x4_setup_gpios()
990 if (aic32x4->setup->gpio_func[4] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
992 aic32x4->setup->gpio_func[4]); in aic32x4_setup_gpios()
1000 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_component_probe() local
1015 if (aic32x4->setup) in aic32x4_component_probe()
1022 if (aic32x4->power_cfg & AIC32X4_PWR_MICBIAS_2075_LDOIN) { in aic32x4_component_probe()
1026 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_component_probe()
1029 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_component_probe()
1034 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_component_probe()
1036 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_component_probe()
1041 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) in aic32x4_component_probe()
1047 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) in aic32x4_component_probe()
1157 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_tas2505_component_probe() local
1172 if (aic32x4->setup) in aic32x4_tas2505_component_probe()
1179 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_tas2505_component_probe()
1182 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_tas2505_component_probe()
1187 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_tas2505_component_probe()
1189 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_tas2505_component_probe()
1220 static int aic32x4_parse_dt(struct aic32x4_priv *aic32x4, in aic32x4_parse_dt() argument
1226 aic32x4_setup = devm_kzalloc(aic32x4->dev, sizeof(*aic32x4_setup), in aic32x4_parse_dt()
1234 aic32x4->mclk_name = of_clk_get_parent_name(np, ret); in aic32x4_parse_dt()
1236 aic32x4->swapdacs = false; in aic32x4_parse_dt()
1237 aic32x4->micpga_routing = 0; in aic32x4_parse_dt()
1239 aic32x4->rstn_gpio = devm_gpiod_get_optional(aic32x4->dev, "reset", GPIOD_OUT_HIGH); in aic32x4_parse_dt()
1240 if (IS_ERR(aic32x4->rstn_gpio)) { in aic32x4_parse_dt()
1241 return dev_err_probe(aic32x4->dev, PTR_ERR(aic32x4->rstn_gpio), in aic32x4_parse_dt()
1244 gpiod_set_consumer_name(aic32x4->rstn_gpio, "tlv320aic32x4_rstn"); in aic32x4_parse_dt()
1249 aic32x4->setup = aic32x4_setup; in aic32x4_parse_dt()
1253 static void aic32x4_disable_regulators(struct aic32x4_priv *aic32x4) in aic32x4_disable_regulators() argument
1255 regulator_disable(aic32x4->supply_iov); in aic32x4_disable_regulators()
1257 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_disable_regulators()
1258 regulator_disable(aic32x4->supply_ldo); in aic32x4_disable_regulators()
1260 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_disable_regulators()
1261 regulator_disable(aic32x4->supply_dv); in aic32x4_disable_regulators()
1263 if (!IS_ERR(aic32x4->supply_av)) in aic32x4_disable_regulators()
1264 regulator_disable(aic32x4->supply_av); in aic32x4_disable_regulators()
1268 struct aic32x4_priv *aic32x4) in aic32x4_setup_regulators() argument
1272 aic32x4->supply_ldo = devm_regulator_get_optional(dev, "ldoin"); in aic32x4_setup_regulators()
1273 aic32x4->supply_iov = devm_regulator_get(dev, "iov"); in aic32x4_setup_regulators()
1274 aic32x4->supply_dv = devm_regulator_get_optional(dev, "dv"); in aic32x4_setup_regulators()
1275 aic32x4->supply_av = devm_regulator_get_optional(dev, "av"); in aic32x4_setup_regulators()
1279 if (IS_ERR(aic32x4->supply_iov)) { in aic32x4_setup_regulators()
1281 return PTR_ERR(aic32x4->supply_iov); in aic32x4_setup_regulators()
1284 if (IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1285 if (PTR_ERR(aic32x4->supply_ldo) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1288 if (IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1290 return PTR_ERR(aic32x4->supply_dv); in aic32x4_setup_regulators()
1292 if (IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1294 return PTR_ERR(aic32x4->supply_av); in aic32x4_setup_regulators()
1297 if (PTR_ERR(aic32x4->supply_dv) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1299 if (PTR_ERR(aic32x4->supply_av) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1303 ret = regulator_enable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1309 if (!IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1310 ret = regulator_enable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1317 if (!IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1318 ret = regulator_enable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1325 if (!IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1326 ret = regulator_enable(aic32x4->supply_av); in aic32x4_setup_regulators()
1333 if (!IS_ERR(aic32x4->supply_ldo) && IS_ERR(aic32x4->supply_av)) in aic32x4_setup_regulators()
1334 aic32x4->power_cfg |= AIC32X4_PWR_AIC32X4_LDO_ENABLE; in aic32x4_setup_regulators()
1339 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_setup_regulators()
1340 regulator_disable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1343 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_setup_regulators()
1344 regulator_disable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1347 regulator_disable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1354 struct aic32x4_priv *aic32x4; in aic32x4_probe() local
1361 aic32x4 = devm_kzalloc(dev, sizeof(struct aic32x4_priv), in aic32x4_probe()
1363 if (aic32x4 == NULL) in aic32x4_probe()
1366 aic32x4->dev = dev; in aic32x4_probe()
1367 aic32x4->type = type; in aic32x4_probe()
1369 dev_set_drvdata(dev, aic32x4); in aic32x4_probe()
1372 ret = aic32x4_parse_dt(aic32x4, np); in aic32x4_probe()
1378 aic32x4->power_cfg = 0; in aic32x4_probe()
1379 aic32x4->swapdacs = false; in aic32x4_probe()
1380 aic32x4->micpga_routing = 0; in aic32x4_probe()
1381 aic32x4->rstn_gpio = NULL; in aic32x4_probe()
1382 aic32x4->mclk_name = "mclk"; in aic32x4_probe()
1385 ret = aic32x4_setup_regulators(dev, aic32x4); in aic32x4_probe()
1391 if (aic32x4->rstn_gpio) { in aic32x4_probe()
1394 gpiod_set_value_cansleep(aic32x4->rstn_gpio, 0); in aic32x4_probe()
1402 ret = aic32x4_register_clocks(dev, aic32x4->mclk_name); in aic32x4_probe()
1406 switch (aic32x4->type) { in aic32x4_probe()
1424 aic32x4_disable_regulators(aic32x4); in aic32x4_probe()
1432 struct aic32x4_priv *aic32x4 = dev_get_drvdata(dev); in aic32x4_remove() local
1434 aic32x4_disable_regulators(aic32x4); in aic32x4_remove()