Lines Matching refs:machine
50 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); in tegra_wm8903_hw_params() local
69 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); in tegra_wm8903_hw_params()
119 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); in tegra_wm8903_event_int_spk() local
121 if (!gpio_is_valid(machine->gpio_spkr_en)) in tegra_wm8903_event_int_spk()
124 gpio_set_value_cansleep(machine->gpio_spkr_en, in tegra_wm8903_event_int_spk()
135 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); in tegra_wm8903_event_hp() local
137 if (!gpio_is_valid(machine->gpio_hp_mute)) in tegra_wm8903_event_hp()
140 gpio_set_value_cansleep(machine->gpio_hp_mute, in tegra_wm8903_event_hp()
151 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); in tegra_wm8903_event_int_mic() local
153 if (!gpio_is_valid(machine->gpio_int_mic_en)) in tegra_wm8903_event_int_mic()
156 gpio_set_value_cansleep(machine->gpio_int_mic_en, in tegra_wm8903_event_int_mic()
179 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); in tegra_wm8903_init() local
182 if (gpio_is_valid(machine->gpio_hp_det)) { in tegra_wm8903_init()
183 tegra_wm8903_hp_jack_gpio.gpio = machine->gpio_hp_det; in tegra_wm8903_init()
254 struct tegra_wm8903 *machine; in tegra_wm8903_driver_probe() local
257 machine = devm_kzalloc(&pdev->dev, sizeof(struct tegra_wm8903), in tegra_wm8903_driver_probe()
259 if (!machine) in tegra_wm8903_driver_probe()
263 snd_soc_card_set_drvdata(card, machine); in tegra_wm8903_driver_probe()
265 machine->gpio_spkr_en = of_get_named_gpio(np, "nvidia,spkr-en-gpios", in tegra_wm8903_driver_probe()
267 if (machine->gpio_spkr_en == -EPROBE_DEFER) in tegra_wm8903_driver_probe()
269 if (gpio_is_valid(machine->gpio_spkr_en)) { in tegra_wm8903_driver_probe()
270 ret = devm_gpio_request_one(&pdev->dev, machine->gpio_spkr_en, in tegra_wm8903_driver_probe()
278 machine->gpio_hp_mute = of_get_named_gpio(np, "nvidia,hp-mute-gpios", in tegra_wm8903_driver_probe()
280 if (machine->gpio_hp_mute == -EPROBE_DEFER) in tegra_wm8903_driver_probe()
282 if (gpio_is_valid(machine->gpio_hp_mute)) { in tegra_wm8903_driver_probe()
283 ret = devm_gpio_request_one(&pdev->dev, machine->gpio_hp_mute, in tegra_wm8903_driver_probe()
291 machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0); in tegra_wm8903_driver_probe()
292 if (machine->gpio_hp_det == -EPROBE_DEFER) in tegra_wm8903_driver_probe()
295 machine->gpio_int_mic_en = of_get_named_gpio(np, in tegra_wm8903_driver_probe()
297 if (machine->gpio_int_mic_en == -EPROBE_DEFER) in tegra_wm8903_driver_probe()
299 if (gpio_is_valid(machine->gpio_int_mic_en)) { in tegra_wm8903_driver_probe()
302 machine->gpio_int_mic_en, in tegra_wm8903_driver_probe()
310 machine->gpio_ext_mic_en = of_get_named_gpio(np, in tegra_wm8903_driver_probe()
312 if (machine->gpio_ext_mic_en == -EPROBE_DEFER) in tegra_wm8903_driver_probe()
314 if (gpio_is_valid(machine->gpio_ext_mic_en)) { in tegra_wm8903_driver_probe()
317 machine->gpio_ext_mic_en, in tegra_wm8903_driver_probe()
351 ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); in tegra_wm8903_driver_probe()