Lines Matching refs:ac97

128 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97,  in snd_soc_ac97_init_gpio()  argument
137 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio()
150 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
152 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio()
155 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
161 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
178 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_component() local
180 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); in snd_soc_alloc_ac97_component()
181 if (ac97 == NULL) in snd_soc_alloc_ac97_component()
184 ac97->bus = &soc_ac97_bus; in snd_soc_alloc_ac97_component()
185 ac97->num = 0; in snd_soc_alloc_ac97_component()
187 ac97->dev.bus = &ac97_bus_type; in snd_soc_alloc_ac97_component()
188 ac97->dev.parent = component->card->dev; in snd_soc_alloc_ac97_component()
189 ac97->dev.release = soc_ac97_device_release; in snd_soc_alloc_ac97_component()
191 dev_set_name(&ac97->dev, "%d-%d:%s", in snd_soc_alloc_ac97_component()
195 device_initialize(&ac97->dev); in snd_soc_alloc_ac97_component()
197 return ac97; in snd_soc_alloc_ac97_component()
218 struct snd_ac97 *ac97; in snd_soc_new_ac97_component() local
221 ac97 = snd_soc_alloc_ac97_component(component); in snd_soc_new_ac97_component()
222 if (IS_ERR(ac97)) in snd_soc_new_ac97_component()
223 return ac97; in snd_soc_new_ac97_component()
226 ret = snd_ac97_reset(ac97, false, id, id_mask); in snd_soc_new_ac97_component()
234 ret = device_add(&ac97->dev); in snd_soc_new_ac97_component()
238 ret = snd_soc_ac97_init_gpio(ac97, component); in snd_soc_new_ac97_component()
242 return ac97; in snd_soc_new_ac97_component()
245 put_device(&ac97->dev); in snd_soc_new_ac97_component()
256 void snd_soc_free_ac97_component(struct snd_ac97 *ac97) in snd_soc_free_ac97_component() argument
258 snd_soc_ac97_free_gpio(ac97); in snd_soc_free_ac97_component()
259 device_del(&ac97->dev); in snd_soc_free_ac97_component()
260 ac97->bus = NULL; in snd_soc_free_ac97_component()
261 put_device(&ac97->dev); in snd_soc_free_ac97_component()
267 static void snd_soc_ac97_warm_reset(struct snd_ac97 *ac97) in snd_soc_ac97_warm_reset() argument
283 static void snd_soc_ac97_reset(struct snd_ac97 *ac97) in snd_soc_ac97_reset() argument