diff options
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r-- | drivers/media/rc/imon.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 3f3c70716268..6bc35eeb653b 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
@@ -307,6 +307,14 @@ static const struct { | |||
307 | /* 0xffdc iMON MCE VFD */ | 307 | /* 0xffdc iMON MCE VFD */ |
308 | { 0x00010000ffffffeell, KEY_VOLUMEUP }, | 308 | { 0x00010000ffffffeell, KEY_VOLUMEUP }, |
309 | { 0x01000000ffffffeell, KEY_VOLUMEDOWN }, | 309 | { 0x01000000ffffffeell, KEY_VOLUMEDOWN }, |
310 | { 0x00000001ffffffeell, KEY_MUTE }, | ||
311 | { 0x0000000fffffffeell, KEY_MEDIA }, | ||
312 | { 0x00000012ffffffeell, KEY_UP }, | ||
313 | { 0x00000013ffffffeell, KEY_DOWN }, | ||
314 | { 0x00000014ffffffeell, KEY_LEFT }, | ||
315 | { 0x00000015ffffffeell, KEY_RIGHT }, | ||
316 | { 0x00000016ffffffeell, KEY_ENTER }, | ||
317 | { 0x00000017ffffffeell, KEY_ESC }, | ||
310 | /* iMON Knob values */ | 318 | /* iMON Knob values */ |
311 | { 0x000100ffffffffeell, KEY_VOLUMEUP }, | 319 | { 0x000100ffffffffeell, KEY_VOLUMEUP }, |
312 | { 0x010000ffffffffeell, KEY_VOLUMEDOWN }, | 320 | { 0x010000ffffffffeell, KEY_VOLUMEDOWN }, |
@@ -1582,16 +1590,16 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1582 | /* Only panel type events left to process now */ | 1590 | /* Only panel type events left to process now */ |
1583 | spin_lock_irqsave(&ictx->kc_lock, flags); | 1591 | spin_lock_irqsave(&ictx->kc_lock, flags); |
1584 | 1592 | ||
1593 | do_gettimeofday(&t); | ||
1585 | /* KEY_MUTE repeats from knob need to be suppressed */ | 1594 | /* KEY_MUTE repeats from knob need to be suppressed */ |
1586 | if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) { | 1595 | if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) { |
1587 | do_gettimeofday(&t); | ||
1588 | msec = tv2int(&t, &prev_time); | 1596 | msec = tv2int(&t, &prev_time); |
1589 | prev_time = t; | ||
1590 | if (msec < ictx->idev->rep[REP_DELAY]) { | 1597 | if (msec < ictx->idev->rep[REP_DELAY]) { |
1591 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1598 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
1592 | return; | 1599 | return; |
1593 | } | 1600 | } |
1594 | } | 1601 | } |
1602 | prev_time = t; | ||
1595 | kc = ictx->kc; | 1603 | kc = ictx->kc; |
1596 | 1604 | ||
1597 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1605 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
@@ -1603,7 +1611,9 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1603 | input_report_key(ictx->idev, kc, 0); | 1611 | input_report_key(ictx->idev, kc, 0); |
1604 | input_sync(ictx->idev); | 1612 | input_sync(ictx->idev); |
1605 | 1613 | ||
1614 | spin_lock_irqsave(&ictx->kc_lock, flags); | ||
1606 | ictx->last_keycode = kc; | 1615 | ictx->last_keycode = kc; |
1616 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | ||
1607 | 1617 | ||
1608 | return; | 1618 | return; |
1609 | 1619 | ||
@@ -1740,6 +1750,8 @@ static void imon_get_ffdc_type(struct imon_context *ictx) | |||
1740 | detected_display_type = IMON_DISPLAY_TYPE_VFD; | 1750 | detected_display_type = IMON_DISPLAY_TYPE_VFD; |
1741 | break; | 1751 | break; |
1742 | /* iMON VFD, MCE IR */ | 1752 | /* iMON VFD, MCE IR */ |
1753 | case 0x46: | ||
1754 | case 0x7e: | ||
1743 | case 0x9e: | 1755 | case 0x9e: |
1744 | dev_info(ictx->dev, "0xffdc iMON VFD, MCE IR"); | 1756 | dev_info(ictx->dev, "0xffdc iMON VFD, MCE IR"); |
1745 | detected_display_type = IMON_DISPLAY_TYPE_VFD; | 1757 | detected_display_type = IMON_DISPLAY_TYPE_VFD; |
@@ -1755,6 +1767,9 @@ static void imon_get_ffdc_type(struct imon_context *ictx) | |||
1755 | dev_info(ictx->dev, "Unknown 0xffdc device, " | 1767 | dev_info(ictx->dev, "Unknown 0xffdc device, " |
1756 | "defaulting to VFD and iMON IR"); | 1768 | "defaulting to VFD and iMON IR"); |
1757 | detected_display_type = IMON_DISPLAY_TYPE_VFD; | 1769 | detected_display_type = IMON_DISPLAY_TYPE_VFD; |
1770 | /* We don't know which one it is, allow user to set the | ||
1771 | * RC6 one from userspace if OTHER wasn't correct. */ | ||
1772 | allowed_protos |= RC_TYPE_RC6; | ||
1758 | break; | 1773 | break; |
1759 | } | 1774 | } |
1760 | 1775 | ||