Lines Matching full:button
97 * it seems that 0xFE indicates that a button is still hold in em28xx_get_key_terratec()
98 * down, while 0xff indicates that no button is hold down. in em28xx_get_key_terratec()
526 const struct em28xx_button *button; in em28xx_query_buttons() local
528 button = &dev->board.buttons[j]; in em28xx_query_buttons()
530 /* Check if button uses the current address */ in em28xx_query_buttons()
531 if (button->reg_r != dev->button_polling_addresses[i]) { in em28xx_query_buttons()
535 /* Determine if button is and was pressed last time */ in em28xx_query_buttons()
536 is_pressed = regval & button->mask; in em28xx_query_buttons()
538 & button->mask; in em28xx_query_buttons()
539 if (button->inverted) { in em28xx_query_buttons()
543 /* Clear button state (if needed) */ in em28xx_query_buttons()
544 if (is_pressed && button->reg_clearing) in em28xx_query_buttons()
545 em28xx_write_reg(dev, button->reg_clearing, in em28xx_query_buttons()
546 (~regval & button->mask) in em28xx_query_buttons()
547 | (regval & ~button->mask)); in em28xx_query_buttons()
548 /* Handle button state */ in em28xx_query_buttons()
553 switch (button->role) { in em28xx_query_buttons()
572 WARN_ONCE(1, "BUG: unhandled button role."); in em28xx_query_buttons()
574 /* Next button */ in em28xx_query_buttons()
591 dev_info(&dev->intf->dev, "Registering snapshot button...\n"); in em28xx_register_snapshot_button()
601 input_dev->name = "em28xx snapshot button"; in em28xx_register_snapshot_button()
629 const struct em28xx_button *button = &dev->board.buttons[i]; in em28xx_init_buttons() local
634 if (button->reg_r == dev->button_polling_addresses[j]) { in em28xx_init_buttons()
642 WARN_ONCE(1, "BUG: maximum number of button polling addresses exceeded."); in em28xx_init_buttons()
645 /* Button role specific checks and actions */ in em28xx_init_buttons()
646 if (button->role == EM28XX_BUTTON_SNAPSHOT) { in em28xx_init_buttons()
650 } else if (button->role == EM28XX_BUTTON_ILLUMINATION) { in em28xx_init_buttons()
654 "BUG: illumination button defined, but no illumination LED.\n"); in em28xx_init_buttons()
662 dev->button_polling_addresses[index] = button->reg_r; in em28xx_init_buttons()
666 if (!button->reg_clearing) in em28xx_init_buttons()
670 /* Next button */ in em28xx_init_buttons()
691 dev_info(&dev->intf->dev, "Deregistering snapshot button\n"); in em28xx_shutdown_buttons()