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()
145 struct pistachio_internal_dac *dac; in pistachio_internal_dac_probe() local
150 dac = devm_kzalloc(dev, sizeof(*dac), GFP_KERNEL); in pistachio_internal_dac_probe()
152 if (!dac) in pistachio_internal_dac_probe()
155 platform_set_drvdata(pdev, dac); in pistachio_internal_dac_probe()
157 dac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, in pistachio_internal_dac_probe()
159 if (IS_ERR(dac->regmap)) in pistachio_internal_dac_probe()
160 return PTR_ERR(dac->regmap); in pistachio_internal_dac_probe()
162 dac->supply = devm_regulator_get(dev, "VDD"); in pistachio_internal_dac_probe()
163 if (IS_ERR(dac->supply)) in pistachio_internal_dac_probe()
164 return dev_err_probe(dev, PTR_ERR(dac->supply), in pistachio_internal_dac_probe()
167 ret = regulator_enable(dac->supply); in pistachio_internal_dac_probe()
173 voltage = regulator_get_voltage(dac->supply); in pistachio_internal_dac_probe()
188 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_probe()
191 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
192 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_probe()
211 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
213 regulator_disable(dac->supply); in pistachio_internal_dac_probe()
220 struct pistachio_internal_dac *dac = dev_get_drvdata(&pdev->dev); in pistachio_internal_dac_remove() local
223 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_remove()
224 regulator_disable(dac->supply); in pistachio_internal_dac_remove()
230 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_resume() local
233 ret = regulator_enable(dac->supply); in pistachio_internal_dac_rt_resume()
239 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_rt_resume()
246 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_suspend() local
248 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_rt_suspend()
250 regulator_disable(dac->supply); in pistachio_internal_dac_rt_suspend()