Commit 5a143b12 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab

V4L/DVB: ir-core: remove IR_TYPE_PD

Pulse-distance is not a protocol, it is a line coding (used by some protocols,
like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be
NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user).

So, remove IR_TYPE_PD while it is still easy to do so.
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6718e8ad
...@@ -57,8 +57,6 @@ static ssize_t show_protocol(struct device *d, ...@@ -57,8 +57,6 @@ static ssize_t show_protocol(struct device *d,
s = "Unknown"; s = "Unknown";
else if (ir_type == IR_TYPE_RC5) else if (ir_type == IR_TYPE_RC5)
s = "rc-5"; s = "rc-5";
else if (ir_type == IR_TYPE_PD)
s = "pulse-distance";
else if (ir_type == IR_TYPE_NEC) else if (ir_type == IR_TYPE_NEC)
s = "nec"; s = "nec";
else if (ir_type == IR_TYPE_RC6) else if (ir_type == IR_TYPE_RC6)
...@@ -100,8 +98,6 @@ static ssize_t store_protocol(struct device *d, ...@@ -100,8 +98,6 @@ static ssize_t store_protocol(struct device *d,
while ((buf = strsep((char **) &data, " \n")) != NULL) { while ((buf = strsep((char **) &data, " \n")) != NULL) {
if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5")) if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5"))
ir_type |= IR_TYPE_RC5; ir_type |= IR_TYPE_RC5;
if (!strcasecmp(buf, "pd") || !strcasecmp(buf, "pulse-distance"))
ir_type |= IR_TYPE_PD;
if (!strcasecmp(buf, "nec")) if (!strcasecmp(buf, "nec"))
ir_type |= IR_TYPE_NEC; ir_type |= IR_TYPE_NEC;
if (!strcasecmp(buf, "jvc")) if (!strcasecmp(buf, "jvc"))
...@@ -146,8 +142,6 @@ static ssize_t show_supported_protocols(struct device *d, ...@@ -146,8 +142,6 @@ static ssize_t show_supported_protocols(struct device *d,
buf += sprintf(buf, "unknown "); buf += sprintf(buf, "unknown ");
if (ir_dev->props->allowed_protos & IR_TYPE_RC5) if (ir_dev->props->allowed_protos & IR_TYPE_RC5)
buf += sprintf(buf, "rc-5 "); buf += sprintf(buf, "rc-5 ");
if (ir_dev->props->allowed_protos & IR_TYPE_PD)
buf += sprintf(buf, "pulse-distance ");
if (ir_dev->props->allowed_protos & IR_TYPE_NEC) if (ir_dev->props->allowed_protos & IR_TYPE_NEC)
buf += sprintf(buf, "nec "); buf += sprintf(buf, "nec ");
if (buf == orgbuf) if (buf == orgbuf)
......
...@@ -272,7 +272,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ...@@ -272,7 +272,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
break; break;
case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
ir_codes = RC_MAP_CINERGY_1400; ir_codes = RC_MAP_CINERGY_1400;
ir_type = IR_TYPE_PD; ir_type = IR_TYPE_NEC;
ir->sampling = 0xeb04; /* address */ ir->sampling = 0xeb04; /* address */
break; break;
case CX88_BOARD_HAUPPAUGE: case CX88_BOARD_HAUPPAUGE:
...@@ -375,18 +375,18 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ...@@ -375,18 +375,18 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
case CX88_BOARD_PROF_7301: case CX88_BOARD_PROF_7301:
case CX88_BOARD_PROF_6200: case CX88_BOARD_PROF_6200:
ir_codes = RC_MAP_TBS_NEC; ir_codes = RC_MAP_TBS_NEC;
ir_type = IR_TYPE_PD; ir_type = IR_TYPE_NEC;
ir->sampling = 0xff00; /* address */ ir->sampling = 0xff00; /* address */
break; break;
case CX88_BOARD_TEVII_S460: case CX88_BOARD_TEVII_S460:
case CX88_BOARD_TEVII_S420: case CX88_BOARD_TEVII_S420:
ir_codes = RC_MAP_TEVII_NEC; ir_codes = RC_MAP_TEVII_NEC;
ir_type = IR_TYPE_PD; ir_type = IR_TYPE_NEC;
ir->sampling = 0xff00; /* address */ ir->sampling = 0xff00; /* address */
break; break;
case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
ir_codes = RC_MAP_DNTV_LIVE_DVBT_PRO; ir_codes = RC_MAP_DNTV_LIVE_DVBT_PRO;
ir_type = IR_TYPE_PD; ir_type = IR_TYPE_NEC;
ir->sampling = 0xff00; /* address */ ir->sampling = 0xff00; /* address */
break; break;
case CX88_BOARD_NORWOOD_MICRO: case CX88_BOARD_NORWOOD_MICRO:
......
...@@ -36,7 +36,7 @@ enum ir_kbd_get_key_fn { ...@@ -36,7 +36,7 @@ enum ir_kbd_get_key_fn {
struct IR_i2c_init_data { struct IR_i2c_init_data {
char *ir_codes; char *ir_codes;
const char *name; const char *name;
u64 type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ u64 type; /* IR_TYPE_RC5, etc */
/* /*
* Specify either a function pointer or a value indicating one of * Specify either a function pointer or a value indicating one of
* ir_kbd_i2c's internal get_key functions * ir_kbd_i2c's internal get_key functions
......
...@@ -13,11 +13,10 @@ ...@@ -13,11 +13,10 @@
#define IR_TYPE_UNKNOWN 0 #define IR_TYPE_UNKNOWN 0
#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ #define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */ #define IR_TYPE_NEC (1 << 1)
#define IR_TYPE_NEC (1 << 2) #define IR_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */
#define IR_TYPE_RC6 (1 << 3) /* Philips RC6 protocol */ #define IR_TYPE_JVC (1 << 3) /* JVC protocol */
#define IR_TYPE_JVC (1 << 4) /* JVC protocol */ #define IR_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */
#define IR_TYPE_SONY (1 << 5) /* Sony12/15/20 protocol */
#define IR_TYPE_OTHER (1u << 31) #define IR_TYPE_OTHER (1u << 31)
struct ir_scancode { struct ir_scancode {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment