{ REG_REG3, 0x2AF8},
};
+static struct remote_reg_map regs_default_rca[] = {
+ { REG_LDR_ACTIVE, (250 << 16) | (160 << 0)},
+ { REG_LDR_IDLE, 250 << 16 | 160 << 0},
+ { REG_LDR_REPEAT, 250 << 16 | 160 << 0},
+ { REG_BIT_0, 100 << 16 | 48 << 0},
+ { REG_REG0, 7 << 28 | (0xFA0 << 12) | 0x13},
+ { REG_STATUS, (150 << 20) | (110 << 10)},
+ { REG_REG1, 0x9700},
+ { REG_REG2, 0x104 | (1 << 24) | (23 << 11)},
+ { REG_DURATN2, 0x00},
+ { REG_REPEAT_DET, (1 << 31) | (0xFA0 << 16) | (10 << 0)},
+ { REG_REG3, 0x1A00},
+ { REG_DURATN3, 0x00}
+};
+
static int ir_toshiba_get_scancode(struct remote_chip *chip)
{
int code = 0;
return custom_code;
}
+static int ir_rca_get_scancode(struct remote_chip *chip)
+{
+ int code = 0;
+ int decode_status = 0;
+ int status = 0;
+
+ remote_reg_read(chip, MULTI_IR_ID, REG_STATUS, &decode_status);
+ decode_status &= 0xf;
+ if (decode_status & 0x01)
+ status |= REMOTE_REPEAT;
+
+ chip->decode_status = status;
+ remote_reg_read(chip, MULTI_IR_ID, REG_FRAME, &code);
+ remote_dbg(chip->dev, "framecode=0x%x\n", code);
+ chip->r_dev->cur_hardcode = code;
+ code = (code >> 12) & 0xff;
+ return code;
+}
+
+static int ir_rca_get_decode_status(struct remote_chip *chip)
+{
+ int status = chip->decode_status;
+
+ return status;
+}
+
+static u32 ir_rca_get_custom_code(struct remote_chip *chip)
+{
+ u32 custom_code;
+
+ custom_code = (chip->r_dev->cur_hardcode >> 20) & 0x0f;
+ remote_dbg(chip->dev, "custom code=0x%x\n", custom_code);
+ return custom_code;
+}
+
/*legacy IR controller support protocols*/
static struct aml_remote_reg_proto reg_legacy_nec = {
.protocol = REMOTE_TYPE_LEGACY_NEC,
.get_custom_code = ir_toshiba_get_custom_code,
};
+static struct aml_remote_reg_proto reg_rca = {
+ .protocol = REMOTE_TYPE_RCA,
+ .name = "rca",
+ .reg_map = regs_default_rca,
+ .reg_map_size = ARRAY_SIZE(regs_default_rca),
+ .get_scancode = ir_rca_get_scancode,
+ .get_decode_status = ir_rca_get_decode_status,
+ .get_custom_code = ir_rca_get_custom_code,
+};
+
const struct aml_remote_reg_proto *remote_reg_proto[] = {
®_nec,
®_duokan,
®_rc6,
®_legacy_nec,
®_toshiba,
+ ®_rca,
NULL
};