Lines Matching refs:button
34 const struct gpio_keys_button *button; member
213 if (bdata->button->type != type) in gpio_keys_attr_show_helper()
267 if (bdata->button->type != type) in gpio_keys_attr_store_helper()
271 !bdata->button->can_disable) { in gpio_keys_attr_store_helper()
282 if (bdata->button->type != type) in gpio_keys_attr_store_helper()
368 const struct gpio_keys_button *button = bdata->button; in gpio_keys_gpio_report_event() local
370 unsigned int type = button->type ?: EV_KEY; in gpio_keys_gpio_report_event()
384 input_event(input, type, button->code, button->value); in gpio_keys_gpio_report_event()
395 if (bdata->button->wakeup) in gpio_keys_debounce_event()
423 if (bdata->button->wakeup) { in gpio_keys_gpio_isr()
424 const struct gpio_keys_button *button = bdata->button; in gpio_keys_gpio_isr() local
428 (button->type == 0 || button->type == EV_KEY)) { in gpio_keys_gpio_isr()
434 input_report_key(bdata->input, button->code, 1); in gpio_keys_gpio_isr()
478 if (bdata->button->wakeup) in gpio_keys_irq_isr()
505 const struct gpio_keys_button *button, in gpio_keys_setup_key() argument
509 const char *desc = button->desc ? button->desc : "gpio_keys"; in gpio_keys_setup_key()
518 bdata->button = button; in gpio_keys_setup_key()
539 } else if (gpio_is_valid(button->gpio)) { in gpio_keys_setup_key()
546 if (button->active_low) in gpio_keys_setup_key()
549 error = devm_gpio_request_one(dev, button->gpio, flags, desc); in gpio_keys_setup_key()
552 button->gpio, error); in gpio_keys_setup_key()
556 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_setup_key()
564 if (button->debounce_interval) { in gpio_keys_setup_key()
566 button->debounce_interval * 1000); in gpio_keys_setup_key()
570 button->debounce_interval; in gpio_keys_setup_key()
581 if (button->irq) { in gpio_keys_setup_key()
582 bdata->irq = button->irq; in gpio_keys_setup_key()
589 button->gpio, error); in gpio_keys_setup_key()
604 switch (button->wakeup_event_action) { in gpio_keys_setup_key()
622 if (!button->irq) { in gpio_keys_setup_key()
627 bdata->irq = button->irq; in gpio_keys_setup_key()
629 if (button->type && button->type != EV_KEY) { in gpio_keys_setup_key()
634 bdata->release_delay = button->debounce_interval; in gpio_keys_setup_key()
649 *bdata->code = button->code; in gpio_keys_setup_key()
650 input_set_capability(input, button->type ?: EV_KEY, *bdata->code); in gpio_keys_setup_key()
667 if (!button->can_disable) in gpio_keys_setup_key()
732 struct gpio_keys_button *button; in gpio_keys_get_devtree_pdata() local
741 sizeof(*pdata) + nbuttons * sizeof(*button), in gpio_keys_get_devtree_pdata()
746 button = (struct gpio_keys_button *)(pdata + 1); in gpio_keys_get_devtree_pdata()
748 pdata->buttons = button; in gpio_keys_get_devtree_pdata()
757 button->irq = in gpio_keys_get_devtree_pdata()
761 &button->code)) { in gpio_keys_get_devtree_pdata()
767 fwnode_property_read_string(child, "label", &button->desc); in gpio_keys_get_devtree_pdata()
770 &button->type)) in gpio_keys_get_devtree_pdata()
771 button->type = EV_KEY; in gpio_keys_get_devtree_pdata()
773 button->wakeup = in gpio_keys_get_devtree_pdata()
779 &button->wakeup_event_action); in gpio_keys_get_devtree_pdata()
781 button->can_disable = in gpio_keys_get_devtree_pdata()
785 &button->debounce_interval)) in gpio_keys_get_devtree_pdata()
786 button->debounce_interval = 5; in gpio_keys_get_devtree_pdata()
788 button++; in gpio_keys_get_devtree_pdata()
862 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_probe() local
875 button, i, child); in gpio_keys_probe()
881 if (button->wakeup) in gpio_keys_probe()
960 if (bdata->button->wakeup) { in gpio_keys_enable_wakeup()
973 if (bdata->button->wakeup) in gpio_keys_enable_wakeup()