diff --git a/arch/arm64/boot/dts/amlogic/mesong12b.dtsi b/arch/arm64/boot/dts/amlogic/mesong12b.dtsi index efa12857c90d..057023b2d577 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12b.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12b.dtsi @@ -917,165 +917,19 @@ }; }; /* end of soc*/ - remote:rc@0xff808040 { + meson-remote { compatible = "amlogic, aml_remote"; dev_name = "meson-remote"; reg = <0x0 0xff808040 0x00 0x44>, /*Multi-format IR controller*/ <0x0 0xff808000 0x00 0x20>; /*Legacy IR controller*/ - status = "okay"; + status = "disabled"; protocol = ; interrupts = <0 196 1>; pinctrl-names = "default"; pinctrl-0 = <&remote_pins>; - map = <&custom_maps>; max_frame_time = <200>; /*set software decoder max frame time*/ }; - custom_maps:custom_maps { - mapnum = <3>; - map0 = <&map_0>; - map1 = <&map_1>; - map2 = <&map_2>; - map_0: map_0{ - mapname = "amlogic-remote-1"; - customcode = <0xfb04>; - release_delay = <80>; - size = <50>; /*keymap size*/ - keymap = ; - }; - map_1: map_1{ - mapname = "amlogic-remote-2"; - customcode = <0xfe01>; - release_delay = <80>; - size = <53>; - keymap = ; - }; - map_2: map_2{ - mapname = "amlogic-remote-3"; - customcode = <0xbd02>; - release_delay = <80>; - size = <17>; - keymap = ; - }; - }; - uart_A: serial@ffd24000 { compatible = "amlogic, meson-uart"; reg = <0x0 0xffd24000 0x0 0x18>; diff --git a/arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi b/arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi index d95fb7983619..4e339e80a677 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi @@ -869,165 +869,19 @@ }; /* end of soc*/ - remote:rc@0xff808040 { + meson-remote { compatible = "amlogic, aml_remote"; dev_name = "meson-remote"; reg = <0x0 0xff808040 0x00 0x44>, /*Multi-format IR controller*/ <0x0 0xff808000 0x00 0x20>; /*Legacy IR controller*/ - status = "okay"; + status = "disabled"; protocol = ; interrupts = <0 196 1>; pinctrl-names = "default"; pinctrl-0 = <&remote_pins>; - map = <&custom_maps>; max_frame_time = <200>; /*set software decoder max frame time*/ }; - custom_maps:custom_maps { - mapnum = <3>; - map0 = <&map_0>; - map1 = <&map_1>; - map2 = <&map_2>; - map_0: map_0{ - mapname = "amlogic-remote-1"; - customcode = <0xfb04>; - release_delay = <80>; - size = <50>; /*keymap size*/ - keymap = ; - }; - map_1: map_1{ - mapname = "amlogic-remote-2"; - customcode = <0xfe01>; - release_delay = <80>; - size = <53>; - keymap = ; - }; - map_2: map_2{ - mapname = "amlogic-remote-3"; - customcode = <0xbd02>; - release_delay = <80>; - size = <17>; - keymap = ; - }; - }; - uart_A: serial@ffd24000 { compatible = "amlogic, meson-uart"; reg = <0x0 0xffd24000 0x0 0x18>; diff --git a/drivers/amlogic/input/remote/remote_cdev.c b/drivers/amlogic/input/remote/remote_cdev.c index ea996e3712f0..6bd8e66f14ad 100644 --- a/drivers/amlogic/input/remote/remote_cdev.c +++ b/drivers/amlogic/input/remote/remote_cdev.c @@ -108,11 +108,15 @@ static long remote_ioctl(struct file *file, unsigned int cmd, spin_lock_irqsave(&chip->slock, flags); ptable = seek_map_tab(chip, ir_map->tab.custom_code); if (ptable) { + dev_info(chip->dev, "remove custom_code 0x%08X from ir map table\n", + ir_map->tab.custom_code); if (ptable == chip->cur_tab) chip->cur_tab = ir_map; list_del(&ptable->list); ir_tab_free(ptable); } + dev_info(chip->dev, "add custom_code 0x%08X to ir map table\n", + ir_map->tab.custom_code); list_add_tail(&ir_map->list, &chip->map_tab_head); spin_unlock_irqrestore(&chip->slock, flags); chip->key_num.update_flag = false; diff --git a/drivers/amlogic/input/remote/remote_meson.c b/drivers/amlogic/input/remote/remote_meson.c index c9b61cf5e89b..f53e1399c95d 100644 --- a/drivers/amlogic/input/remote/remote_meson.c +++ b/drivers/amlogic/input/remote/remote_meson.c @@ -696,9 +696,7 @@ static int ir_get_devtree_pdata(struct platform_device *pdev) /*create map table */ - ret = get_custom_tables(pdev->dev.of_node, chip); - if (ret < 0) - return -1; + get_custom_tables(pdev->dev.of_node, chip); return 0; }