From patchwork Sun May 11 11:16:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Spelvin X-Patchwork-Id: 4150211 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F4469F23C for ; Sun, 11 May 2014 11:17:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1491202DD for ; Sun, 11 May 2014 11:17:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2F0C2016C for ; Sun, 11 May 2014 11:16:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758073AbaEKLQ6 (ORCPT ); Sun, 11 May 2014 07:16:58 -0400 Received: from ns.horizon.com ([71.41.210.147]:23079 "HELO ns.horizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757719AbaEKLQ5 (ORCPT ); Sun, 11 May 2014 07:16:57 -0400 Received: (qmail 14986 invoked by uid 1000); 11 May 2014 07:16:56 -0400 Date: 11 May 2014 07:16:56 -0400 Message-ID: <20140511111656.14985.qmail@ns.horizon.com> From: "George Spelvin" To: james.hogan@imgtec.com, linux-media@vger.kernel.org, linux@horizon.com, m.chehab@samsung.com Subject: [PATCH 08/10] ati_remote: Sort buttons in top-to-bottom order In-Reply-To: <20140511111113.14427.qmail@ns.horizon.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since numerical order corresponds to top-left-to-bottom-right order on the remote, this makes the table easier to read. Signed-off-by: George Spelvin --- drivers/media/rc/keymaps/rc-ati-x10.c | 57 +++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/media/rc/keymaps/rc-ati-x10.c b/drivers/media/rc/keymaps/rc-ati-x10.c index 81506440ed..4e2cbbafe9 100644 --- a/drivers/media/rc/keymaps/rc-ati-x10.c +++ b/drivers/media/rc/keymaps/rc-ati-x10.c @@ -27,6 +27,23 @@ #include static struct rc_map_table ati_x10[] = { + /* keyboard - Above the cursor pad */ + { 0x00, KEY_A }, + { 0x01, KEY_B }, + { 0x02, KEY_POWER }, /* Power */ + + { 0x03, KEY_TV }, /* TV */ + { 0x04, KEY_DVD }, /* DVD */ + { 0x05, KEY_WWW }, /* WEB */ + { 0x06, KEY_BOOKMARKS }, /* "book" */ + { 0x07, KEY_EDIT }, /* "hand" */ + /* Below the cursor pad */ + { 0x09, KEY_VOLUMEDOWN }, /* VOL + */ + { 0x08, KEY_VOLUMEUP }, /* VOL - */ + { 0x0a, KEY_MUTE }, /* MUTE */ + { 0x0b, KEY_CHANNELUP }, /* CH + */ + { 0x0c, KEY_CHANNELDOWN },/* CH - */ + { 0x0d, KEY_1 }, { 0x0e, KEY_2 }, { 0x0f, KEY_3 }, @@ -36,42 +53,36 @@ static struct rc_map_table ati_x10[] = { { 0x13, KEY_7 }, { 0x14, KEY_8 }, { 0x15, KEY_9 }, + { 0x16, KEY_MENU }, /* "menu" */ { 0x17, KEY_0 }, - { 0x00, KEY_A }, - { 0x01, KEY_B }, + { 0x18, KEY_KPENTER }, /* "check" */ + + /* DVD navigation buttons */ { 0x19, KEY_C }, + { 0x1a, KEY_UP }, /* up */ { 0x1b, KEY_D }, - { 0x21, KEY_E }, - { 0x23, KEY_F }, - { 0x18, KEY_KPENTER }, /* "check" */ - { 0x16, KEY_MENU }, /* "menu" */ - { 0x02, KEY_POWER }, /* Power */ - { 0x03, KEY_TV }, /* TV */ - { 0x04, KEY_DVD }, /* DVD */ - { 0x05, KEY_WWW }, /* WEB */ - { 0x06, KEY_BOOKMARKS }, /* "book" */ - { 0x07, KEY_EDIT }, /* "hand" */ { 0x1c, KEY_COFFEE }, /* "timer" */ - { 0x20, KEY_FRONT }, /* "max" */ { 0x1d, KEY_LEFT }, /* left */ + { 0x1e, KEY_OK }, /* "OK" */ { 0x1f, KEY_RIGHT }, /* right */ + { 0x20, KEY_FRONT }, /* "max" */ + + { 0x21, KEY_E }, { 0x22, KEY_DOWN }, /* down */ - { 0x1a, KEY_UP }, /* up */ - { 0x1e, KEY_OK }, /* "OK" */ - { 0x09, KEY_VOLUMEDOWN }, /* VOL + */ - { 0x08, KEY_VOLUMEUP }, /* VOL - */ - { 0x0a, KEY_MUTE }, /* MUTE */ - { 0x0b, KEY_CHANNELUP }, /* CH + */ - { 0x0c, KEY_CHANNELDOWN },/* CH - */ - { 0x27, KEY_RECORD }, /* ( o) red */ - { 0x25, KEY_PLAY }, /* ( >) */ + { 0x23, KEY_F }, + /* Play/stop/pause buttons */ { 0x24, KEY_REWIND }, /* (<<) */ + { 0x25, KEY_PLAY }, /* ( >) */ { 0x26, KEY_FORWARD }, /* (>>) */ + + { 0x27, KEY_RECORD }, /* ( o) red */ { 0x28, KEY_STOP }, /* ([]) */ { 0x29, KEY_PAUSE }, /* ('') */ - { 0x2b, KEY_PREVIOUS }, /* (<-) */ + + /* Extra keys, not on the original ATI remote */ { 0x2a, KEY_NEXT }, /* (>+) */ + { 0x2b, KEY_PREVIOUS }, /* (<-) */ { 0x2d, KEY_INFO }, /* PLAYING */ { 0x2e, KEY_HOME }, /* TOP */ { 0x2f, KEY_END }, /* END */