diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:38:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 13:38:08 -0400 |
commit | f63b759c44b0561c76a67894c734157df3313b42 (patch) | |
tree | 4e9638f6c1aa5c0faa62ad4213282cc7cb39772a /drivers/media/dvb/dvb-usb/dw2102.c | |
parent | 4a35cee066df1b1958e25e71595b3845d06b192e (diff) | |
parent | 844a9e93d7fcd910cd94f6eb262e2cc43cacbe56 (diff) |
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (243 commits)
V4L/DVB: sms: Convert IR support to use the Remote Controller core
V4L/DVB: sms: properly initialize IR phys and IR name
V4L/DVB: standardize names at rc-dib0700 tables
V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5
V4L/DVB: dib0700: properly implement IR change_protocol
V4L/DVB: dib0700: break keytable into NEC and RC-5 variants
V4L/DVB: dib0700: avoid bad repeat
V4L/DVB: Port dib0700 to rc-core
V4L/DVB: Add a keymap file with dib0700 table
V4L/DVB: dvb-usb: add support for rc-core mode
V4L/DVB: dvb-usb: prepare drivers for using rc-core
V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
V4L/DVB: rj54n1cb0c: fix a comment in the driver
V4L/DVB: V4L2: sh_vou: VOU does support the full PAL resolution too
V4L/DVB: V4L2: sh_mobile_camera_ceu: add support for CSI2
V4L/DVB: V4L2: soc-camera: add a MIPI CSI-2 driver for SH-Mobile platforms
V4L/DVB: V4L2: soc-camera: export soc-camera bus type for notifications
V4L/DVB: V4L2: mediabus: add 12-bit Bayer and YUV420 pixel formats
V4L/DVB: mediabus: fix ambiguous pixel code names
...
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dw2102.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dw2102.c | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index e8fb85380672..774df88dc6e3 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c | |||
@@ -74,7 +74,7 @@ | |||
74 | "on firmware-problems." | 74 | "on firmware-problems." |
75 | 75 | ||
76 | struct ir_codes_dvb_usb_table_table { | 76 | struct ir_codes_dvb_usb_table_table { |
77 | struct dvb_usb_rc_key *rc_keys; | 77 | struct ir_scancode *rc_keys; |
78 | int rc_keys_size; | 78 | int rc_keys_size; |
79 | }; | 79 | }; |
80 | 80 | ||
@@ -948,7 +948,7 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter *adap) | |||
948 | return 0; | 948 | return 0; |
949 | } | 949 | } |
950 | 950 | ||
951 | static struct dvb_usb_rc_key ir_codes_dw210x_table[] = { | 951 | static struct ir_scancode ir_codes_dw210x_table[] = { |
952 | { 0xf80a, KEY_Q }, /*power*/ | 952 | { 0xf80a, KEY_Q }, /*power*/ |
953 | { 0xf80c, KEY_M }, /*mute*/ | 953 | { 0xf80c, KEY_M }, /*mute*/ |
954 | { 0xf811, KEY_1 }, | 954 | { 0xf811, KEY_1 }, |
@@ -982,7 +982,7 @@ static struct dvb_usb_rc_key ir_codes_dw210x_table[] = { | |||
982 | { 0xf81b, KEY_B }, /*recall*/ | 982 | { 0xf81b, KEY_B }, /*recall*/ |
983 | }; | 983 | }; |
984 | 984 | ||
985 | static struct dvb_usb_rc_key ir_codes_tevii_table[] = { | 985 | static struct ir_scancode ir_codes_tevii_table[] = { |
986 | { 0xf80a, KEY_POWER }, | 986 | { 0xf80a, KEY_POWER }, |
987 | { 0xf80c, KEY_MUTE }, | 987 | { 0xf80c, KEY_MUTE }, |
988 | { 0xf811, KEY_1 }, | 988 | { 0xf811, KEY_1 }, |
@@ -1032,7 +1032,7 @@ static struct dvb_usb_rc_key ir_codes_tevii_table[] = { | |||
1032 | { 0xf858, KEY_SWITCHVIDEOMODE }, | 1032 | { 0xf858, KEY_SWITCHVIDEOMODE }, |
1033 | }; | 1033 | }; |
1034 | 1034 | ||
1035 | static struct dvb_usb_rc_key ir_codes_tbs_table[] = { | 1035 | static struct ir_scancode ir_codes_tbs_table[] = { |
1036 | { 0xf884, KEY_POWER }, | 1036 | { 0xf884, KEY_POWER }, |
1037 | { 0xf894, KEY_MUTE }, | 1037 | { 0xf894, KEY_MUTE }, |
1038 | { 0xf887, KEY_1 }, | 1038 | { 0xf887, KEY_1 }, |
@@ -1075,8 +1075,8 @@ static struct ir_codes_dvb_usb_table_table keys_tables[] = { | |||
1075 | 1075 | ||
1076 | static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | 1076 | static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) |
1077 | { | 1077 | { |
1078 | struct dvb_usb_rc_key *keymap = d->props.rc_key_map; | 1078 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
1079 | int keymap_size = d->props.rc_key_map_size; | 1079 | int keymap_size = d->props.rc.legacy.rc_key_map_size; |
1080 | u8 key[2]; | 1080 | u8 key[2]; |
1081 | struct i2c_msg msg = { | 1081 | struct i2c_msg msg = { |
1082 | .addr = DW2102_RC_QUERY, | 1082 | .addr = DW2102_RC_QUERY, |
@@ -1096,7 +1096,7 @@ static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
1096 | for (i = 0; i < keymap_size ; i++) { | 1096 | for (i = 0; i < keymap_size ; i++) { |
1097 | if (rc5_data(&keymap[i]) == msg.buf[0]) { | 1097 | if (rc5_data(&keymap[i]) == msg.buf[0]) { |
1098 | *state = REMOTE_KEY_PRESSED; | 1098 | *state = REMOTE_KEY_PRESSED; |
1099 | *event = keymap[i].event; | 1099 | *event = keymap[i].keycode; |
1100 | break; | 1100 | break; |
1101 | } | 1101 | } |
1102 | 1102 | ||
@@ -1185,13 +1185,13 @@ static int dw2102_load_firmware(struct usb_device *dev, | |||
1185 | /* init registers */ | 1185 | /* init registers */ |
1186 | switch (dev->descriptor.idProduct) { | 1186 | switch (dev->descriptor.idProduct) { |
1187 | case USB_PID_PROF_1100: | 1187 | case USB_PID_PROF_1100: |
1188 | s6x0_properties.rc_key_map = ir_codes_tbs_table; | 1188 | s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; |
1189 | s6x0_properties.rc_key_map_size = | 1189 | s6x0_properties.rc.legacy.rc_key_map_size = |
1190 | ARRAY_SIZE(ir_codes_tbs_table); | 1190 | ARRAY_SIZE(ir_codes_tbs_table); |
1191 | break; | 1191 | break; |
1192 | case USB_PID_TEVII_S650: | 1192 | case USB_PID_TEVII_S650: |
1193 | dw2104_properties.rc_key_map = ir_codes_tevii_table; | 1193 | dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; |
1194 | dw2104_properties.rc_key_map_size = | 1194 | dw2104_properties.rc.legacy.rc_key_map_size = |
1195 | ARRAY_SIZE(ir_codes_tevii_table); | 1195 | ARRAY_SIZE(ir_codes_tevii_table); |
1196 | case USB_PID_DW2104: | 1196 | case USB_PID_DW2104: |
1197 | reset = 1; | 1197 | reset = 1; |
@@ -1255,10 +1255,13 @@ static struct dvb_usb_device_properties dw2102_properties = { | |||
1255 | .no_reconnect = 1, | 1255 | .no_reconnect = 1, |
1256 | 1256 | ||
1257 | .i2c_algo = &dw2102_serit_i2c_algo, | 1257 | .i2c_algo = &dw2102_serit_i2c_algo, |
1258 | .rc_key_map = ir_codes_dw210x_table, | 1258 | |
1259 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1259 | .rc.legacy = { |
1260 | .rc_interval = 150, | 1260 | .rc_key_map = ir_codes_dw210x_table, |
1261 | .rc_query = dw2102_rc_query, | 1261 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1262 | .rc_interval = 150, | ||
1263 | .rc_query = dw2102_rc_query, | ||
1264 | }, | ||
1262 | 1265 | ||
1263 | .generic_bulk_ctrl_endpoint = 0x81, | 1266 | .generic_bulk_ctrl_endpoint = 0x81, |
1264 | /* parameter for the MPEG2-data transfer */ | 1267 | /* parameter for the MPEG2-data transfer */ |
@@ -1306,10 +1309,12 @@ static struct dvb_usb_device_properties dw2104_properties = { | |||
1306 | .no_reconnect = 1, | 1309 | .no_reconnect = 1, |
1307 | 1310 | ||
1308 | .i2c_algo = &dw2104_i2c_algo, | 1311 | .i2c_algo = &dw2104_i2c_algo, |
1309 | .rc_key_map = ir_codes_dw210x_table, | 1312 | .rc.legacy = { |
1310 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1313 | .rc_key_map = ir_codes_dw210x_table, |
1311 | .rc_interval = 150, | 1314 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1312 | .rc_query = dw2102_rc_query, | 1315 | .rc_interval = 150, |
1316 | .rc_query = dw2102_rc_query, | ||
1317 | }, | ||
1313 | 1318 | ||
1314 | .generic_bulk_ctrl_endpoint = 0x81, | 1319 | .generic_bulk_ctrl_endpoint = 0x81, |
1315 | /* parameter for the MPEG2-data transfer */ | 1320 | /* parameter for the MPEG2-data transfer */ |
@@ -1353,10 +1358,12 @@ static struct dvb_usb_device_properties dw3101_properties = { | |||
1353 | .no_reconnect = 1, | 1358 | .no_reconnect = 1, |
1354 | 1359 | ||
1355 | .i2c_algo = &dw3101_i2c_algo, | 1360 | .i2c_algo = &dw3101_i2c_algo, |
1356 | .rc_key_map = ir_codes_dw210x_table, | 1361 | .rc.legacy = { |
1357 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1362 | .rc_key_map = ir_codes_dw210x_table, |
1358 | .rc_interval = 150, | 1363 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1359 | .rc_query = dw2102_rc_query, | 1364 | .rc_interval = 150, |
1365 | .rc_query = dw2102_rc_query, | ||
1366 | }, | ||
1360 | 1367 | ||
1361 | .generic_bulk_ctrl_endpoint = 0x81, | 1368 | .generic_bulk_ctrl_endpoint = 0x81, |
1362 | /* parameter for the MPEG2-data transfer */ | 1369 | /* parameter for the MPEG2-data transfer */ |
@@ -1396,10 +1403,12 @@ static struct dvb_usb_device_properties s6x0_properties = { | |||
1396 | .no_reconnect = 1, | 1403 | .no_reconnect = 1, |
1397 | 1404 | ||
1398 | .i2c_algo = &s6x0_i2c_algo, | 1405 | .i2c_algo = &s6x0_i2c_algo, |
1399 | .rc_key_map = ir_codes_tevii_table, | 1406 | .rc.legacy = { |
1400 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), | 1407 | .rc_key_map = ir_codes_tevii_table, |
1401 | .rc_interval = 150, | 1408 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), |
1402 | .rc_query = dw2102_rc_query, | 1409 | .rc_interval = 150, |
1410 | .rc_query = dw2102_rc_query, | ||
1411 | }, | ||
1403 | 1412 | ||
1404 | .generic_bulk_ctrl_endpoint = 0x81, | 1413 | .generic_bulk_ctrl_endpoint = 0x81, |
1405 | .num_adapters = 1, | 1414 | .num_adapters = 1, |
@@ -1459,8 +1468,8 @@ static int dw2102_probe(struct usb_interface *intf, | |||
1459 | /* fill only different fields */ | 1468 | /* fill only different fields */ |
1460 | p7500->firmware = "dvb-usb-p7500.fw"; | 1469 | p7500->firmware = "dvb-usb-p7500.fw"; |
1461 | p7500->devices[0] = d7500; | 1470 | p7500->devices[0] = d7500; |
1462 | p7500->rc_key_map = ir_codes_tbs_table; | 1471 | p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; |
1463 | p7500->rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); | 1472 | p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); |
1464 | p7500->adapter->frontend_attach = prof_7500_frontend_attach; | 1473 | p7500->adapter->frontend_attach = prof_7500_frontend_attach; |
1465 | 1474 | ||
1466 | if (0 == dvb_usb_device_init(intf, &dw2102_properties, | 1475 | if (0 == dvb_usb_device_init(intf, &dw2102_properties, |