aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx88
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-08-07 16:20:58 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 10:02:48 -0400
commit6d741bfed5ed06ed42a16d30f1ed7afdcaf7f092 (patch)
treeba80456506b89d858a91daddde92237b93fabe1c /drivers/media/pci/cx88
parenta9a249a2c997506a64eaee22f1458fda893f62a8 (diff)
media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*
RC_TYPE is confusing and it's just the protocol. So rename it. Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cx88')
-rw-r--r--drivers/media/pci/cx88/cx88-input.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c
index a5dbee776455..e02449bf2041 100644
--- a/drivers/media/pci/cx88/cx88-input.c
+++ b/drivers/media/pci/cx88/cx88-input.c
@@ -132,7 +132,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
132 132
133 data = (data << 4) | ((gpio_key & 0xf0) >> 4); 133 data = (data << 4) | ((gpio_key & 0xf0) >> 4);
134 134
135 rc_keydown(ir->dev, RC_TYPE_UNKNOWN, data, 0); 135 rc_keydown(ir->dev, RC_PROTO_UNKNOWN, data, 0);
136 136
137 } else if (ir->core->boardnr == CX88_BOARD_PROLINK_PLAYTVPVR || 137 } else if (ir->core->boardnr == CX88_BOARD_PROLINK_PLAYTVPVR ||
138 ir->core->boardnr == CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO) { 138 ir->core->boardnr == CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO) {
@@ -146,7 +146,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
146 scancode = RC_SCANCODE_NECX(addr, cmd); 146 scancode = RC_SCANCODE_NECX(addr, cmd);
147 147
148 if (0 == (gpio & ir->mask_keyup)) 148 if (0 == (gpio & ir->mask_keyup))
149 rc_keydown_notimeout(ir->dev, RC_TYPE_NECX, scancode, 149 rc_keydown_notimeout(ir->dev, RC_PROTO_NECX, scancode,
150 0); 150 0);
151 else 151 else
152 rc_keyup(ir->dev); 152 rc_keyup(ir->dev);
@@ -154,20 +154,22 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
154 } else if (ir->mask_keydown) { 154 } else if (ir->mask_keydown) {
155 /* bit set on keydown */ 155 /* bit set on keydown */
156 if (gpio & ir->mask_keydown) 156 if (gpio & ir->mask_keydown)
157 rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); 157 rc_keydown_notimeout(ir->dev, RC_PROTO_UNKNOWN, data,
158 0);
158 else 159 else
159 rc_keyup(ir->dev); 160 rc_keyup(ir->dev);
160 161
161 } else if (ir->mask_keyup) { 162 } else if (ir->mask_keyup) {
162 /* bit cleared on keydown */ 163 /* bit cleared on keydown */
163 if (0 == (gpio & ir->mask_keyup)) 164 if (0 == (gpio & ir->mask_keyup))
164 rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); 165 rc_keydown_notimeout(ir->dev, RC_PROTO_UNKNOWN, data,
166 0);
165 else 167 else
166 rc_keyup(ir->dev); 168 rc_keyup(ir->dev);
167 169
168 } else { 170 } else {
169 /* can't distinguish keydown/up :-/ */ 171 /* can't distinguish keydown/up :-/ */
170 rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); 172 rc_keydown_notimeout(ir->dev, RC_PROTO_UNKNOWN, data, 0);
171 rc_keyup(ir->dev); 173 rc_keyup(ir->dev);
172 } 174 }
173} 175}
@@ -267,7 +269,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
267 struct cx88_IR *ir; 269 struct cx88_IR *ir;
268 struct rc_dev *dev; 270 struct rc_dev *dev;
269 char *ir_codes = NULL; 271 char *ir_codes = NULL;
270 u64 rc_type = RC_BIT_OTHER; 272 u64 rc_proto = RC_PROTO_BIT_OTHER;
271 int err = -ENOMEM; 273 int err = -ENOMEM;
272 u32 hardware_mask = 0; /* For devices with a hardware mask, when 274 u32 hardware_mask = 0; /* For devices with a hardware mask, when
273 * used with a full-code IR table 275 * used with a full-code IR table
@@ -348,7 +350,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
348 * 002-T mini RC, provided with newer PV hardware 350 * 002-T mini RC, provided with newer PV hardware
349 */ 351 */
350 ir_codes = RC_MAP_PIXELVIEW_MK12; 352 ir_codes = RC_MAP_PIXELVIEW_MK12;
351 rc_type = RC_BIT_NECX; 353 rc_proto = RC_PROTO_BIT_NECX;
352 ir->gpio_addr = MO_GP1_IO; 354 ir->gpio_addr = MO_GP1_IO;
353 ir->mask_keyup = 0x80; 355 ir->mask_keyup = 0x80;
354 ir->polling = 10; /* ms */ 356 ir->polling = 10; /* ms */
@@ -487,7 +489,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
487 dev->timeout = 10 * 1000 * 1000; /* 10 ms */ 489 dev->timeout = 10 * 1000 * 1000; /* 10 ms */
488 } else { 490 } else {
489 dev->driver_type = RC_DRIVER_SCANCODE; 491 dev->driver_type = RC_DRIVER_SCANCODE;
490 dev->allowed_protocols = rc_type; 492 dev->allowed_protocols = rc_proto;
491 } 493 }
492 494
493 ir->core = core; 495 ir->core = core;
@@ -557,7 +559,7 @@ void cx88_ir_irq(struct cx88_core *core)
557 ir_raw_event_handle(ir->dev); 559 ir_raw_event_handle(ir->dev);
558} 560}
559 561
560static int get_key_pvr2000(struct IR_i2c *ir, enum rc_type *protocol, 562static int get_key_pvr2000(struct IR_i2c *ir, enum rc_proto *protocol,
561 u32 *scancode, u8 *toggle) 563 u32 *scancode, u8 *toggle)
562{ 564{
563 int flags, code; 565 int flags, code;
@@ -582,7 +584,7 @@ static int get_key_pvr2000(struct IR_i2c *ir, enum rc_type *protocol,
582 dprintk("IR Key/Flags: (0x%02x/0x%02x)\n", 584 dprintk("IR Key/Flags: (0x%02x/0x%02x)\n",
583 code & 0xff, flags & 0xff); 585 code & 0xff, flags & 0xff);
584 586
585 *protocol = RC_TYPE_UNKNOWN; 587 *protocol = RC_PROTO_UNKNOWN;
586 *scancode = code & 0xff; 588 *scancode = code & 0xff;
587 *toggle = 0; 589 *toggle = 0;
588 return 1; 590 return 1;
@@ -612,7 +614,7 @@ void cx88_i2c_init_ir(struct cx88_core *core)
612 case CX88_BOARD_LEADTEK_PVR2000: 614 case CX88_BOARD_LEADTEK_PVR2000:
613 addr_list = pvr2000_addr_list; 615 addr_list = pvr2000_addr_list;
614 core->init_data.name = "cx88 Leadtek PVR 2000 remote"; 616 core->init_data.name = "cx88 Leadtek PVR 2000 remote";
615 core->init_data.type = RC_BIT_UNKNOWN; 617 core->init_data.type = RC_PROTO_BIT_UNKNOWN;
616 core->init_data.get_key = get_key_pvr2000; 618 core->init_data.get_key = get_key_pvr2000;
617 core->init_data.ir_codes = RC_MAP_EMPTY; 619 core->init_data.ir_codes = RC_MAP_EMPTY;
618 break; 620 break;
@@ -633,8 +635,8 @@ void cx88_i2c_init_ir(struct cx88_core *core)
633 /* Hauppauge XVR */ 635 /* Hauppauge XVR */
634 core->init_data.name = "cx88 Hauppauge XVR remote"; 636 core->init_data.name = "cx88 Hauppauge XVR remote";
635 core->init_data.ir_codes = RC_MAP_HAUPPAUGE; 637 core->init_data.ir_codes = RC_MAP_HAUPPAUGE;
636 core->init_data.type = RC_BIT_RC5 | RC_BIT_RC6_MCE | 638 core->init_data.type = RC_PROTO_BIT_RC5 |
637 RC_BIT_RC6_6A_32; 639 RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_RC6_6A_32;
638 core->init_data.internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR; 640 core->init_data.internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
639 641
640 info.platform_data = &core->init_data; 642 info.platform_data = &core->init_data;