Commit Graph

9 Commits

Author SHA1 Message Date
Bastien Nocera 1910ea428f media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes
Prefer KEY_NUMERIC_* for number buttons on remotes. Now all the remotes
use KEY_NUMERIC_[0-9] for the number buttons rather than keys that
could be affected by modifiers (Caps-Lock, or Num-Lock) or regional
keymaps.

Created using:
sed -i  's/KEY_\([0-9]\) /KEY_NUMERIC_\1 /' *.c
sed -i  's/KEY_\([0-9]\)}/KEY_NUMERIC_\1}/' *.c
sed -i  's/``KEY_\([0-9]\)/``KEY_NUMERIC_\1/' Documentation/media/uapi/rc/rc-tables.rst

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-27 07:30:28 -04:00
Thomas Gleixner 1621633323 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  51 franklin street fifth floor boston ma 02110 1301 usa

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option [no]_[pad]_[ctrl] any later version this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 51 franklin street fifth floor boston ma
  02110 1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 176 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 11:28:39 +02:00
Sean Young 6d741bfed5 media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*
RC_TYPE is confusing and it's just the protocol. So rename it.

Suggested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sean Young <sean@mess.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20 10:02:48 -04:00
George Spelvin 356237d67a [media] ati_remote: Better default keycodes
This tries to make them more like other remotes, and/or
the button labels.

Notably, the (>>) button is made KEY_FASTFORWARD, which is the
correct opposite of (<<)'s KEY_REVERSE.  (It was KEY_FORWARD,
something else entirely.)

Likewise, KEY_STOP is the Sun keyboard "interrupt program" key;
the media key is KEY_STOPCD.

A restriction is that I try to avoid keycodes above 255, as the X11
client/server protocol is limited to 8-bit key codes.  If not for
this, I would have used the KEY_NUMERIC_x codes for the numbers.

Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 23:59:06 -03:00
George Spelvin 220edfb0f7 [media] ati_remote: Add comments to keycode table
A more detailed description of what the buttons look like and
their intended function makes it easier for people to maintain
this code without access to the hardware.

[m.chehab@samsung.com: Fixed a typo "Mdeia" instead of "Media"]
Signed-off-by: George Spelvin <linux@horizon.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 23:54:32 -03:00
George Spelvin d701c8318b [media] ati_remote: Sort buttons in top-to-bottom order
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 <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 23:52:59 -03:00
Anssi Hannula 5eefb4f09b [media] ati_remote: switch to single-byte scancodes
The ati_remote driver currently uses 2-byte scancodes. However, one of
those bytes is actually a checksum and therefore shouldn't be considered
as part of the scancode.

Fix the driver to only use the actual data byte as a scancode and to
check the checksum itself. Update the bundled keymaps accordingly.

Since ati_remote was only migrated to the rc subsystem for 3.2, the
previous scancodes weren't emitted on any stable kernel.

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 10:51:59 -02:00
Mauro Carvalho Chehab 547d42eac1 [media] rc tables: include linux/module.h
Prevents errors when merging with -next:

drivers/media/rc/keymaps/rc-snapstream-firefly.c:105:16: error: expected declaration specifiers or ‘...’ before string constant
drivers/media/rc/keymaps/rc-snapstream-firefly.c:106:15: error: expected declaration specifiers or ‘...’ before string constant

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 15:33:27 -03:00
Anssi Hannula c34516e599 [media] ati_remote: migrate to the rc subsystem
The keycode mangling algorithm is kept the same, so the new external
keymap has the same values as the old static table.

[mchehab@redhat.com: Fix some bad whitespacing]
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:51:31 -03:00