Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96450C433E0 for ; Mon, 1 Mar 2021 10:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E21D64E42 for ; Mon, 1 Mar 2021 10:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234783AbhCAKvR (ORCPT ); Mon, 1 Mar 2021 05:51:17 -0500 Received: from gofer.mess.org ([88.97.38.141]:57073 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234773AbhCAKvE (ORCPT ); Mon, 1 Mar 2021 05:51:04 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id EE0D1C6367; Mon, 1 Mar 2021 10:50:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mess.org; s=2020; t=1614595823; bh=iPX3NpxSAj+vqDgrKb/k4/evTsL0m8Jh8IE+W70bg2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sEuJCnaigVbIHBULxAVbMw0QJGjaWV1zi/oVtA/5lziRwbLCk+XcoeCo2IbRvjcdh 4M1X5ElJLBHSkFFDxPcLjIDKLxRUUzgEkC/OqExDbAP0OIWxg4taSCPYwHsQBungPg WgjCBkAM6LpRMX9q0PXoJ+iuAF7DK35w94An7Ghij/kae9/+Ofi7ymgxge/vypZp70 YeszaNNPBIEWPkKzY6a5A/85VMPLKUL9oKkyZoegfmtwoEcdyDOHOBNqbkgOoybogB /QIBGr2LOhaYN3AcrlDTBYGMU6JOaKCTzekP/OKm3gF1kukwjb3v15RhWRQhNrIZKV PNDGHlhMEik3A== Date: Mon, 1 Mar 2021 10:50:22 +0000 From: Sean Young To: Bastien Nocera Cc: linux-media@vger.kernel.org Subject: Re: [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote Message-ID: <20210301105022.GA26026@gofer.mess.org> References: <20210126174034.1349785-1-hadess@hadess.net> <20210126174034.1349785-2-hadess@hadess.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126174034.1349785-2-hadess@hadess.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Bastien, Sorry for not getting back to you sooner, I somehow missed this. On Tue, Jan 26, 2021 at 06:40:34PM +0100, Bastien Nocera wrote: > Apparently used in the Dell Inspiron Zino HD 410 desktop: > http://web.archive.org/web/20180805000711/http://www.dell.com/ba/p/desktops/inspiron-zino-hd-410/pd > > Captured using a raw IR receiver. Manual linked in the remote definition > itself. > > Signed-off-by: Bastien Nocera > --- > drivers/media/rc/keymaps/Makefile | 1 + > drivers/media/rc/keymaps/rc-dell-rc260.c | 79 ++++++++++++++++++++++++ > include/media/rc-map.h | 1 + > 3 files changed, 81 insertions(+) > create mode 100644 drivers/media/rc/keymaps/rc-dell-rc260.c > > diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile > index 37ce3cbf0c0c..84eca88ffb55 100644 > --- a/drivers/media/rc/keymaps/Makefile > +++ b/drivers/media/rc/keymaps/Makefile > @@ -25,6 +25,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ > rc-cinergy-1400.o \ > rc-cinergy.o \ > rc-d680-dmb.o \ > + rc-dell-rc260.o \ > rc-delock-61959.o \ > rc-dib0700-nec.o \ > rc-dib0700-rc5.o \ > diff --git a/drivers/media/rc/keymaps/rc-dell-rc260.c b/drivers/media/rc/keymaps/rc-dell-rc260.c > new file mode 100644 > index 000000000000..2ca69daca990 > --- /dev/null > +++ b/drivers/media/rc/keymaps/rc-dell-rc260.c > @@ -0,0 +1,79 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +// Keytable for Dell RC 260 remote > +// Copyright (c) 2021 Bastien Nocera > + > +#include > +#include > + > +/* Manual available at: > + * https://archive.org/details/manualsonline-id-b1c9aa7c-e060-40b0-816a-918536a02fac/ > + */ > +static struct rc_map_table dell_rc260[] = { > + {KEY_HOMEPAGE, 0x803404a9}, > + {KEY_POWER, 0x8034040c}, > + {KEY_RECORD, 0x80340437}, > + {KEY_PAUSE, 0x80340430}, > + {KEY_STOP, 0x80340431}, > + {KEY_REWIND, 0x80340429}, > + {KEY_PLAY, 0x8034042c}, > + {KEY_FASTFORWARD, 0x80340428}, > + {KEY_PREVIOUS, 0x80340421}, > + {KEY_NEXT, 0x80340420}, > + {KEY_BACK, 0x80340483}, > + {KEY_INFO, 0x803404cb}, > + {KEY_LEFTMETA, 0x8034045d}, > + {KEY_UP, 0x80340458}, > + {KEY_LEFT, 0x8034045a}, > + {KEY_RIGHT, 0x8034045b}, > + {KEY_DOWN, 0x80340459}, > + {KEY_OK, 0x8034045c}, > + {KEY_VOLUMEUP, 0x80340410}, > + {KEY_VOLUMEDOWN, 0x80340411}, > + {KEY_CHANNELUP, 0x8034041e}, > + {KEY_CHANNELDOWN, 0x8034041f}, > + {KEY_MUTE, 0x8034040d}, > + {KEY_NUMERIC_1, 0x80340401}, > + {KEY_NUMERIC_2, 0x80340402}, > + {KEY_NUMERIC_3, 0x80340403}, > + {KEY_NUMERIC_4, 0x80340404}, > + {KEY_NUMERIC_5, 0x80340405}, > + {KEY_NUMERIC_6, 0x80340406}, > + {KEY_NUMERIC_7, 0x80340407}, > + {KEY_NUMERIC_8, 0x80340408}, > + {KEY_NUMERIC_9, 0x80340409}, > + {KEY_NUMERIC_0, 0x80340400}, > + {KEY_NUMERIC_STAR, 0x80340433}, > + {KEY_NUMERIC_POUND, 0x80340432}, > + {KEY_CLEAR, 0x8034043a}, > + /* Teletext key doesn't light the IR LED */ > + {KEY_EPG, 0x8034043e}, > + {KEY_ENTER, 0x80340434}, > + {KEY_RED, 0x8034046d}, > + {KEY_GREEN, 0x8034046e}, > + {KEY_YELLOW, 0x8034046f}, > + {KEY_BLUE, 0x80340470} > +}; > + > +static struct rc_map_list dell_rc260_map = { > + .map = { > + .scan = dell_rc260, > + .size = ARRAY_SIZE(dell_rc260), > + .rc_proto = RC_PROTO_RC6_6A_24, That's a 24 bit protocol but the scancodes are 32 bit. Looks like this should be RC_PROTO_RC6_6A_32? Thanks Sean > + .name = RC_MAP_DELL_RC260, > + } > +}; > + > +static int __init init_rc_map(void) > +{ > + return rc_map_register(&dell_rc260_map); > +} > + > +static void __exit exit_rc_map(void) > +{ > + rc_map_unregister(&dell_rc260_map); > +} > + > +module_init(init_rc_map) > +module_exit(exit_rc_map) > + > +MODULE_LICENSE("GPL"); > diff --git a/include/media/rc-map.h b/include/media/rc-map.h > index 9b7608e58b52..7385903be3cc 100644 > --- a/include/media/rc-map.h > +++ b/include/media/rc-map.h > @@ -225,6 +225,7 @@ struct rc_map *rc_map_get(const char *name); > #define RC_MAP_CINERGY "rc-cinergy" > #define RC_MAP_CINERGY_1400 "rc-cinergy-1400" > #define RC_MAP_D680_DMB "rc-d680-dmb" > +#define RC_MAP_DELL_RC260 "rc-dell-rc260" > #define RC_MAP_DELOCK_61959 "rc-delock-61959" > #define RC_MAP_DIB0700_NEC_TABLE "rc-dib0700-nec" > #define RC_MAP_DIB0700_RC5_TABLE "rc-dib0700-rc5" > -- > 2.29.2