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
154 pdata = devm_kzalloc(dev, sizeof(*pdata) + nbuttons * sizeof(*button), in gpio_keys_polled_get_devtree_pdata()
159 button = (struct gpio_keys_button *)(pdata + 1); in gpio_keys_polled_get_devtree_pdata()
161 pdata->buttons = button; in gpio_keys_polled_get_devtree_pdata()
171 &button->code)) { in gpio_keys_polled_get_devtree_pdata()
172 dev_err(dev, "button without keycode\n"); in gpio_keys_polled_get_devtree_pdata()
177 fwnode_property_read_string(child, "label", &button->desc); in gpio_keys_polled_get_devtree_pdata()
180 &button->type)) in gpio_keys_polled_get_devtree_pdata()
181 button->type = EV_KEY; in gpio_keys_polled_get_devtree_pdata()
184 (u32 *)&button->value)) in gpio_keys_polled_get_devtree_pdata()
185 button->value = 1; in gpio_keys_polled_get_devtree_pdata()
187 button->wakeup = in gpio_keys_polled_get_devtree_pdata()
193 &button->debounce_interval)) in gpio_keys_polled_get_devtree_pdata()
194 button->debounce_interval = 5; in gpio_keys_polled_get_devtree_pdata()
196 button++; in gpio_keys_polled_get_devtree_pdata()
208 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_set_abs_params() local
210 if (button->type != EV_ABS || button->code != code) in gpio_keys_polled_set_abs_params()
213 if (button->value < min) in gpio_keys_polled_set_abs_params()
214 min = button->value; in gpio_keys_polled_set_abs_params()
215 if (button->value > max) in gpio_keys_polled_set_abs_params()
216 max = button->value; in gpio_keys_polled_set_abs_params()
280 const struct gpio_keys_button *button = &pdata->buttons[i]; in gpio_keys_polled_probe() local
282 unsigned int type = button->type ?: EV_KEY; in gpio_keys_polled_probe()
284 if (button->wakeup) { in gpio_keys_polled_probe()
300 button->desc); in gpio_keys_polled_probe()
306 } else if (gpio_is_valid(button->gpio)) { in gpio_keys_polled_probe()
313 if (button->active_low) in gpio_keys_polled_probe()
316 error = devm_gpio_request_one(dev, button->gpio, in gpio_keys_polled_probe()
317 flags, button->desc ? : DRV_NAME); in gpio_keys_polled_probe()
321 button->gpio); in gpio_keys_polled_probe()
323 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_polled_probe()
327 button->gpio); in gpio_keys_polled_probe()
333 bdata->threshold = DIV_ROUND_UP(button->debounce_interval, in gpio_keys_polled_probe()
336 input_set_capability(input, type, button->code); in gpio_keys_polled_probe()
339 button->code); in gpio_keys_polled_probe()