aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-04-03 19:31:30 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-23 20:50:48 -0400
commit120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch)
tree427e55aad9dcfcb91e99b98d508e6fb407e8f600 /drivers/media/usb/dvb-usb-v2/rtl28xxu.c
parentaf3a4a9bbeb00df3e42e77240b4cdac5479812f9 (diff)
[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/rtl28xxu.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index a676e4452847..57ac62d6fa1f 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -1287,19 +1287,19 @@ static int rtl2831u_rc_query(struct dvb_usb_device *d)
1287 if (buf[2] == (u8) ~buf[3]) { 1287 if (buf[2] == (u8) ~buf[3]) {
1288 if (buf[0] == (u8) ~buf[1]) { 1288 if (buf[0] == (u8) ~buf[1]) {
1289 /* NEC standard (16 bit) */ 1289 /* NEC standard (16 bit) */
1290 rc_code = buf[0] << 8 | buf[2]; 1290 rc_code = RC_SCANCODE_NEC(buf[0], buf[2]);
1291 } else { 1291 } else {
1292 /* NEC extended (24 bit) */ 1292 /* NEC extended (24 bit) */
1293 rc_code = buf[0] << 16 | 1293 rc_code = RC_SCANCODE_NECX(buf[0] << 8 | buf[1],
1294 buf[1] << 8 | buf[2]; 1294 buf[2]);
1295 } 1295 }
1296 } else { 1296 } else {
1297 /* NEC full (32 bit) */ 1297 /* NEC full (32 bit) */
1298 rc_code = buf[0] << 24 | buf[1] << 16 | 1298 rc_code = RC_SCANCODE_NEC32(buf[0] << 24 | buf[1] << 16 |
1299 buf[2] << 8 | buf[3]; 1299 buf[2] << 8 | buf[3]);
1300 } 1300 }
1301 1301
1302 rc_keydown(d->rc_dev, rc_code, 0); 1302 rc_keydown(d->rc_dev, RC_TYPE_NEC, rc_code, 0);
1303 1303
1304 ret = rtl28xx_wr_reg(d, SYS_IRRC_SR, 1); 1304 ret = rtl28xx_wr_reg(d, SYS_IRRC_SR, 1);
1305 if (ret) 1305 if (ret)