Skip to content

Commit

Permalink
[media] tm6000: Fix IR register names
Browse files Browse the repository at this point in the history
IR registers 0xd9 to 0xdf were badly named, making harder to
check what's the register accessed at the RC code. Fix the
name convention.

No functional changes on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Nov 30, 2011
1 parent 36d36b8 commit 15a295e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions drivers/media/video/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,16 +536,16 @@ static struct reg_init tm6010_init_tab[] = {

{ TM6010_REQ05_R18_IMASK7, 0x00 },

{ TM6010_REQ07_RD8_IR_LEADER1, 0xaa },
{ TM6010_REQ07_RD8_IR_LEADER0, 0x30 },
{ TM6010_REQ07_RD8_IR_PULSE_CNT1, 0x20 },
{ TM6010_REQ07_RD8_IR_PULSE_CNT0, 0xd0 },
{ TM6010_REQ07_RDC_IR_LEADER1, 0xaa },
{ TM6010_REQ07_RDD_IR_LEADER0, 0x30 },
{ TM6010_REQ07_RDE_IR_PULSE_CNT1, 0x20 },
{ TM6010_REQ07_RDF_IR_PULSE_CNT0, 0xd0 },
{ REQ_04_EN_DISABLE_MCU_INT, 0x02, 0x00 },
{ TM6010_REQ07_RD8_IR, 0x2f },

/* set remote wakeup key:any key wakeup */
{ TM6010_REQ07_RE5_REMOTE_WAKEUP, 0xfe },
{ TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0xff },
{ TM6010_REQ07_RDA_IR_WAKEUP_SEL, 0xff },
};

int tm6000_init(struct tm6000_core *dev)
Expand Down
12 changes: 6 additions & 6 deletions drivers/media/video/tm6000/tm6000-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ static int tm6000_ir_config(struct tm6000_IR *ir)
case RC_TYPE_NEC:
/* Setup IR decoder for NEC standard 12MHz system clock */
/* IR_LEADER_CNT = 0.9ms */
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_LEADER1, 0xaa);
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_LEADER0, 0x30);
tm6000_set_reg(dev, TM6010_REQ07_RDC_IR_LEADER1, 0xaa);
tm6000_set_reg(dev, TM6010_REQ07_RDD_IR_LEADER0, 0x30);
/* IR_PULSE_CNT = 0.7ms */
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_PULSE_CNT1, 0x20);
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_PULSE_CNT0, 0xd0);
tm6000_set_reg(dev, TM6010_REQ07_RDE_IR_PULSE_CNT1, 0x20);
tm6000_set_reg(dev, TM6010_REQ07_RDF_IR_PULSE_CNT0, 0xd0);
/* Remote WAKEUP = enable */
tm6000_set_reg(dev, TM6010_REQ07_RE5_REMOTE_WAKEUP, 0xfe);
/* IR_WKUP_SEL = Low byte in decoded IR data */
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0xff);
tm6000_set_reg(dev, TM6010_REQ07_RDA_IR_WAKEUP_SEL, 0xff);
/* IR_WKU_ADD code */
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_WAKEUP_ADD, 0xff);
tm6000_set_reg(dev, TM6010_REQ07_RDB_IR_WAKEUP_ADD, 0xff);
tm6000_flash_led(dev, 0);
msleep(100);
tm6000_flash_led(dev, 1);
Expand Down
14 changes: 7 additions & 7 deletions drivers/media/video/tm6000/tm6000-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,19 @@ enum {
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR 0x07, 0xd8
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_BSIZE 0x07, 0xd9
#define TM6010_REQ07_RD9_IR_BSIZE 0x07, 0xd9
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_WAKEUP_SEL 0x07, 0xda
#define TM6010_REQ07_RDA_IR_WAKEUP_SEL 0x07, 0xda
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_WAKEUP_ADD 0x07, 0xdb
#define TM6010_REQ07_RDB_IR_WAKEUP_ADD 0x07, 0xdb
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_LEADER1 0x07, 0xdc
#define TM6010_REQ07_RDC_IR_LEADER1 0x07, 0xdc
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_LEADER0 0x07, 0xdd
#define TM6010_REQ07_RDD_IR_LEADER0 0x07, 0xdd
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_PULSE_CNT1 0x07, 0xde
#define TM6010_REQ07_RDE_IR_PULSE_CNT1 0x07, 0xde
/* ONLY for TM6010 */
#define TM6010_REQ07_RD8_IR_PULSE_CNT0 0x07, 0xdf
#define TM6010_REQ07_RDF_IR_PULSE_CNT0 0x07, 0xdf
/* ONLY for TM6010 */
#define TM6010_REQ07_RE0_DVIDEO_SOURCE 0x07, 0xe0
/* ONLY for TM6010 */
Expand Down

0 comments on commit 15a295e

Please sign in to comment.