dragonboard: ir support
Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
parent
840cdb0943
commit
f951ac6b19
7 changed files with 55 additions and 13 deletions
|
@ -2405,7 +2405,7 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||||
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
|
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
|
||||||
# CONFIG_MEDIA_RADIO_SUPPORT is not set
|
# CONFIG_MEDIA_RADIO_SUPPORT is not set
|
||||||
# CONFIG_MEDIA_SDR_SUPPORT is not set
|
# CONFIG_MEDIA_SDR_SUPPORT is not set
|
||||||
# CONFIG_MEDIA_RC_SUPPORT is not set
|
CONFIG_MEDIA_RC_SUPPORT=y
|
||||||
# CONFIG_MEDIA_CONTROLLER is not set
|
# CONFIG_MEDIA_CONTROLLER is not set
|
||||||
CONFIG_VIDEO_DEV=y
|
CONFIG_VIDEO_DEV=y
|
||||||
CONFIG_VIDEO_V4L2=y
|
CONFIG_VIDEO_V4L2=y
|
||||||
|
@ -2419,6 +2419,34 @@ CONFIG_VIDEOBUF2_DMA_CONTIG=m
|
||||||
#
|
#
|
||||||
# Media drivers
|
# Media drivers
|
||||||
#
|
#
|
||||||
|
CONFIG_RC_CORE=y
|
||||||
|
CONFIG_RC_MAP=y
|
||||||
|
CONFIG_RC_DECODERS=y
|
||||||
|
# CONFIG_LIRC is not set
|
||||||
|
CONFIG_IR_NEC_DECODER=y
|
||||||
|
CONFIG_IR_RC5_DECODER=y
|
||||||
|
CONFIG_IR_RC6_DECODER=y
|
||||||
|
CONFIG_IR_JVC_DECODER=y
|
||||||
|
CONFIG_IR_SONY_DECODER=y
|
||||||
|
CONFIG_IR_SANYO_DECODER=y
|
||||||
|
CONFIG_IR_SHARP_DECODER=y
|
||||||
|
CONFIG_IR_MCE_KBD_DECODER=y
|
||||||
|
CONFIG_IR_XMP_DECODER=y
|
||||||
|
CONFIG_RC_DEVICES=y
|
||||||
|
# CONFIG_RC_ATI_REMOTE is not set
|
||||||
|
# CONFIG_IR_HIX5HD2 is not set
|
||||||
|
# CONFIG_IR_IMON is not set
|
||||||
|
# CONFIG_IR_MCEUSB is not set
|
||||||
|
# CONFIG_IR_REDRAT3 is not set
|
||||||
|
# CONFIG_IR_STREAMZAP is not set
|
||||||
|
# CONFIG_IR_IGORPLUGUSB is not set
|
||||||
|
# CONFIG_IR_IGUANA is not set
|
||||||
|
# CONFIG_IR_TTUSBIR is not set
|
||||||
|
# CONFIG_RC_LOOPBACK is not set
|
||||||
|
# CONFIG_IR_GPIO_CIR is not set
|
||||||
|
CONFIG_IR_SUNXI=m
|
||||||
|
# CONFIG_SUNXI_KEYMAPPING_SUPPORT is not set
|
||||||
|
# CONFIG_SUNXI_MULTI_IR_SUPPORT is not set
|
||||||
# CONFIG_MEDIA_USB_SUPPORT is not set
|
# CONFIG_MEDIA_USB_SUPPORT is not set
|
||||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||||
# CONFIG_SOC_CAMERA is not set
|
# CONFIG_SOC_CAMERA is not set
|
||||||
|
@ -2437,6 +2465,7 @@ CONFIG_CSI_VFE=m
|
||||||
# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)
|
# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)
|
||||||
#
|
#
|
||||||
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
||||||
|
CONFIG_VIDEO_IR_I2C=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Audio decoders, processors and mixers
|
# Audio decoders, processors and mixers
|
||||||
|
@ -2827,6 +2856,7 @@ CONFIG_HID_PETALYNX=y
|
||||||
CONFIG_HID_PICOLCD=y
|
CONFIG_HID_PICOLCD=y
|
||||||
# CONFIG_HID_PICOLCD_FB is not set
|
# CONFIG_HID_PICOLCD_FB is not set
|
||||||
# CONFIG_HID_PICOLCD_LEDS is not set
|
# CONFIG_HID_PICOLCD_LEDS is not set
|
||||||
|
# CONFIG_HID_PICOLCD_CIR is not set
|
||||||
# CONFIG_HID_PLANTRONICS is not set
|
# CONFIG_HID_PLANTRONICS is not set
|
||||||
CONFIG_HID_PRIMAX=y
|
CONFIG_HID_PRIMAX=y
|
||||||
CONFIG_HID_ROCCAT=y
|
CONFIG_HID_ROCCAT=y
|
||||||
|
|
|
@ -179,7 +179,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||||
scancode = address << 8 |
|
scancode = address << 8 |
|
||||||
not_address << 16 |
|
not_address << 16 |
|
||||||
command;
|
command;
|
||||||
IR_dprintk(1, "NEC scancode 0x%06x\n", scancode);
|
pr_info("NEC scancode 0x%06x\n", scancode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->is_nec_x)
|
if (data->is_nec_x)
|
||||||
|
|
|
@ -721,6 +721,8 @@ void rc_keydown(struct rc_dev *dev, enum rc_type protocol, u32 scancode, u8 togg
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 keycode = rc_g_keycode_from_table(dev, scancode);
|
u32 keycode = rc_g_keycode_from_table(dev, scancode);
|
||||||
|
|
||||||
|
pr_info("rc keycode = %d\n", keycode);
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->keylock, flags);
|
spin_lock_irqsave(&dev->keylock, flags);
|
||||||
ir_do_keydown(dev, protocol, scancode, keycode, toggle);
|
ir_do_keydown(dev, protocol, scancode, keycode, toggle);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,16 @@ static u32 match_addr[MAX_ADDR_NUM];
|
||||||
static u32 match_num;
|
static u32 match_num;
|
||||||
#endif
|
#endif
|
||||||
static struct rc_map_table sunxi_nec_scan[] = {
|
static struct rc_map_table sunxi_nec_scan[] = {
|
||||||
{ KEY_ESC, KEY_ESC },
|
{ 0xc61712, KEY_POWER },
|
||||||
|
{ 0xc61701, KEY_UP },
|
||||||
|
{ 0xc61719, KEY_LEFT },
|
||||||
|
{ 0xc61711, KEY_RIGHT },
|
||||||
|
{ 0xc61709, KEY_DOWN },
|
||||||
|
{ 0xc61740, KEY_ENTER },
|
||||||
|
{ 0xc6170f, KEY_HOME },
|
||||||
|
{ 0xc6170d, KEY_MENU },
|
||||||
|
{ 0xc6171c, KEY_VOLUMEUP },
|
||||||
|
{ 0xc6177f, KEY_VOLUMEDOWN },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SUNXI_KEYMAPPING_SUPPORT
|
#ifdef CONFIG_SUNXI_KEYMAPPING_SUPPORT
|
||||||
|
|
|
@ -431,8 +431,6 @@ static const struct file_operations sunxi_ir_proc_fops = {
|
||||||
static struct proc_dir_entry *ir_protocol_dir;
|
static struct proc_dir_entry *ir_protocol_dir;
|
||||||
static bool sunxi_get_ir_protocol(void)
|
static bool sunxi_get_ir_protocol(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
ir_protocol_dir = proc_create(
|
ir_protocol_dir = proc_create(
|
||||||
(const char *)"sunxi_ir_protocol",
|
(const char *)"sunxi_ir_protocol",
|
||||||
(umode_t)0400, NULL, &sunxi_ir_proc_fops);
|
(umode_t)0400, NULL, &sunxi_ir_proc_fops);
|
||||||
|
@ -540,7 +538,7 @@ static int sunxi_ir_recv_probe(struct platform_device *pdev)
|
||||||
int rc;
|
int rc;
|
||||||
char const ir_dev_name[] = "s_cir_rx";
|
char const ir_dev_name[] = "s_cir_rx";
|
||||||
|
|
||||||
pr_debug("sunxi-ir probe start !\n");
|
pr_info("sunxi-ir probe start !\n");
|
||||||
ir_data = kzalloc(sizeof(*ir_data), GFP_KERNEL);
|
ir_data = kzalloc(sizeof(*ir_data), GFP_KERNEL);
|
||||||
if (IS_ERR_OR_NULL(ir_data)) {
|
if (IS_ERR_OR_NULL(ir_data)) {
|
||||||
pr_err("ir_data: not enough memory for ir data\n");
|
pr_err("ir_data: not enough memory for ir data\n");
|
||||||
|
@ -617,7 +615,7 @@ static int sunxi_ir_recv_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable here */
|
/* enable here */
|
||||||
pr_debug("ir probe end!\n");
|
pr_info("ir probe end!\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,7 @@ ctp_exchange_x_y_flag = 0
|
||||||
|
|
||||||
ctp_int_port = port:PH04<6><default><default><default>
|
ctp_int_port = port:PH04<6><default><default><default>
|
||||||
ctp_wakeup = port:PH08<1><default><default><default>
|
ctp_wakeup = port:PH08<1><default><default><default>
|
||||||
ctp_power_ldo = "vcc-ctp"
|
ctp_power_ldo = ""
|
||||||
ctp_power_ldo_vol = 3300
|
ctp_power_ldo_vol = 3300
|
||||||
ctp_power_io =
|
ctp_power_io =
|
||||||
|
|
||||||
|
@ -1238,9 +1238,12 @@ gpio-spk = port:PD14<1><0><default><0>
|
||||||
;ir --- infra remote configuration
|
;ir --- infra remote configuration
|
||||||
;----------------------------------------------------------------------------------
|
;----------------------------------------------------------------------------------
|
||||||
[s_cir0]
|
[s_cir0]
|
||||||
s_cir0_used = 0
|
s_cir0_used = 1
|
||||||
ir_power_key_code = 0x0
|
supply = "vcc-cir"
|
||||||
ir_addr_code = 0x0
|
supply_vol = 3300000
|
||||||
|
ir_protocol_used = 0
|
||||||
|
ir_power_key_code = 116
|
||||||
|
ir_addr_code = 0x17c612
|
||||||
|
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;compatible ---pmu0 name, support:axp803
|
;compatible ---pmu0 name, support:axp803
|
||||||
|
@ -1463,7 +1466,7 @@ regulator17 = "axp803_eldo2 none vcc-lcd-0"
|
||||||
regulator18 = "axp803_eldo3 none dvdd-csi-18"
|
regulator18 = "axp803_eldo3 none dvdd-csi-18"
|
||||||
regulator19 = "axp803_fldo1 none vcc-hsic-12"
|
regulator19 = "axp803_fldo1 none vcc-hsic-12"
|
||||||
regulator20 = "axp803_fldo2 none vdd-cpus";
|
regulator20 = "axp803_fldo2 none vdd-cpus";
|
||||||
regulator21 = "axp803_gpio0ldo none vcc-ctp"
|
regulator21 = "axp803_gpio0ldo none vcc-cir"
|
||||||
regulator22 = "axp803_gpio1ldo none "
|
regulator22 = "axp803_gpio1ldo none "
|
||||||
regulator23 = "axp803_dc1sw none vcc-pd vcc-gmac-33"
|
regulator23 = "axp803_dc1sw none vcc-pd vcc-gmac-33"
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ module_path = "/system/vendor/modules/sunxi-keyboard.ko"
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
[ir]
|
[ir]
|
||||||
display_name= "红外"
|
display_name= "红外"
|
||||||
activated = 0
|
activated = 1
|
||||||
program = "irtester"
|
program = "irtester"
|
||||||
category = 1
|
category = 1
|
||||||
run_type = 1
|
run_type = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue