* [PATCH v5 0/3] add videostrong kii pro keymap @ 2020-02-14 8:57 Mohammad Rasim 2020-02-14 8:58 ` [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro Mohammad Rasim ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Mohammad Rasim @ 2020-02-14 8:57 UTC (permalink / raw) To: linux-media, Sean Young, Mauro Carvalho Chehab, Kevin Hilman, linux-amlogic Cc: Mohammad Rasim Videostrong kii pro comes with a NEC remote control, this adds support for this remote and also select it from the device dts Changes since v1: - fix styling issues Changes since v2: - use KEY_VENDOR for mouse key - use KEY_PVR instead of KEY_RECORD - use KEY_APPSELECT for the launcher - use KEY_TV for the tv app key Changes since v3: - add a patch to use the keymap by the device's dts Changes since v4: - add a patch to update the rc bindings Mohammad Rasim (3): media: rc: add keymap for Videostrong KII Pro dt-bindings: media: add new kii pro key map arm64: dts: amlogic: add rc-videostrong-kii-pro keymap .../devicetree/bindings/media/rc.yaml | 1 + .../boot/dts/amlogic/meson-gxbb-kii-pro.dts | 4 + drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 83 +++++++++++++++++++ include/media/rc-map.h | 1 + 5 files changed, 90 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c -- 2.25.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro 2020-02-14 8:57 [PATCH v5 0/3] add videostrong kii pro keymap Mohammad Rasim @ 2020-02-14 8:58 ` Mohammad Rasim 2020-02-19 14:11 ` Neil Armstrong 2020-02-14 8:58 ` [PATCH v5 2/3] dt-bindings: media: add new kii pro key map Mohammad Rasim ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Mohammad Rasim @ 2020-02-14 8:58 UTC (permalink / raw) To: linux-media, Sean Young, Mauro Carvalho Chehab, Kevin Hilman, linux-amlogic Cc: Mohammad Rasim This is an NEC remote control device shipped with the Videostrong KII Pro tv box. Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> --- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 83 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 85 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 63261ef6380a..aaa1bf81d00d 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -119,6 +119,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-videomate-m1f.o \ rc-videomate-s350.o \ rc-videomate-tv-pvr.o \ + rc-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \ diff --git a/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file mode 100644 index 000000000000..74a278ffa3f1 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com> + +#include <media/rc-map.h> +#include <linux/module.h> + +// +// Keytable for the Videostrong KII Pro STB remote control +// + +static struct rc_map_table kii_pro[] = { + { 0x59, KEY_POWER }, + { 0x19, KEY_MUTE }, + { 0x42, KEY_RED }, + { 0x40, KEY_GREEN }, + { 0x00, KEY_YELLOW }, + { 0x03, KEY_BLUE }, + { 0x4a, KEY_BACK }, + { 0x48, KEY_FORWARD }, + { 0x08, KEY_PREVIOUSSONG}, + { 0x0b, KEY_NEXTSONG}, + { 0x46, KEY_PLAYPAUSE }, + { 0x44, KEY_STOP }, + { 0x1f, KEY_FAVORITES}, //KEY_F5? + { 0x04, KEY_PVR}, + { 0x4d, KEY_EPG}, + { 0x02, KEY_INFO}, + { 0x09, KEY_SUBTITLE}, + { 0x01, KEY_AUDIO}, + { 0x0d, KEY_HOMEPAGE}, + { 0x11, KEY_TV}, // DTV ? + { 0x06, KEY_UP}, + { 0x5a, KEY_LEFT}, + { 0x1a, KEY_ENTER}, // KEY_OK ? + { 0x1b, KEY_RIGHT}, + { 0x16, KEY_DOWN}, + { 0x45, KEY_MENU}, + { 0x05, KEY_ESC}, + { 0x13, KEY_VOLUMEUP }, + { 0x17, KEY_VOLUMEDOWN }, + { 0x58, KEY_APPSELECT}, + { 0x12, KEY_VENDOR}, // mouse + { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? + { 0x52, KEY_1}, + { 0x50, KEY_2}, + { 0x10, KEY_3}, + { 0x56, KEY_4}, + { 0x54, KEY_5}, + { 0x14, KEY_6}, + { 0x4e, KEY_7}, + { 0x4c, KEY_8}, + { 0x0c, KEY_9}, + { 0x18, KEY_F7}, + { 0x0f, KEY_0}, + { 0x51, KEY_BACKSPACE}, +}; + +static struct rc_map_list kii_pro_map = { + .map = { + .scan = kii_pro, + .size = ARRAY_SIZE(kii_pro), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_KII_PRO, + } +}; + +static int __init init_rc_map_kii_pro(void) +{ + return rc_map_register(&kii_pro_map); +} + +static void __exit exit_rc_map_kii_pro(void) +{ + rc_map_unregister(&kii_pro_map); +} + +module_init(init_rc_map_kii_pro) +module_exit(exit_rc_map_kii_pro) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mohammad Rasim <mohammad.rasim96@gmail.com>"); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index f99575a0d29c..d22810dcd85c 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -274,6 +274,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" +#define RC_MAP_KII_PRO "rc-videostrong-kii-pro" #define RC_MAP_WETEK_HUB "rc-wetek-hub" #define RC_MAP_WETEK_PLAY2 "rc-wetek-play2" #define RC_MAP_WINFAST "rc-winfast" -- 2.25.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro 2020-02-14 8:58 ` [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro Mohammad Rasim @ 2020-02-19 14:11 ` Neil Armstrong 0 siblings, 0 replies; 8+ messages in thread From: Neil Armstrong @ 2020-02-19 14:11 UTC (permalink / raw) To: Mohammad Rasim, linux-media, Sean Young, Mauro Carvalho Chehab, Kevin Hilman, linux-amlogic On 14/02/2020 09:58, Mohammad Rasim wrote: > This is an NEC remote control device shipped with the Videostrong KII Pro tv box. > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> > --- > drivers/media/rc/keymaps/Makefile | 1 + > .../media/rc/keymaps/rc-videostrong-kii-pro.c | 83 +++++++++++++++++++ > include/media/rc-map.h | 1 + > 3 files changed, 85 insertions(+) > create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c > > diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile > index 63261ef6380a..aaa1bf81d00d 100644 > --- a/drivers/media/rc/keymaps/Makefile > +++ b/drivers/media/rc/keymaps/Makefile > @@ -119,6 +119,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ > rc-videomate-m1f.o \ > rc-videomate-s350.o \ > rc-videomate-tv-pvr.o \ > + rc-videostrong-kii-pro.o \ > rc-wetek-hub.o \ > rc-wetek-play2.o \ > rc-winfast.o \ > diff --git a/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c > new file mode 100644 > index 000000000000..74a278ffa3f1 > --- /dev/null > +++ b/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c > @@ -0,0 +1,83 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +// > +// Copyright (C) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com> > + > +#include <media/rc-map.h> > +#include <linux/module.h> > + > +// > +// Keytable for the Videostrong KII Pro STB remote control > +// > + > +static struct rc_map_table kii_pro[] = { > + { 0x59, KEY_POWER }, > + { 0x19, KEY_MUTE }, > + { 0x42, KEY_RED }, > + { 0x40, KEY_GREEN }, > + { 0x00, KEY_YELLOW }, > + { 0x03, KEY_BLUE }, > + { 0x4a, KEY_BACK }, > + { 0x48, KEY_FORWARD }, > + { 0x08, KEY_PREVIOUSSONG}, > + { 0x0b, KEY_NEXTSONG}, > + { 0x46, KEY_PLAYPAUSE }, > + { 0x44, KEY_STOP }, > + { 0x1f, KEY_FAVORITES}, //KEY_F5? > + { 0x04, KEY_PVR}, > + { 0x4d, KEY_EPG}, > + { 0x02, KEY_INFO}, > + { 0x09, KEY_SUBTITLE}, > + { 0x01, KEY_AUDIO}, > + { 0x0d, KEY_HOMEPAGE}, > + { 0x11, KEY_TV}, // DTV ? > + { 0x06, KEY_UP}, > + { 0x5a, KEY_LEFT}, > + { 0x1a, KEY_ENTER}, // KEY_OK ? > + { 0x1b, KEY_RIGHT}, > + { 0x16, KEY_DOWN}, > + { 0x45, KEY_MENU}, > + { 0x05, KEY_ESC}, > + { 0x13, KEY_VOLUMEUP }, > + { 0x17, KEY_VOLUMEDOWN }, > + { 0x58, KEY_APPSELECT}, > + { 0x12, KEY_VENDOR}, // mouse > + { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? > + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? > + { 0x52, KEY_1}, > + { 0x50, KEY_2}, > + { 0x10, KEY_3}, > + { 0x56, KEY_4}, > + { 0x54, KEY_5}, > + { 0x14, KEY_6}, > + { 0x4e, KEY_7}, > + { 0x4c, KEY_8}, > + { 0x0c, KEY_9}, > + { 0x18, KEY_F7}, > + { 0x0f, KEY_0}, > + { 0x51, KEY_BACKSPACE}, > +}; > + > +static struct rc_map_list kii_pro_map = { > + .map = { > + .scan = kii_pro, > + .size = ARRAY_SIZE(kii_pro), > + .rc_proto = RC_PROTO_NEC, > + .name = RC_MAP_KII_PRO, > + } > +}; > + > +static int __init init_rc_map_kii_pro(void) > +{ > + return rc_map_register(&kii_pro_map); > +} > + > +static void __exit exit_rc_map_kii_pro(void) > +{ > + rc_map_unregister(&kii_pro_map); > +} > + > +module_init(init_rc_map_kii_pro) > +module_exit(exit_rc_map_kii_pro) > + > +MODULE_LICENSE("GPL"); > +MODULE_AUTHOR("Mohammad Rasim <mohammad.rasim96@gmail.com>"); > diff --git a/include/media/rc-map.h b/include/media/rc-map.h > index f99575a0d29c..d22810dcd85c 100644 > --- a/include/media/rc-map.h > +++ b/include/media/rc-map.h > @@ -274,6 +274,7 @@ struct rc_map *rc_map_get(const char *name); > #define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100" > #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" > #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" > +#define RC_MAP_KII_PRO "rc-videostrong-kii-pro" > #define RC_MAP_WETEK_HUB "rc-wetek-hub" > #define RC_MAP_WETEK_PLAY2 "rc-wetek-play2" > #define RC_MAP_WINFAST "rc-winfast" > -- > 2.25.0 > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5 2/3] dt-bindings: media: add new kii pro key map 2020-02-14 8:57 [PATCH v5 0/3] add videostrong kii pro keymap Mohammad Rasim 2020-02-14 8:58 ` [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro Mohammad Rasim @ 2020-02-14 8:58 ` Mohammad Rasim 2020-02-18 21:04 ` Rob Herring 2020-02-14 8:58 ` [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap Mohammad Rasim 2020-02-29 16:40 ` [PATCH v5 0/3] add videostrong kii pro keymap Kevin Hilman 3 siblings, 1 reply; 8+ messages in thread From: Mohammad Rasim @ 2020-02-14 8:58 UTC (permalink / raw) To: linux-media, Sean Young, Mauro Carvalho Chehab, Rob Herring, Kevin Hilman, linux-amlogic, devicetree Cc: Mohammad Rasim Add new entry for rc-videostrong-kii-pro in linux,rc-map-name Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> --- Documentation/devicetree/bindings/media/rc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml index a64ee038d235..b27c9385d490 100644 --- a/Documentation/devicetree/bindings/media/rc.yaml +++ b/Documentation/devicetree/bindings/media/rc.yaml @@ -143,6 +143,7 @@ properties: - rc-videomate-k100 - rc-videomate-s350 - rc-videomate-tv-pvr + - rc-videostrong-kii-pro - rc-wetek-hub - rc-wetek-play2 - rc-winfast -- 2.25.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v5 2/3] dt-bindings: media: add new kii pro key map 2020-02-14 8:58 ` [PATCH v5 2/3] dt-bindings: media: add new kii pro key map Mohammad Rasim @ 2020-02-18 21:04 ` Rob Herring 0 siblings, 0 replies; 8+ messages in thread From: Rob Herring @ 2020-02-18 21:04 UTC (permalink / raw) To: Mohammad Rasim Cc: linux-media, Sean Young, Mauro Carvalho Chehab, Kevin Hilman, linux-amlogic, devicetree, Mohammad Rasim On Fri, 14 Feb 2020 11:58:01 +0300, Mohammad Rasim wrote: > Add new entry for rc-videostrong-kii-pro in linux,rc-map-name > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> > --- > Documentation/devicetree/bindings/media/rc.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap 2020-02-14 8:57 [PATCH v5 0/3] add videostrong kii pro keymap Mohammad Rasim 2020-02-14 8:58 ` [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro Mohammad Rasim 2020-02-14 8:58 ` [PATCH v5 2/3] dt-bindings: media: add new kii pro key map Mohammad Rasim @ 2020-02-14 8:58 ` Mohammad Rasim 2020-02-19 14:11 ` Neil Armstrong 2020-02-29 16:40 ` [PATCH v5 0/3] add videostrong kii pro keymap Kevin Hilman 3 siblings, 1 reply; 8+ messages in thread From: Mohammad Rasim @ 2020-02-14 8:58 UTC (permalink / raw) To: linux-media, Sean Young, Mauro Carvalho Chehab, Rob Herring, Kevin Hilman, linux-amlogic, devicetree Cc: Mohammad Rasim videostrong kii pro comes with a nec rc, add the keymap to the dts Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> --- arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts index 2f1f829450a2..6c9cc45fb417 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts @@ -76,3 +76,7 @@ eth_phy0: ethernet-phy@0 { }; }; }; + +&ir { + linux,rc-map-name = "rc-videostrong-kii-pro"; +}; -- 2.25.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap 2020-02-14 8:58 ` [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap Mohammad Rasim @ 2020-02-19 14:11 ` Neil Armstrong 0 siblings, 0 replies; 8+ messages in thread From: Neil Armstrong @ 2020-02-19 14:11 UTC (permalink / raw) To: Mohammad Rasim, linux-media, Sean Young, Mauro Carvalho Chehab, Rob Herring, Kevin Hilman, linux-amlogic, devicetree On 14/02/2020 09:58, Mohammad Rasim wrote: > videostrong kii pro comes with a nec rc, add the keymap to the dts > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> > --- > arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts > index 2f1f829450a2..6c9cc45fb417 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts > @@ -76,3 +76,7 @@ eth_phy0: ethernet-phy@0 { > }; > }; > }; > + > +&ir { > + linux,rc-map-name = "rc-videostrong-kii-pro"; > +}; > -- > 2.25.0 > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v5 0/3] add videostrong kii pro keymap 2020-02-14 8:57 [PATCH v5 0/3] add videostrong kii pro keymap Mohammad Rasim ` (2 preceding siblings ...) 2020-02-14 8:58 ` [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap Mohammad Rasim @ 2020-02-29 16:40 ` Kevin Hilman 3 siblings, 0 replies; 8+ messages in thread From: Kevin Hilman @ 2020-02-29 16:40 UTC (permalink / raw) To: Mohammad Rasim, linux-media, Sean Young, Mauro Carvalho Chehab, linux-amlogic Cc: Mohammad Rasim Hi Mohammad, Mohammad Rasim <mohammad.rasim96@gmail.com> writes: > Videostrong kii pro comes with a NEC remote control, this adds support > for this remote and also select it from the device dts With the bindings reviewed/ack'd I'll queue the DT patch (PATCH 3/3) via the amlogic tree, but the binding and driver patches need to go via the media subsystem. Thanks for the patches, Kevin > Changes since v1: > - fix styling issues > > Changes since v2: > - use KEY_VENDOR for mouse key > - use KEY_PVR instead of KEY_RECORD > - use KEY_APPSELECT for the launcher > - use KEY_TV for the tv app key > > Changes since v3: > - add a patch to use the keymap by the device's dts > > Changes since v4: > - add a patch to update the rc bindings > > Mohammad Rasim (3): > media: rc: add keymap for Videostrong KII Pro > dt-bindings: media: add new kii pro key map > arm64: dts: amlogic: add rc-videostrong-kii-pro keymap > > .../devicetree/bindings/media/rc.yaml | 1 + > .../boot/dts/amlogic/meson-gxbb-kii-pro.dts | 4 + > drivers/media/rc/keymaps/Makefile | 1 + > .../media/rc/keymaps/rc-videostrong-kii-pro.c | 83 +++++++++++++++++++ > include/media/rc-map.h | 1 + > 5 files changed, 90 insertions(+) > create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c > > -- > 2.25.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-02-29 16:40 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-14 8:57 [PATCH v5 0/3] add videostrong kii pro keymap Mohammad Rasim 2020-02-14 8:58 ` [PATCH v5 1/3] media: rc: add keymap for Videostrong KII Pro Mohammad Rasim 2020-02-19 14:11 ` Neil Armstrong 2020-02-14 8:58 ` [PATCH v5 2/3] dt-bindings: media: add new kii pro key map Mohammad Rasim 2020-02-18 21:04 ` Rob Herring 2020-02-14 8:58 ` [PATCH v5 3/3] arm64: dts: amlogic: add rc-videostrong-kii-pro keymap Mohammad Rasim 2020-02-19 14:11 ` Neil Armstrong 2020-02-29 16:40 ` [PATCH v5 0/3] add videostrong kii pro keymap Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).