Lines Matching full:button

87 	 * it seems that 0xFE indicates that a button is still hold  in em28xx_get_key_terratec()
88 * down, while 0xff indicates that no button is hold down. in em28xx_get_key_terratec()
516 const struct em28xx_button *button; in em28xx_query_buttons() local
518 button = &dev->board.buttons[j]; in em28xx_query_buttons()
520 /* Check if button uses the current address */ in em28xx_query_buttons()
521 if (button->reg_r != dev->button_polling_addresses[i]) { in em28xx_query_buttons()
525 /* Determine if button is and was pressed last time */ in em28xx_query_buttons()
526 is_pressed = regval & button->mask; in em28xx_query_buttons()
528 & button->mask; in em28xx_query_buttons()
529 if (button->inverted) { in em28xx_query_buttons()
533 /* Clear button state (if needed) */ in em28xx_query_buttons()
534 if (is_pressed && button->reg_clearing) in em28xx_query_buttons()
535 em28xx_write_reg(dev, button->reg_clearing, in em28xx_query_buttons()
536 (~regval & button->mask) in em28xx_query_buttons()
537 | (regval & ~button->mask)); in em28xx_query_buttons()
538 /* Handle button state */ in em28xx_query_buttons()
543 switch (button->role) { in em28xx_query_buttons()
562 WARN_ONCE(1, "BUG: unhandled button role."); in em28xx_query_buttons()
564 /* Next button */ in em28xx_query_buttons()
581 dev_info(&dev->intf->dev, "Registering snapshot button...\n"); in em28xx_register_snapshot_button()
591 input_dev->name = "em28xx snapshot button"; in em28xx_register_snapshot_button()
619 const struct em28xx_button *button = &dev->board.buttons[i]; in em28xx_init_buttons() local
624 if (button->reg_r == dev->button_polling_addresses[j]) { in em28xx_init_buttons()
632 WARN_ONCE(1, "BUG: maximum number of button polling addresses exceeded."); in em28xx_init_buttons()
635 /* Button role specific checks and actions */ in em28xx_init_buttons()
636 if (button->role == EM28XX_BUTTON_SNAPSHOT) { in em28xx_init_buttons()
640 } else if (button->role == EM28XX_BUTTON_ILLUMINATION) { in em28xx_init_buttons()
644 "BUG: illumination button defined, but no illumination LED.\n"); in em28xx_init_buttons()
652 dev->button_polling_addresses[index] = button->reg_r; in em28xx_init_buttons()
656 if (!button->reg_clearing) in em28xx_init_buttons()
660 /* Next button */ in em28xx_init_buttons()
681 dev_info(&dev->intf->dev, "Deregistering snapshot button\n"); in em28xx_shutdown_buttons()