[media] em28xx: extend the support for device buttons
[deliverable/linux.git] / drivers / media / usb / em28xx / em28xx-cards.c
index a5196697627f3be4098d849111731b352f989e0f..ebb112c17109d2ef9060c71fb04adba7cc32b960 100644 (file)
@@ -412,6 +412,20 @@ static struct em28xx_reg_seq pctv_520e[] = {
        {       -1,                     -1,     -1,     -1},
 };
 
+/*
+ *  Button definitions
+ */
+static struct em28xx_button std_snapshot_button[] = {
+       {
+               .role         = EM28XX_BUTTON_SNAPSHOT,
+               .reg_r        = EM28XX_R0C_USBSUSP,
+               .reg_clearing = EM28XX_R0C_USBSUSP,
+               .mask         = EM28XX_R0C_USBSUSP_SNAPSHOT,
+               .inverted     = 0,
+       },
+       {-1, 0, 0, 0, 0},
+};
+
 /*
  *  Board definitions
  */
@@ -1391,7 +1405,7 @@ struct em28xx_board em28xx_boards[] = {
        },
        [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
                .name         = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
-               .has_snapshot_button = 1,
+               .buttons = std_snapshot_button,
                .tda9887_conf = TDA9887_PRESENT,
                .tuner_type   = TUNER_YMEC_TVF_5533MF,
                .decoder      = EM28XX_SAA711X,
@@ -1413,7 +1427,7 @@ struct em28xx_board em28xx_boards[] = {
        },
        [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = {
                .name                = "EM2860/SAA711X Reference Design",
-               .has_snapshot_button = 1,
+               .buttons = std_snapshot_button,
                .tuner_type          = TUNER_ABSENT,
                .decoder             = EM28XX_SAA711X,
                .input               = { {
@@ -2841,7 +2855,7 @@ static void request_module_async(struct work_struct *work)
 
        if (dev->board.has_dvb)
                request_module("em28xx-dvb");
-       if (dev->board.has_snapshot_button ||
+       if (dev->board.buttons ||
            ((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir))
                request_module("em28xx-rc");
 #endif /* CONFIG_MODULES */
This page took 0.027405 seconds and 5 git commands to generate.