Lines Matching full:button

34 	const struct gpio_keys_button *button;  member
100 * @type: type of button (%EV_KEY, %EV_SW)
115 * @type: type of button (%EV_KEY, %EV_SW)
141 * gpio_keys_disable_button() - disables given GPIO button
142 * @bdata: button data for button to be disabled
144 * Disables button pointed by @bdata. This is done by masking
145 * IRQ line. After this function is called, button won't generate
166 * gpio_keys_enable_button() - enables given GPIO button
167 * @bdata: button data for button to be disabled
169 * Enables given button pointed by @bdata.
173 * to enable the same button at the same time.
187 * @type: button type (%EV_KEY, %EV_SW)
213 if (bdata->button->type != type) in gpio_keys_attr_show_helper()
235 * @type: button type (%EV_KEY, %EV_SW)
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()
536 } else if (gpio_is_valid(button->gpio)) { in gpio_keys_setup_key()
543 if (button->active_low) in gpio_keys_setup_key()
546 error = devm_gpio_request_one(dev, button->gpio, flags, desc); in gpio_keys_setup_key()
549 button->gpio, error); in gpio_keys_setup_key()
553 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_setup_key()
561 if (button->debounce_interval) { in gpio_keys_setup_key()
563 button->debounce_interval * 1000); in gpio_keys_setup_key()
567 button->debounce_interval; in gpio_keys_setup_key()
578 if (button->irq) { in gpio_keys_setup_key()
579 bdata->irq = button->irq; in gpio_keys_setup_key()
586 button->gpio, error); in gpio_keys_setup_key()
601 switch (button->wakeup_event_action) { in gpio_keys_setup_key()
619 if (!button->irq) { in gpio_keys_setup_key()
620 dev_err(dev, "Found button without gpio or irq\n"); in gpio_keys_setup_key()
624 bdata->irq = button->irq; in gpio_keys_setup_key()
626 if (button->type && button->type != EV_KEY) { in gpio_keys_setup_key()
631 bdata->release_delay = button->debounce_interval; in gpio_keys_setup_key()
646 *bdata->code = button->code; in gpio_keys_setup_key()
647 input_set_capability(input, button->type ?: EV_KEY, *bdata->code); in gpio_keys_setup_key()
661 * If platform has specified that the button can be disabled, in gpio_keys_setup_key()
664 if (!button->can_disable) in gpio_keys_setup_key()
729 struct gpio_keys_button *button; in gpio_keys_get_devtree_pdata() local
738 sizeof(*pdata) + nbuttons * sizeof(*button), in gpio_keys_get_devtree_pdata()
743 button = (struct gpio_keys_button *)(pdata + 1); in gpio_keys_get_devtree_pdata()
745 pdata->buttons = button; in gpio_keys_get_devtree_pdata()
754 button->irq = in gpio_keys_get_devtree_pdata()
758 &button->code)) { in gpio_keys_get_devtree_pdata()
759 dev_err(dev, "Button without keycode\n"); in gpio_keys_get_devtree_pdata()
764 fwnode_property_read_string(child, "label", &button->desc); in gpio_keys_get_devtree_pdata()
767 &button->type)) in gpio_keys_get_devtree_pdata()
768 button->type = EV_KEY; in gpio_keys_get_devtree_pdata()
771 (u32 *)&button->value); 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()