Lines Matching refs:cs530x
111 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_put_volsw_vu() local
112 struct regmap *regmap = cs530x->regmap; in cs530x_put_volsw_vu()
230 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_adc_event() local
231 struct regmap *regmap = cs530x->regmap; in cs530x_adc_event()
235 cs530x->adc_pairs_count++; in cs530x_adc_event()
243 cs530x->adc_pairs_count--; in cs530x_adc_event()
244 if (!cs530x->adc_pairs_count) { in cs530x_adc_event()
420 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_set_bclk() local
421 struct regmap *regmap = cs530x->regmap; in cs530x_set_bclk()
490 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_hw_params() local
491 struct regmap *regmap = cs530x->regmap; in cs530x_hw_params()
525 cs530x->fs = fs; in cs530x_hw_params()
533 cs530x->tdm_slots, cs530x->tdm_width); in cs530x_hw_params()
535 cs530x->tdm_width, in cs530x_hw_params()
536 cs530x->tdm_slots, in cs530x_hw_params()
620 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_set_tdm_slot() local
621 struct regmap *regmap = cs530x->regmap; in cs530x_set_tdm_slot()
660 cs530x->tdm_width = slot_width; in cs530x_set_tdm_slot()
661 cs530x->tdm_slots = slots; in cs530x_set_tdm_slot()
692 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_set_pll() local
693 struct regmap *regmap = cs530x->regmap; in cs530x_set_pll()
726 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_component_probe() local
733 switch (cs530x->devtype) { in cs530x_component_probe()
770 cs530x->devtype); in cs530x_component_probe()
780 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); in cs530x_set_sysclk() local
781 struct regmap *regmap = cs530x->regmap; in cs530x_set_sysclk()
791 cs530x->mclk_rate = freq; in cs530x_set_sysclk()
826 static int cs530x_check_device_id(struct cs530x_priv *cs530x) in cs530x_check_device_id() argument
828 struct device *dev = cs530x->dev; in cs530x_check_device_id()
832 ret = regmap_read(cs530x->regmap, CS530X_DEVID, &dev_id); in cs530x_check_device_id()
836 ret = regmap_read(cs530x->regmap, CS530X_REVID, &rev); in cs530x_check_device_id()
844 cs530x->num_adcs = 2; in cs530x_check_device_id()
847 cs530x->num_adcs = 4; in cs530x_check_device_id()
850 cs530x->num_adcs = 8; in cs530x_check_device_id()
860 static int cs530x_parse_device_properties(struct cs530x_priv *cs530x) in cs530x_parse_device_properties() argument
862 struct regmap *regmap = cs530x->regmap; in cs530x_parse_device_properties()
863 struct device *dev = cs530x->dev; in cs530x_parse_device_properties()
866 switch (cs530x->num_adcs) { in cs530x_parse_device_properties()
888 cs530x->num_adcs); in cs530x_parse_device_properties()
892 int cs530x_probe(struct cs530x_priv *cs530x) in cs530x_probe() argument
894 struct device *dev = cs530x->dev; in cs530x_probe()
897 cs530x->dev_dai = devm_kmemdup(dev, &cs530x_dai, in cs530x_probe()
898 sizeof(*(cs530x->dev_dai)), in cs530x_probe()
900 if (!cs530x->dev_dai) in cs530x_probe()
903 for (i = 0; i < ARRAY_SIZE(cs530x->supplies); i++) in cs530x_probe()
904 cs530x->supplies[i].supply = cs530x_supply_names[i]; in cs530x_probe()
906 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(cs530x->supplies), in cs530x_probe()
907 cs530x->supplies); in cs530x_probe()
911 ret = regulator_bulk_enable(ARRAY_SIZE(cs530x->supplies), in cs530x_probe()
912 cs530x->supplies); in cs530x_probe()
916 cs530x->reset_gpio = devm_gpiod_get_optional(dev, "reset", in cs530x_probe()
918 if (IS_ERR(cs530x->reset_gpio)) { in cs530x_probe()
919 ret = dev_err_probe(dev, PTR_ERR(cs530x->reset_gpio), in cs530x_probe()
924 if (cs530x->reset_gpio) { in cs530x_probe()
926 gpiod_set_value_cansleep(cs530x->reset_gpio, 0); in cs530x_probe()
930 ret = cs530x_check_device_id(cs530x); in cs530x_probe()
934 if (!cs530x->reset_gpio) { in cs530x_probe()
935 ret = regmap_write(cs530x->regmap, CS530X_SW_RESET, in cs530x_probe()
943 ret = cs530x_parse_device_properties(cs530x); in cs530x_probe()
947 cs530x->dev_dai->capture.channels_max = cs530x->num_adcs; in cs530x_probe()
950 &soc_component_dev_cs530x, cs530x->dev_dai, 1); in cs530x_probe()
959 gpiod_set_value_cansleep(cs530x->reset_gpio, 1); in cs530x_probe()
962 regulator_bulk_disable(ARRAY_SIZE(cs530x->supplies), in cs530x_probe()
963 cs530x->supplies); in cs530x_probe()