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 ret = PTR_ERR(dac->supply); in pistachio_internal_dac_probe()
171 ret = regulator_enable(dac->supply); in pistachio_internal_dac_probe()
177 voltage = regulator_get_voltage(dac->supply); in pistachio_internal_dac_probe()
192 regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL, in pistachio_internal_dac_probe()
195 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
196 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_probe()
215 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_probe()
217 regulator_disable(dac->supply); in pistachio_internal_dac_probe()
224 struct pistachio_internal_dac *dac = dev_get_drvdata(&pdev->dev); in pistachio_internal_dac_remove() local
227 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_remove()
228 regulator_disable(dac->supply); in pistachio_internal_dac_remove()
236 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_resume() local
239 ret = regulator_enable(dac->supply); in pistachio_internal_dac_rt_resume()
245 pistachio_internal_dac_pwr_on(dac); in pistachio_internal_dac_rt_resume()
252 struct pistachio_internal_dac *dac = dev_get_drvdata(dev); in pistachio_internal_dac_rt_suspend() local
254 pistachio_internal_dac_pwr_off(dac); in pistachio_internal_dac_rt_suspend()
256 regulator_disable(dac->supply); in pistachio_internal_dac_rt_suspend()