Lines Matching full:button
45 const struct gpio_keys_button *button, in gpio_keys_button_event() argument
49 unsigned int type = button->type ?: EV_KEY; in gpio_keys_button_event()
53 input_event(input, type, button->code, button->value); in gpio_keys_button_event()
54 __set_bit(button->code, bdev->rel_axis_seen); in gpio_keys_button_event()
58 input_event(input, type, button->code, button->value); in gpio_keys_button_event()
59 __set_bit(button->code, bdev->abs_axis_seen); in gpio_keys_button_event()
62 input_event(input, type, button->code, state); in gpio_keys_button_event()
68 const struct gpio_keys_button *button, in gpio_keys_polled_check_state() argument
78 gpio_keys_button_event(input, button, state); in gpio_keys_polled_check_state()
146 struct gpio_keys_button *button; in gpio_keys_polled_get_devtree_pdata() local
153 pdata = devm_kzalloc(dev, sizeof(*pdata) + nbuttons * sizeof(*button), in gpio_keys_polled_get_devtree_pdata()
158 button = (struct gpio_keys_button *)(pdata + 1); in gpio_keys_polled_get_devtree_pdata()
160 pdata->buttons = button; in gpio_keys_polled_get_devtree_pdata()
170 &button->code)) { in gpio_keys_polled_get_devtree_pdata()
171 dev_err(dev, "button without keycode\n"); in gpio_keys_polled_get_devtree_pdata()
175 fwnode_property_read_string(child, "label", &button->desc); in gpio_keys_polled_get_devtree_pdata()
178 &button->type)) in gpio_keys_polled_get_devtree_pdata()
179 button->type = EV_KEY; in gpio_keys_polled_get_devtree_pdata()
182 (u32 *)&button->value)) in gpio_keys_polled_get_devtree_pdata()
183 button->value = 1; in gpio_keys_polled_get_devtree_pdata()
185 button->wakeup = in gpio_keys_polled_get_devtree_pdata()
191 &button->debounce_interval)) in gpio_keys_polled_get_devtree_pdata()
192 button->debounce_interval = 5; in gpio_keys_polled_get_devtree_pdata()
194 button++; in gpio_keys_polled_get_devtree_pdata()
206 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_set_abs_params() local
208 if (button->type != EV_ABS || button->code != code) in gpio_keys_polled_set_abs_params()
211 if (button->value < min) in gpio_keys_polled_set_abs_params()
212 min = button->value; in gpio_keys_polled_set_abs_params()
213 if (button->value > max) in gpio_keys_polled_set_abs_params()
214 max = button->value; in gpio_keys_polled_set_abs_params()
278 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_probe() local
280 unsigned int type = button->type ?: EV_KEY; in gpio_keys_polled_probe()
282 if (button->wakeup) { in gpio_keys_polled_probe()
298 button->desc); in gpio_keys_polled_probe()
304 } else if (gpio_is_valid(button->gpio)) { in gpio_keys_polled_probe()
311 if (button->active_low) in gpio_keys_polled_probe()
314 error = devm_gpio_request_one(dev, button->gpio, in gpio_keys_polled_probe()
315 flags, button->desc ? : DRV_NAME); in gpio_keys_polled_probe()
319 button->gpio); in gpio_keys_polled_probe()
321 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_polled_probe()
325 button->gpio); in gpio_keys_polled_probe()
331 bdata->threshold = DIV_ROUND_UP(button->debounce_interval, in gpio_keys_polled_probe()
334 input_set_capability(input, type, button->code); in gpio_keys_polled_probe()
337 button->code); in gpio_keys_polled_probe()