Lines Matching refs:ac97
125 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
134 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio()
147 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
149 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio()
152 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
158 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
175 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_component() local
177 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); in snd_soc_alloc_ac97_component()
178 if (ac97 == NULL) in snd_soc_alloc_ac97_component()
181 ac97->bus = &soc_ac97_bus; in snd_soc_alloc_ac97_component()
182 ac97->num = 0; in snd_soc_alloc_ac97_component()
184 ac97->dev.bus = &ac97_bus_type; in snd_soc_alloc_ac97_component()
185 ac97->dev.parent = component->card->dev; in snd_soc_alloc_ac97_component()
186 ac97->dev.release = soc_ac97_device_release; in snd_soc_alloc_ac97_component()
188 dev_set_name(&ac97->dev, "%d-%d:%s", in snd_soc_alloc_ac97_component()
192 device_initialize(&ac97->dev); in snd_soc_alloc_ac97_component()
194 return ac97; in snd_soc_alloc_ac97_component()
215 struct snd_ac97 *ac97; in snd_soc_new_ac97_component() local
218 ac97 = snd_soc_alloc_ac97_component(component); in snd_soc_new_ac97_component()
219 if (IS_ERR(ac97)) in snd_soc_new_ac97_component()
220 return ac97; in snd_soc_new_ac97_component()
223 ret = snd_ac97_reset(ac97, false, id, id_mask); in snd_soc_new_ac97_component()
231 ret = device_add(&ac97->dev); in snd_soc_new_ac97_component()
235 ret = snd_soc_ac97_init_gpio(ac97, component); in snd_soc_new_ac97_component()
239 return ac97; in snd_soc_new_ac97_component()
242 put_device(&ac97->dev); in snd_soc_new_ac97_component()
253 void snd_soc_free_ac97_component(struct snd_ac97 *ac97) in snd_soc_free_ac97_component() argument
255 snd_soc_ac97_free_gpio(ac97); in snd_soc_free_ac97_component()
256 device_del(&ac97->dev); in snd_soc_free_ac97_component()
257 ac97->bus = NULL; in snd_soc_free_ac97_component()
258 put_device(&ac97->dev); in snd_soc_free_ac97_component()
264 static void snd_soc_ac97_warm_reset(struct snd_ac97 *ac97) in snd_soc_ac97_warm_reset() argument
280 static void snd_soc_ac97_reset(struct snd_ac97 *ac97) in snd_soc_ac97_reset() argument