Lines Matching refs:ac97
126 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
135 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio()
148 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
150 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio()
153 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
159 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
176 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_component() local
178 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); in snd_soc_alloc_ac97_component()
179 if (ac97 == NULL) in snd_soc_alloc_ac97_component()
182 ac97->bus = &soc_ac97_bus; in snd_soc_alloc_ac97_component()
183 ac97->num = 0; in snd_soc_alloc_ac97_component()
185 ac97->dev.bus = &ac97_bus_type; in snd_soc_alloc_ac97_component()
186 ac97->dev.parent = component->card->dev; in snd_soc_alloc_ac97_component()
187 ac97->dev.release = soc_ac97_device_release; in snd_soc_alloc_ac97_component()
189 dev_set_name(&ac97->dev, "%d-%d:%s", in snd_soc_alloc_ac97_component()
193 device_initialize(&ac97->dev); in snd_soc_alloc_ac97_component()
195 return ac97; in snd_soc_alloc_ac97_component()
216 struct snd_ac97 *ac97; in snd_soc_new_ac97_component() local
219 ac97 = snd_soc_alloc_ac97_component(component); in snd_soc_new_ac97_component()
220 if (IS_ERR(ac97)) in snd_soc_new_ac97_component()
221 return ac97; in snd_soc_new_ac97_component()
224 ret = snd_ac97_reset(ac97, false, id, id_mask); in snd_soc_new_ac97_component()
232 ret = device_add(&ac97->dev); in snd_soc_new_ac97_component()
236 ret = snd_soc_ac97_init_gpio(ac97, component); in snd_soc_new_ac97_component()
240 return ac97; in snd_soc_new_ac97_component()
243 put_device(&ac97->dev); in snd_soc_new_ac97_component()
254 void snd_soc_free_ac97_component(struct snd_ac97 *ac97) in snd_soc_free_ac97_component() argument
256 snd_soc_ac97_free_gpio(ac97); in snd_soc_free_ac97_component()
257 device_del(&ac97->dev); in snd_soc_free_ac97_component()
258 ac97->bus = NULL; in snd_soc_free_ac97_component()
259 put_device(&ac97->dev); in snd_soc_free_ac97_component()
265 static void snd_soc_ac97_warm_reset(struct snd_ac97 *ac97) in snd_soc_ac97_warm_reset() argument
281 static void snd_soc_ac97_reset(struct snd_ac97 *ac97) in snd_soc_ac97_reset() argument