[media] Rename all public generic RC functions from ir_ to rc_
Those functions are not InfraRed specific. So, rename them to properly reflect it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
@@ -1146,14 +1146,14 @@ static u32 imon_remote_key_lookup(struct imon_context *ictx, u32 scancode)
|
||||
bool is_release_code = false;
|
||||
|
||||
/* Look for the initial press of a button */
|
||||
keycode = ir_g_keycode_from_table(ictx->rdev, scancode);
|
||||
keycode = rc_g_keycode_from_table(ictx->rdev, scancode);
|
||||
ictx->rc_toggle = 0x0;
|
||||
ictx->rc_scancode = scancode;
|
||||
|
||||
/* Look for the release of a button */
|
||||
if (keycode == KEY_RESERVED) {
|
||||
release = scancode & ~0x4000;
|
||||
keycode = ir_g_keycode_from_table(ictx->rdev, release);
|
||||
keycode = rc_g_keycode_from_table(ictx->rdev, release);
|
||||
if (keycode != KEY_RESERVED)
|
||||
is_release_code = true;
|
||||
}
|
||||
@@ -1182,7 +1182,7 @@ static u32 imon_mce_key_lookup(struct imon_context *ictx, u32 scancode)
|
||||
scancode = scancode | MCE_KEY_MASK | MCE_TOGGLE_BIT;
|
||||
|
||||
ictx->rc_scancode = scancode;
|
||||
keycode = ir_g_keycode_from_table(ictx->rdev, scancode);
|
||||
keycode = rc_g_keycode_from_table(ictx->rdev, scancode);
|
||||
|
||||
/* not used in mce mode, but make sure we know its false */
|
||||
ictx->release_code = false;
|
||||
@@ -1564,9 +1564,9 @@ static void imon_incoming_packet(struct imon_context *ictx,
|
||||
|
||||
if (ktype != IMON_KEY_PANEL) {
|
||||
if (press_type == 0)
|
||||
ir_keyup(ictx->rdev);
|
||||
rc_keyup(ictx->rdev);
|
||||
else {
|
||||
ir_keydown(ictx->rdev, ictx->rc_scancode, ictx->rc_toggle);
|
||||
rc_keydown(ictx->rdev, ictx->rc_scancode, ictx->rc_toggle);
|
||||
spin_lock_irqsave(&ictx->kc_lock, flags);
|
||||
ictx->last_keycode = ictx->kc;
|
||||
spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
|
@@ -139,12 +139,12 @@ again:
|
||||
scancode = (bitrev8((data->bits >> 8) & 0xff) << 8) |
|
||||
(bitrev8((data->bits >> 0) & 0xff) << 0);
|
||||
IR_dprintk(1, "JVC scancode 0x%04x\n", scancode);
|
||||
ir_keydown(dev, scancode, data->toggle);
|
||||
rc_keydown(dev, scancode, data->toggle);
|
||||
data->first = false;
|
||||
data->old_bits = data->bits;
|
||||
} else if (data->bits == data->old_bits) {
|
||||
IR_dprintk(1, "JVC repeat\n");
|
||||
ir_repeat(dev);
|
||||
rc_repeat(dev);
|
||||
} else {
|
||||
IR_dprintk(1, "JVC invalid repeat msg\n");
|
||||
break;
|
||||
|
@@ -88,7 +88,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
|
||||
ir_repeat(dev);
|
||||
rc_repeat(dev);
|
||||
IR_dprintk(1, "Repeat last key\n");
|
||||
data->state = STATE_TRAILER_PULSE;
|
||||
return 0;
|
||||
@@ -114,7 +114,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
geq_margin(ev.duration,
|
||||
NEC_TRAILER_SPACE, NEC_UNIT / 2)) {
|
||||
IR_dprintk(1, "Repeat last key\n");
|
||||
ir_repeat(dev);
|
||||
rc_repeat(dev);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
|
||||
@@ -178,7 +178,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
if (data->is_nec_x)
|
||||
data->necx_repeat = true;
|
||||
|
||||
ir_keydown(dev, scancode, 0);
|
||||
rc_keydown(dev, scancode, 0);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ again:
|
||||
scancode, toggle);
|
||||
}
|
||||
|
||||
ir_keydown(dev, scancode, toggle);
|
||||
rc_keydown(dev, scancode, toggle);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ again:
|
||||
IR_dprintk(1, "RC5-sz scancode 0x%04x (toggle: %u)\n",
|
||||
scancode, toggle);
|
||||
|
||||
ir_keydown(dev, scancode, toggle);
|
||||
rc_keydown(dev, scancode, toggle);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -242,7 +242,7 @@ again:
|
||||
goto out;
|
||||
}
|
||||
|
||||
ir_keydown(dev, scancode, toggle);
|
||||
rc_keydown(dev, scancode, toggle);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -143,7 +143,7 @@ static int ir_sony_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
|
||||
scancode = device << 16 | subdevice << 8 | function;
|
||||
IR_dprintk(1, "Sony(%u) scancode 0x%05x\n", data->count, scancode);
|
||||
ir_keydown(dev, scancode, 0);
|
||||
rc_keydown(dev, scancode, 0);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -481,7 +481,7 @@ out:
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_g_keycode_from_table() - gets the keycode that corresponds to a scancode
|
||||
* rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
* @scancode: the scancode to look for
|
||||
* @return: the corresponding keycode, or KEY_RESERVED
|
||||
@@ -490,7 +490,7 @@ out:
|
||||
* keycode. Normally it should not be used since drivers should have no
|
||||
* interest in keycodes.
|
||||
*/
|
||||
u32 ir_g_keycode_from_table(struct rc_dev *dev, u32 scancode)
|
||||
u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode)
|
||||
{
|
||||
struct ir_scancode_table *rc_tab = &dev->rc_tab;
|
||||
unsigned int keycode;
|
||||
@@ -511,7 +511,7 @@ u32 ir_g_keycode_from_table(struct rc_dev *dev, u32 scancode)
|
||||
|
||||
return keycode;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
|
||||
EXPORT_SYMBOL_GPL(rc_g_keycode_from_table);
|
||||
|
||||
/**
|
||||
* ir_do_keyup() - internal function to signal the release of a keypress
|
||||
@@ -532,13 +532,13 @@ static void ir_do_keyup(struct rc_dev *dev)
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_keyup() - signals the release of a keypress
|
||||
* rc_keyup() - signals the release of a keypress
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
*
|
||||
* This routine is used to signal that a key has been released on the
|
||||
* remote control.
|
||||
*/
|
||||
void ir_keyup(struct rc_dev *dev)
|
||||
void rc_keyup(struct rc_dev *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -546,7 +546,7 @@ void ir_keyup(struct rc_dev *dev)
|
||||
ir_do_keyup(dev);
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_keyup);
|
||||
EXPORT_SYMBOL_GPL(rc_keyup);
|
||||
|
||||
/**
|
||||
* ir_timer_keyup() - generates a keyup event after a timeout
|
||||
@@ -577,14 +577,14 @@ static void ir_timer_keyup(unsigned long cookie)
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_repeat() - signals that a key is still pressed
|
||||
* rc_repeat() - signals that a key is still pressed
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
*
|
||||
* This routine is used by IR decoders when a repeat message which does
|
||||
* not include the necessary bits to reproduce the scancode has been
|
||||
* received.
|
||||
*/
|
||||
void ir_repeat(struct rc_dev *dev)
|
||||
void rc_repeat(struct rc_dev *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -601,7 +601,7 @@ void ir_repeat(struct rc_dev *dev)
|
||||
out:
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_repeat);
|
||||
EXPORT_SYMBOL_GPL(rc_repeat);
|
||||
|
||||
/**
|
||||
* ir_do_keydown() - internal function to process a keypress
|
||||
@@ -643,7 +643,7 @@ static void ir_do_keydown(struct rc_dev *dev, int scancode,
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_keydown() - generates input event for a key press
|
||||
* rc_keydown() - generates input event for a key press
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
* @scancode: the scancode that we're seeking
|
||||
* @toggle: the toggle value (protocol dependent, if the protocol doesn't
|
||||
@@ -652,10 +652,10 @@ static void ir_do_keydown(struct rc_dev *dev, int scancode,
|
||||
* This routine is used to signal that a key has been pressed on the
|
||||
* remote control.
|
||||
*/
|
||||
void ir_keydown(struct rc_dev *dev, int scancode, u8 toggle)
|
||||
void rc_keydown(struct rc_dev *dev, int scancode, u8 toggle)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 keycode = ir_g_keycode_from_table(dev, scancode);
|
||||
u32 keycode = rc_g_keycode_from_table(dev, scancode);
|
||||
|
||||
spin_lock_irqsave(&dev->keylock, flags);
|
||||
ir_do_keydown(dev, scancode, keycode, toggle);
|
||||
@@ -666,10 +666,10 @@ void ir_keydown(struct rc_dev *dev, int scancode, u8 toggle)
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_keydown);
|
||||
EXPORT_SYMBOL_GPL(rc_keydown);
|
||||
|
||||
/**
|
||||
* ir_keydown_notimeout() - generates input event for a key press without
|
||||
* rc_keydown_notimeout() - generates input event for a key press without
|
||||
* an automatic keyup event at a later time
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
* @scancode: the scancode that we're seeking
|
||||
@@ -677,18 +677,18 @@ EXPORT_SYMBOL_GPL(ir_keydown);
|
||||
* support toggle values, this should be set to zero)
|
||||
*
|
||||
* This routine is used to signal that a key has been pressed on the
|
||||
* remote control. The driver must manually call ir_keyup() at a later stage.
|
||||
* remote control. The driver must manually call rc_keyup() at a later stage.
|
||||
*/
|
||||
void ir_keydown_notimeout(struct rc_dev *dev, int scancode, u8 toggle)
|
||||
void rc_keydown_notimeout(struct rc_dev *dev, int scancode, u8 toggle)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 keycode = ir_g_keycode_from_table(dev, scancode);
|
||||
u32 keycode = rc_g_keycode_from_table(dev, scancode);
|
||||
|
||||
spin_lock_irqsave(&dev->keylock, flags);
|
||||
ir_do_keydown(dev, scancode, keycode, toggle);
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_keydown_notimeout);
|
||||
EXPORT_SYMBOL_GPL(rc_keydown_notimeout);
|
||||
|
||||
static int ir_open(struct input_dev *idev)
|
||||
{
|
||||
|
Reference in New Issue
Block a user