Lines Matching refs:gpio
249 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) in snd_soc_jack_gpio_detect() argument
251 struct snd_soc_jack *jack = gpio->jack; in snd_soc_jack_gpio_detect()
255 enable = gpiod_get_value_cansleep(gpio->desc); in snd_soc_jack_gpio_detect()
256 if (gpio->invert) in snd_soc_jack_gpio_detect()
260 report = gpio->report; in snd_soc_jack_gpio_detect()
264 if (gpio->jack_status_check) in snd_soc_jack_gpio_detect()
265 report = gpio->jack_status_check(gpio->data); in snd_soc_jack_gpio_detect()
267 snd_soc_jack_report(jack, report, gpio->report); in snd_soc_jack_gpio_detect()
273 struct snd_soc_jack_gpio *gpio = data; in gpio_handler() local
274 struct device *dev = gpio->jack->card->dev; in gpio_handler()
276 trace_snd_soc_jack_irq(gpio->name); in gpio_handler()
279 pm_wakeup_event(dev, gpio->debounce_time + 50); in gpio_handler()
281 queue_delayed_work(system_power_efficient_wq, &gpio->work, in gpio_handler()
282 msecs_to_jiffies(gpio->debounce_time)); in gpio_handler()
290 struct snd_soc_jack_gpio *gpio; in gpio_work() local
292 gpio = container_of(work, struct snd_soc_jack_gpio, work.work); in gpio_work()
293 snd_soc_jack_gpio_detect(gpio); in gpio_work()
336 if (!gpio_is_valid(gpios[i].gpio)) { in snd_soc_jack_add_gpios()
339 gpios[i].gpio); in snd_soc_jack_add_gpios()
344 ret = gpio_request_one(gpios[i].gpio, GPIOF_IN, in snd_soc_jack_add_gpios()
349 gpios[i].desc = gpio_to_desc(gpios[i].gpio); in snd_soc_jack_add_gpios()
383 gpio_free(gpios[i].gpio); in snd_soc_jack_add_gpios()