Lines Matching refs:button
526 const struct em28xx_button *button; in em28xx_query_buttons() local
528 button = &dev->board.buttons[j]; in em28xx_query_buttons()
531 if (button->reg_r != dev->button_polling_addresses[i]) { 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()
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()
553 switch (button->role) { in em28xx_query_buttons()
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()
646 if (button->role == EM28XX_BUTTON_SNAPSHOT) { in em28xx_init_buttons()
650 } else if (button->role == EM28XX_BUTTON_ILLUMINATION) { 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()