Lines Matching refs:dac
82 static void pistachio_internal_dac_pwr_off(struct pistachio_internal_dac *dac) in pistachio_internal_dac_pwr_off() argument
84 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_pwr_off()
88 pistachio_internal_dac_reg_writel(dac->regmap, 0, in pistachio_internal_dac_pwr_off()
92 static void pistachio_internal_dac_pwr_on(struct pistachio_internal_dac *dac) in pistachio_internal_dac_pwr_on() argument
94 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_SRST, in pistachio_internal_dac_pwr_on()
98 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_SRST, in pistachio_internal_dac_pwr_on()
101 pistachio_internal_dac_reg_writel(dac->regmap, in pistachio_internal_dac_pwr_on()
105 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_pwr_on()
124 struct pistachio_internal_dac *dac = snd_soc_component_get_drvdata(component); in pistachio_internal_dac_codec_probe() local
126 snd_soc_component_init_regmap(component, dac->regmap); in pistachio_internal_dac_codec_probe()
146 struct pistachio_internal_dac *dac; in pistachio_internal_dac_probe() local
151 dac = devm_kzalloc(dev, sizeof(*dac), GFP_KERNEL); in pistachio_internal_dac_probe()
153 if (!dac) in pistachio_internal_dac_probe()
156 platform_set_drvdata(pdev, dac); in pistachio_internal_dac_probe()
158 dac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, in pistachio_internal_dac_probe()
160 if (IS_ERR(dac->regmap)) in pistachio_internal_dac_probe()
161 return PTR_ERR(dac->regmap); in pistachio_internal_dac_probe()
163 dac->supply = devm_regulator_get(dev, "VDD"); in pistachio_internal_dac_probe()
164 if (IS_ERR(dac->supply)) in pistachio_internal_dac_probe()
165 return dev_err_probe(dev, PTR_ERR(dac->supply), in pistachio_internal_dac_probe()
168 ret = regulator_enable(dac->supply); in pistachio_internal_dac_probe()
174 voltage = regulator_get_voltage(dac->supply); in pistachio_internal_dac_probe()
189 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_probe()
192 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
193 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_probe()
212 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
214 regulator_disable(dac->supply); in pistachio_internal_dac_probe()
221 struct pistachio_internal_dac *dac = dev_get_drvdata(&pdev->dev); in pistachio_internal_dac_remove() local
224 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_remove()
225 regulator_disable(dac->supply); in pistachio_internal_dac_remove()
233 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_resume() local
236 ret = regulator_enable(dac->supply); in pistachio_internal_dac_rt_resume()
242 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_rt_resume()
249 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_suspend() local
251 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_rt_suspend()
253 regulator_disable(dac->supply); in pistachio_internal_dac_rt_suspend()