• Home
  • Raw
  • Download

Lines Matching refs:aic32x4

616 	struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);  in aic32x4_set_dai_fmt()  local
660 aic32x4->fmt = fmt; in aic32x4_set_dai_fmt()
690 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_set_processing_blocks() local
692 if (aic32x4->type == AIC32X4_TYPE_TAS2505) { in aic32x4_set_processing_blocks()
712 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_clocks() local
739 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
748 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
757 if (aic32x4->type == AIC32X4_TYPE_TAS2505) in aic32x4_setup_clocks()
767 if ((aic32x4->fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) in aic32x4_setup_clocks()
832 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_hw_params() local
864 if (aic32x4->swapdacs) in aic32x4_hw_params()
956 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_setup_gpios() local
960 if (aic32x4->setup->gpio_func[0] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
962 aic32x4->setup->gpio_func[0]); in aic32x4_setup_gpios()
968 if (aic32x4->setup->gpio_func[1] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
970 aic32x4->setup->gpio_func[1]); in aic32x4_setup_gpios()
976 if (aic32x4->setup->gpio_func[2] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
978 aic32x4->setup->gpio_func[2]); in aic32x4_setup_gpios()
984 if (aic32x4->setup->gpio_func[3] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
986 aic32x4->setup->gpio_func[3]); in aic32x4_setup_gpios()
992 if (aic32x4->setup->gpio_func[4] != AIC32X4_MFPX_DEFAULT_VALUE) { in aic32x4_setup_gpios()
994 aic32x4->setup->gpio_func[4]); in aic32x4_setup_gpios()
1002 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_component_probe() local
1017 if (aic32x4->setup) in aic32x4_component_probe()
1024 if (aic32x4->power_cfg & AIC32X4_PWR_MICBIAS_2075_LDOIN) { in aic32x4_component_probe()
1028 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_component_probe()
1031 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_component_probe()
1036 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_component_probe()
1038 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_component_probe()
1043 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) in aic32x4_component_probe()
1049 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) in aic32x4_component_probe()
1152 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component); in aic32x4_tas2505_component_probe() local
1167 if (aic32x4->setup) in aic32x4_tas2505_component_probe()
1174 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) in aic32x4_tas2505_component_probe()
1177 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ? in aic32x4_tas2505_component_probe()
1182 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) in aic32x4_tas2505_component_probe()
1184 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED) in aic32x4_tas2505_component_probe()
1215 static int aic32x4_parse_dt(struct aic32x4_priv *aic32x4, in aic32x4_parse_dt() argument
1221 aic32x4_setup = devm_kzalloc(aic32x4->dev, sizeof(*aic32x4_setup), in aic32x4_parse_dt()
1229 aic32x4->mclk_name = of_clk_get_parent_name(np, ret); in aic32x4_parse_dt()
1231 aic32x4->swapdacs = false; in aic32x4_parse_dt()
1232 aic32x4->micpga_routing = 0; in aic32x4_parse_dt()
1233 aic32x4->rstn_gpio = of_get_named_gpio(np, "reset-gpios", 0); in aic32x4_parse_dt()
1237 aic32x4->setup = aic32x4_setup; in aic32x4_parse_dt()
1241 static void aic32x4_disable_regulators(struct aic32x4_priv *aic32x4) in aic32x4_disable_regulators() argument
1243 regulator_disable(aic32x4->supply_iov); in aic32x4_disable_regulators()
1245 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_disable_regulators()
1246 regulator_disable(aic32x4->supply_ldo); in aic32x4_disable_regulators()
1248 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_disable_regulators()
1249 regulator_disable(aic32x4->supply_dv); in aic32x4_disable_regulators()
1251 if (!IS_ERR(aic32x4->supply_av)) in aic32x4_disable_regulators()
1252 regulator_disable(aic32x4->supply_av); in aic32x4_disable_regulators()
1256 struct aic32x4_priv *aic32x4) in aic32x4_setup_regulators() argument
1260 aic32x4->supply_ldo = devm_regulator_get_optional(dev, "ldoin"); in aic32x4_setup_regulators()
1261 aic32x4->supply_iov = devm_regulator_get(dev, "iov"); in aic32x4_setup_regulators()
1262 aic32x4->supply_dv = devm_regulator_get_optional(dev, "dv"); in aic32x4_setup_regulators()
1263 aic32x4->supply_av = devm_regulator_get_optional(dev, "av"); in aic32x4_setup_regulators()
1267 if (IS_ERR(aic32x4->supply_iov)) { in aic32x4_setup_regulators()
1269 return PTR_ERR(aic32x4->supply_iov); in aic32x4_setup_regulators()
1272 if (IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1273 if (PTR_ERR(aic32x4->supply_ldo) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1276 if (IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1278 return PTR_ERR(aic32x4->supply_dv); in aic32x4_setup_regulators()
1280 if (IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1282 return PTR_ERR(aic32x4->supply_av); in aic32x4_setup_regulators()
1285 if (PTR_ERR(aic32x4->supply_dv) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1287 if (PTR_ERR(aic32x4->supply_av) == -EPROBE_DEFER) in aic32x4_setup_regulators()
1291 ret = regulator_enable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1297 if (!IS_ERR(aic32x4->supply_ldo)) { in aic32x4_setup_regulators()
1298 ret = regulator_enable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1305 if (!IS_ERR(aic32x4->supply_dv)) { in aic32x4_setup_regulators()
1306 ret = regulator_enable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1313 if (!IS_ERR(aic32x4->supply_av)) { in aic32x4_setup_regulators()
1314 ret = regulator_enable(aic32x4->supply_av); in aic32x4_setup_regulators()
1321 if (!IS_ERR(aic32x4->supply_ldo) && IS_ERR(aic32x4->supply_av)) in aic32x4_setup_regulators()
1322 aic32x4->power_cfg |= AIC32X4_PWR_AIC32X4_LDO_ENABLE; in aic32x4_setup_regulators()
1327 if (!IS_ERR(aic32x4->supply_dv)) in aic32x4_setup_regulators()
1328 regulator_disable(aic32x4->supply_dv); in aic32x4_setup_regulators()
1331 if (!IS_ERR(aic32x4->supply_ldo)) in aic32x4_setup_regulators()
1332 regulator_disable(aic32x4->supply_ldo); in aic32x4_setup_regulators()
1335 regulator_disable(aic32x4->supply_iov); in aic32x4_setup_regulators()
1341 struct aic32x4_priv *aic32x4; in aic32x4_probe() local
1349 aic32x4 = devm_kzalloc(dev, sizeof(struct aic32x4_priv), in aic32x4_probe()
1351 if (aic32x4 == NULL) in aic32x4_probe()
1354 aic32x4->dev = dev; in aic32x4_probe()
1355 aic32x4->type = (enum aic32x4_type)dev_get_drvdata(dev); in aic32x4_probe()
1357 dev_set_drvdata(dev, aic32x4); in aic32x4_probe()
1360 aic32x4->power_cfg = pdata->power_cfg; in aic32x4_probe()
1361 aic32x4->swapdacs = pdata->swapdacs; in aic32x4_probe()
1362 aic32x4->micpga_routing = pdata->micpga_routing; in aic32x4_probe()
1363 aic32x4->rstn_gpio = pdata->rstn_gpio; in aic32x4_probe()
1364 aic32x4->mclk_name = "mclk"; in aic32x4_probe()
1366 ret = aic32x4_parse_dt(aic32x4, np); in aic32x4_probe()
1372 aic32x4->power_cfg = 0; in aic32x4_probe()
1373 aic32x4->swapdacs = false; in aic32x4_probe()
1374 aic32x4->micpga_routing = 0; in aic32x4_probe()
1375 aic32x4->rstn_gpio = -1; in aic32x4_probe()
1376 aic32x4->mclk_name = "mclk"; in aic32x4_probe()
1379 if (gpio_is_valid(aic32x4->rstn_gpio)) { in aic32x4_probe()
1380 ret = devm_gpio_request_one(dev, aic32x4->rstn_gpio, in aic32x4_probe()
1386 ret = aic32x4_setup_regulators(dev, aic32x4); in aic32x4_probe()
1392 if (gpio_is_valid(aic32x4->rstn_gpio)) { in aic32x4_probe()
1394 gpio_set_value_cansleep(aic32x4->rstn_gpio, 1); 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()