Lines Matching +full:pa +full:- +full:gpios
1 // SPDX-License-Identifier: GPL-2.0-or-later
25 struct snd_soc_dapm_context *dapm = w->dapm; in sirf_audio_hp_event()
26 struct snd_soc_card *card = dapm->card; in sirf_audio_hp_event()
30 if (gpio_is_valid(sirf_audio_card->gpio_hp_pa)) in sirf_audio_hp_event()
31 gpio_set_value(sirf_audio_card->gpio_hp_pa, on); in sirf_audio_hp_event()
38 struct snd_soc_dapm_context *dapm = w->dapm; in sirf_audio_spk_event()
39 struct snd_soc_card *card = dapm->card; in sirf_audio_spk_event()
43 if (gpio_is_valid(sirf_audio_card->gpio_spk_pa)) in sirf_audio_spk_event()
44 gpio_set_value(sirf_audio_card->gpio_spk_pa, on); in sirf_audio_spk_event()
62 /* Digital audio interface glue - connects codec <--> CPU */
65 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sirf-audio-codec")),
94 sirf_audio_card = devm_kzalloc(&pdev->dev, sizeof(struct sirf_audio_card), in sirf_audio_probe()
97 return -ENOMEM; in sirf_audio_probe()
99 sirf_audio_dai_link[0].cpus->of_node = in sirf_audio_probe()
100 of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); in sirf_audio_probe()
101 sirf_audio_dai_link[0].platforms->of_node = in sirf_audio_probe()
102 of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); in sirf_audio_probe()
103 sirf_audio_dai_link[0].codecs->of_node = in sirf_audio_probe()
104 of_parse_phandle(pdev->dev.of_node, "sirf,audio-codec", 0); in sirf_audio_probe()
105 sirf_audio_card->gpio_spk_pa = of_get_named_gpio(pdev->dev.of_node, in sirf_audio_probe()
106 "spk-pa-gpios", 0); in sirf_audio_probe()
107 sirf_audio_card->gpio_hp_pa = of_get_named_gpio(pdev->dev.of_node, in sirf_audio_probe()
108 "hp-pa-gpios", 0); in sirf_audio_probe()
109 if (gpio_is_valid(sirf_audio_card->gpio_spk_pa)) { in sirf_audio_probe()
110 ret = devm_gpio_request_one(&pdev->dev, in sirf_audio_probe()
111 sirf_audio_card->gpio_spk_pa, in sirf_audio_probe()
114 dev_err(&pdev->dev, in sirf_audio_probe()
116 sirf_audio_card->gpio_spk_pa, ret); in sirf_audio_probe()
120 if (gpio_is_valid(sirf_audio_card->gpio_hp_pa)) { in sirf_audio_probe()
121 ret = devm_gpio_request_one(&pdev->dev, in sirf_audio_probe()
122 sirf_audio_card->gpio_hp_pa, in sirf_audio_probe()
125 dev_err(&pdev->dev, in sirf_audio_probe()
127 sirf_audio_card->gpio_hp_pa, ret); in sirf_audio_probe()
132 card->dev = &pdev->dev; in sirf_audio_probe()
135 ret = devm_snd_soc_register_card(&pdev->dev, card); in sirf_audio_probe()
137 dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret); in sirf_audio_probe()
143 {.compatible = "sirf,sirf-audio-card", },
150 .name = "sirf-audio-card",