[PATCH 2/2] rc/keymap: add keymap for MagicBox M16S

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sat Jul 23 13:05:24 PDT 2022


Hi,

first of all: thank you for your patches!

On Sat, Jul 23, 2022 at 5:56 PM Zhang Ning <zhangn1985 at qq.com> wrote:
>
I am not sure if the media subsystem requires it but most subsystem
maintainers want a description here.
See for example commit 7bb53f361c59b ("media: rc: add keymap for Tanix
TX5 max remote") which has been accepted previously.

> Signed-off-by: Zhang Ning <zhangn1985 at qq.com>
> ---
>  .../dts/amlogic/meson-gxm-magicbox-m16s.dts   |  4 ++
This should be part of the .dts patch (patch #1)

>  drivers/media/rc/keymaps/Makefile             |  1 +
>  drivers/media/rc/keymaps/rc-magicbox.c        | 55 +++++++++++++++++++
>  include/media/rc-map.h                        |  1 +
Additionally we need a dt-bindings patch so the new value is
recognized by the .dts validation.
See commit d2fccf94495e57 ("media: dt-bindings: media: add new rc map
name") for an example.
dt-binding patches typically go first in the series.

[...]
> +static struct rc_map_table magicbox[] = {
> +       { 40791, KEY_POWER },
> +       { 40842, KEY_MUTE }, // M
> +
> +       { 40771, KEY_UP },
> +       { 40714, KEY_DOWN },
> +       { 40710, KEY_LEFT },
> +       { 40718, KEY_RIGHT },
> +       { 40706, KEY_OK },
> +
> +       { 40775, KEY_HOME },
> +       { 40783, KEY_BACK },
> +       { 40726, KEY_MENU },
> +
> +       { 40959, KEY_VOLUMEDOWN },
> +       { 40797, KEY_VOLUMEUP },
I checked a few other keymaps and they're using hex values for the key code.
That said, I am not familiar with the keymap code, so let's see what
the media maintainers think.


Best regards,
Martin



More information about the linux-amlogic mailing list