Lines Matching refs:gpio

248 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)  in snd_soc_jack_gpio_detect()  argument
250 struct snd_soc_jack *jack = gpio->jack; in snd_soc_jack_gpio_detect()
254 enable = gpiod_get_value_cansleep(gpio->desc); in snd_soc_jack_gpio_detect()
255 if (gpio->invert) in snd_soc_jack_gpio_detect()
259 report = gpio->report; in snd_soc_jack_gpio_detect()
263 if (gpio->jack_status_check) in snd_soc_jack_gpio_detect()
264 report = gpio->jack_status_check(gpio->data); in snd_soc_jack_gpio_detect()
266 snd_soc_jack_report(jack, report, gpio->report); in snd_soc_jack_gpio_detect()
272 struct snd_soc_jack_gpio *gpio = data; in gpio_handler() local
273 struct device *dev = gpio->jack->card->dev; in gpio_handler()
275 trace_snd_soc_jack_irq(gpio->name); in gpio_handler()
278 pm_wakeup_event(dev, gpio->debounce_time + 50); in gpio_handler()
280 queue_delayed_work(system_power_efficient_wq, &gpio->work, in gpio_handler()
281 msecs_to_jiffies(gpio->debounce_time)); in gpio_handler()
289 struct snd_soc_jack_gpio *gpio; in gpio_work() local
291 gpio = container_of(work, struct snd_soc_jack_gpio, work.work); in gpio_work()
292 snd_soc_jack_gpio_detect(gpio); in gpio_work()
332 if (!gpio_is_valid(gpios[i].gpio)) { in snd_soc_jack_add_gpios()
335 gpios[i].gpio); in snd_soc_jack_add_gpios()
340 ret = gpio_request_one(gpios[i].gpio, GPIOF_IN, in snd_soc_jack_add_gpios()
345 gpios[i].desc = gpio_to_desc(gpios[i].gpio); in snd_soc_jack_add_gpios()
379 gpio_free(gpios[i].gpio); in snd_soc_jack_add_gpios()