License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2005-06-24 13:02:35 +08:00
|
|
|
/* dvb-usb-remote.c is part of the DVB USB library.
|
|
|
|
*
|
2016-01-24 22:56:58 +08:00
|
|
|
* Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
|
2005-06-24 13:02:35 +08:00
|
|
|
* see dvb-usb-init.c for copyright information.
|
|
|
|
*
|
2007-05-09 14:57:56 +08:00
|
|
|
* This file contains functions for initializing the input-device and for handling remote-control-queries.
|
2005-06-24 13:02:35 +08:00
|
|
|
*/
|
|
|
|
#include "dvb-usb-common.h"
|
2006-08-28 10:01:24 +08:00
|
|
|
#include <linux/usb/input.h>
|
2005-06-24 13:02:35 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
static unsigned int
|
|
|
|
legacy_dvb_usb_get_keymap_index(const struct input_keymap_entry *ke,
|
|
|
|
struct rc_map_table *keymap,
|
|
|
|
unsigned int keymap_size)
|
|
|
|
{
|
|
|
|
unsigned int index;
|
|
|
|
unsigned int scancode;
|
|
|
|
|
|
|
|
if (ke->flags & INPUT_KEYMAP_BY_INDEX) {
|
|
|
|
index = ke->index;
|
|
|
|
} else {
|
|
|
|
if (input_scancode_to_scalar(ke, &scancode))
|
|
|
|
return keymap_size;
|
|
|
|
|
|
|
|
/* See if we can match the raw key code. */
|
|
|
|
for (index = 0; index < keymap_size; index++)
|
|
|
|
if (keymap[index].scancode == scancode)
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* See if there is an unused hole in the map */
|
|
|
|
if (index >= keymap_size) {
|
|
|
|
for (index = 0; index < keymap_size; index++) {
|
|
|
|
if (keymap[index].keycode == KEY_RESERVED ||
|
|
|
|
keymap[index].keycode == KEY_UNKNOWN) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return index;
|
|
|
|
}
|
|
|
|
|
2010-08-01 06:07:55 +08:00
|
|
|
static int legacy_dvb_usb_getkeycode(struct input_dev *dev,
|
2011-02-01 13:06:39 +08:00
|
|
|
struct input_keymap_entry *ke)
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
{
|
|
|
|
struct dvb_usb_device *d = input_get_drvdata(dev);
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
|
2011-02-01 13:06:39 +08:00
|
|
|
unsigned int keymap_size = d->props.rc.legacy.rc_map_size;
|
|
|
|
unsigned int index;
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
index = legacy_dvb_usb_get_keymap_index(ke, keymap, keymap_size);
|
|
|
|
if (index >= keymap_size)
|
|
|
|
return -EINVAL;
|
2009-08-30 09:03:47 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
ke->keycode = keymap[index].keycode;
|
|
|
|
if (ke->keycode == KEY_UNKNOWN)
|
|
|
|
ke->keycode = KEY_RESERVED;
|
|
|
|
ke->len = sizeof(keymap[index].scancode);
|
|
|
|
memcpy(&ke->scancode, &keymap[index].scancode, ke->len);
|
|
|
|
ke->index = index;
|
2009-08-30 09:03:47 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
return 0;
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
}
|
|
|
|
|
2010-08-01 06:07:55 +08:00
|
|
|
static int legacy_dvb_usb_setkeycode(struct input_dev *dev,
|
2011-02-01 13:06:39 +08:00
|
|
|
const struct input_keymap_entry *ke,
|
|
|
|
unsigned int *old_keycode)
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
{
|
|
|
|
struct dvb_usb_device *d = input_get_drvdata(dev);
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
|
2011-02-01 13:06:39 +08:00
|
|
|
unsigned int keymap_size = d->props.rc.legacy.rc_map_size;
|
|
|
|
unsigned int index;
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
index = legacy_dvb_usb_get_keymap_index(ke, keymap, keymap_size);
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
/*
|
|
|
|
* FIXME: Currently, it is not possible to increase the size of
|
|
|
|
* scancode table. For it to happen, one possibility
|
|
|
|
* would be to allocate a table with key_map_size + 1,
|
|
|
|
* copying data, appending the new key on it, and freeing
|
|
|
|
* the old one - or maybe just allocating some spare space
|
|
|
|
*/
|
2011-02-01 13:06:39 +08:00
|
|
|
if (index >= keymap_size)
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
*old_keycode = keymap[index].keycode;
|
|
|
|
keymap->keycode = ke->keycode;
|
|
|
|
__set_bit(ke->keycode, dev->keybit);
|
|
|
|
|
|
|
|
if (*old_keycode != KEY_RESERVED) {
|
|
|
|
__clear_bit(*old_keycode, dev->keybit);
|
|
|
|
for (index = 0; index < keymap_size; index++) {
|
|
|
|
if (keymap[index].keycode == *old_keycode) {
|
|
|
|
__set_bit(*old_keycode, dev->keybit);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
return 0;
|
V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-30 02:27:29 +08:00
|
|
|
}
|
|
|
|
|
2005-06-24 13:02:35 +08:00
|
|
|
/* Remote-control poll function - called every dib->rc_query_interval ms to see
|
|
|
|
* whether the remote control has received anything.
|
|
|
|
*
|
|
|
|
* TODO: Fix the repeat rate of the input device.
|
|
|
|
*/
|
2010-08-01 06:07:55 +08:00
|
|
|
static void legacy_dvb_usb_read_remote_control(struct work_struct *work)
|
2005-06-24 13:02:35 +08:00
|
|
|
{
|
2006-11-22 22:57:56 +08:00
|
|
|
struct dvb_usb_device *d =
|
|
|
|
container_of(work, struct dvb_usb_device, rc_query_work.work);
|
2005-06-24 13:02:35 +08:00
|
|
|
u32 event;
|
|
|
|
int state;
|
|
|
|
|
|
|
|
/* TODO: need a lock here. We can simply skip checking for the remote control
|
|
|
|
if we're busy. */
|
|
|
|
|
2005-07-08 08:58:11 +08:00
|
|
|
/* when the parameter has been set to 1 via sysfs while the driver was running */
|
|
|
|
if (dvb_usb_disable_rc_polling)
|
|
|
|
return;
|
|
|
|
|
2010-08-01 05:04:09 +08:00
|
|
|
if (d->props.rc.legacy.rc_query(d,&event,&state)) {
|
2005-06-24 13:02:35 +08:00
|
|
|
err("error while querying for an remote control event.");
|
|
|
|
goto schedule;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch (state) {
|
|
|
|
case REMOTE_NO_KEY_PRESSED:
|
|
|
|
break;
|
|
|
|
case REMOTE_KEY_PRESSED:
|
|
|
|
deb_rc("key pressed\n");
|
|
|
|
d->last_event = event;
|
2017-05-18 20:15:52 +08:00
|
|
|
input_event(d->input_dev, EV_KEY, event, 1);
|
|
|
|
input_sync(d->input_dev);
|
|
|
|
input_event(d->input_dev, EV_KEY, d->last_event, 0);
|
|
|
|
input_sync(d->input_dev);
|
|
|
|
break;
|
2005-06-24 13:02:35 +08:00
|
|
|
case REMOTE_KEY_REPEAT:
|
|
|
|
deb_rc("key repeated\n");
|
2010-10-30 03:08:23 +08:00
|
|
|
input_event(d->input_dev, EV_KEY, event, 1);
|
|
|
|
input_sync(d->input_dev);
|
|
|
|
input_event(d->input_dev, EV_KEY, d->last_event, 0);
|
|
|
|
input_sync(d->input_dev);
|
2005-06-24 13:02:35 +08:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* improved repeat handling ???
|
|
|
|
switch (state) {
|
|
|
|
case REMOTE_NO_KEY_PRESSED:
|
|
|
|
deb_rc("NO KEY PRESSED\n");
|
|
|
|
if (d->last_state != REMOTE_NO_KEY_PRESSED) {
|
|
|
|
deb_rc("releasing event %d\n",d->last_event);
|
2005-09-15 15:01:53 +08:00
|
|
|
input_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
|
|
|
|
input_sync(d->rc_input_dev);
|
2005-06-24 13:02:35 +08:00
|
|
|
}
|
|
|
|
d->last_state = REMOTE_NO_KEY_PRESSED;
|
|
|
|
d->last_event = 0;
|
|
|
|
break;
|
|
|
|
case REMOTE_KEY_PRESSED:
|
|
|
|
deb_rc("KEY PRESSED\n");
|
|
|
|
deb_rc("pressing event %d\n",event);
|
|
|
|
|
2005-09-15 15:01:53 +08:00
|
|
|
input_event(d->rc_input_dev, EV_KEY, event, 1);
|
|
|
|
input_sync(d->rc_input_dev);
|
2005-06-24 13:02:35 +08:00
|
|
|
|
|
|
|
d->last_event = event;
|
|
|
|
d->last_state = REMOTE_KEY_PRESSED;
|
|
|
|
break;
|
|
|
|
case REMOTE_KEY_REPEAT:
|
|
|
|
deb_rc("KEY_REPEAT\n");
|
|
|
|
if (d->last_state != REMOTE_NO_KEY_PRESSED) {
|
|
|
|
deb_rc("repeating event %d\n",d->last_event);
|
2005-09-15 15:01:53 +08:00
|
|
|
input_event(d->rc_input_dev, EV_KEY, d->last_event, 2);
|
|
|
|
input_sync(d->rc_input_dev);
|
2005-06-24 13:02:35 +08:00
|
|
|
d->last_state = REMOTE_KEY_REPEAT;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
schedule:
|
2010-08-01 05:04:09 +08:00
|
|
|
schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc.legacy.rc_interval));
|
2005-06-24 13:02:35 +08:00
|
|
|
}
|
|
|
|
|
2010-10-30 03:08:23 +08:00
|
|
|
static int legacy_dvb_usb_remote_init(struct dvb_usb_device *d)
|
2010-08-01 06:07:55 +08:00
|
|
|
{
|
|
|
|
int i, err, rc_interval;
|
2010-10-30 03:08:23 +08:00
|
|
|
struct input_dev *input_dev;
|
|
|
|
|
|
|
|
input_dev = input_allocate_device();
|
|
|
|
if (!input_dev)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
input_dev->evbit[0] = BIT_MASK(EV_KEY);
|
|
|
|
input_dev->name = "IR-receiver inside an USB DVB receiver";
|
|
|
|
input_dev->phys = d->rc_phys;
|
|
|
|
usb_to_input_id(d->udev, &input_dev->id);
|
|
|
|
input_dev->dev.parent = &d->udev->dev;
|
|
|
|
d->input_dev = input_dev;
|
|
|
|
d->rc_dev = NULL;
|
2010-08-01 06:07:55 +08:00
|
|
|
|
2011-02-01 13:06:39 +08:00
|
|
|
input_dev->getkeycode = legacy_dvb_usb_getkeycode;
|
|
|
|
input_dev->setkeycode = legacy_dvb_usb_setkeycode;
|
2010-08-01 06:07:55 +08:00
|
|
|
|
|
|
|
/* set the bits for the keys */
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
deb_rc("key map size: %d\n", d->props.rc.legacy.rc_map_size);
|
|
|
|
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
|
2010-08-01 06:07:55 +08:00
|
|
|
deb_rc("setting bit for event %d item %d\n",
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
d->props.rc.legacy.rc_map_table[i].keycode, i);
|
|
|
|
set_bit(d->props.rc.legacy.rc_map_table[i].keycode, input_dev->keybit);
|
2010-08-01 06:07:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* setting these two values to non-zero, we have to manage key repeats */
|
|
|
|
input_dev->rep[REP_PERIOD] = d->props.rc.legacy.rc_interval;
|
|
|
|
input_dev->rep[REP_DELAY] = d->props.rc.legacy.rc_interval + 150;
|
|
|
|
|
|
|
|
input_set_drvdata(input_dev, d);
|
|
|
|
|
|
|
|
err = input_register_device(input_dev);
|
|
|
|
if (err)
|
|
|
|
input_free_device(input_dev);
|
|
|
|
|
|
|
|
rc_interval = d->props.rc.legacy.rc_interval;
|
|
|
|
|
|
|
|
INIT_DELAYED_WORK(&d->rc_query_work, legacy_dvb_usb_read_remote_control);
|
|
|
|
|
|
|
|
info("schedule remote query interval to %d msecs.", rc_interval);
|
|
|
|
schedule_delayed_work(&d->rc_query_work,
|
|
|
|
msecs_to_jiffies(rc_interval));
|
|
|
|
|
|
|
|
d->state |= DVB_USB_STATE_REMOTE;
|
|
|
|
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Remote-control poll function - called every dib->rc_query_interval ms to see
|
|
|
|
* whether the remote control has received anything.
|
|
|
|
*
|
|
|
|
* TODO: Fix the repeat rate of the input device.
|
|
|
|
*/
|
|
|
|
static void dvb_usb_read_remote_control(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct dvb_usb_device *d =
|
|
|
|
container_of(work, struct dvb_usb_device, rc_query_work.work);
|
|
|
|
int err;
|
|
|
|
|
|
|
|
/* TODO: need a lock here. We can simply skip checking for the remote control
|
|
|
|
if we're busy. */
|
|
|
|
|
|
|
|
/* when the parameter has been set to 1 via sysfs while the
|
|
|
|
* driver was running, or when bulk mode is enabled after IR init
|
|
|
|
*/
|
|
|
|
if (dvb_usb_disable_rc_polling || d->props.rc.core.bulk_mode)
|
|
|
|
return;
|
|
|
|
|
|
|
|
err = d->props.rc.core.rc_query(d);
|
|
|
|
if (err)
|
|
|
|
err("error %d while querying for an remote control event.", err);
|
|
|
|
|
|
|
|
schedule_delayed_work(&d->rc_query_work,
|
|
|
|
msecs_to_jiffies(d->props.rc.core.rc_interval));
|
|
|
|
}
|
|
|
|
|
2010-10-30 03:08:23 +08:00
|
|
|
static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
|
2010-08-01 06:07:55 +08:00
|
|
|
{
|
|
|
|
int err, rc_interval;
|
2010-10-30 03:08:23 +08:00
|
|
|
struct rc_dev *dev;
|
|
|
|
|
2016-12-16 16:50:58 +08:00
|
|
|
dev = rc_allocate_device(d->props.rc.core.driver_type);
|
2010-10-30 03:08:23 +08:00
|
|
|
if (!dev)
|
|
|
|
return -ENOMEM;
|
2010-08-01 06:07:55 +08:00
|
|
|
|
2010-10-30 03:08:23 +08:00
|
|
|
dev->driver_name = d->props.rc.core.module_name;
|
|
|
|
dev->map_name = d->props.rc.core.rc_codes;
|
|
|
|
dev->change_protocol = d->props.rc.core.change_protocol;
|
2014-04-04 07:32:21 +08:00
|
|
|
dev->allowed_protocols = d->props.rc.core.allowed_protos;
|
2010-10-30 03:08:23 +08:00
|
|
|
usb_to_input_id(d->udev, &dev->input_id);
|
2017-09-01 21:10:01 +08:00
|
|
|
dev->device_name = d->desc->name;
|
2010-10-30 03:08:23 +08:00
|
|
|
dev->input_phys = d->rc_phys;
|
|
|
|
dev->dev.parent = &d->udev->dev;
|
|
|
|
dev->priv = d;
|
2017-09-06 19:19:06 +08:00
|
|
|
dev->scancode_mask = d->props.rc.core.scancode_mask;
|
2010-10-30 03:08:23 +08:00
|
|
|
|
|
|
|
err = rc_register_device(dev);
|
|
|
|
if (err < 0) {
|
|
|
|
rc_free_device(dev);
|
2010-08-01 06:07:55 +08:00
|
|
|
return err;
|
2010-10-30 03:08:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
d->input_dev = NULL;
|
|
|
|
d->rc_dev = dev;
|
2010-08-01 06:07:55 +08:00
|
|
|
|
|
|
|
if (!d->props.rc.core.rc_query || d->props.rc.core.bulk_mode)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* Polling mode - initialize a work queue for handling it */
|
|
|
|
INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control);
|
|
|
|
|
|
|
|
rc_interval = d->props.rc.core.rc_interval;
|
|
|
|
|
|
|
|
info("schedule remote query interval to %d msecs.", rc_interval);
|
|
|
|
schedule_delayed_work(&d->rc_query_work,
|
|
|
|
msecs_to_jiffies(rc_interval));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-06-24 13:02:35 +08:00
|
|
|
int dvb_usb_remote_init(struct dvb_usb_device *d)
|
|
|
|
{
|
2006-11-20 21:23:04 +08:00
|
|
|
int err;
|
2005-09-15 15:01:53 +08:00
|
|
|
|
2010-08-01 06:07:55 +08:00
|
|
|
if (dvb_usb_disable_rc_polling)
|
|
|
|
return 0;
|
|
|
|
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
if (d->props.rc.legacy.rc_map_table && d->props.rc.legacy.rc_query)
|
2010-08-01 06:07:55 +08:00
|
|
|
d->props.rc.mode = DVB_RC_LEGACY;
|
|
|
|
else if (d->props.rc.core.rc_codes)
|
|
|
|
d->props.rc.mode = DVB_RC_CORE;
|
|
|
|
else
|
2005-06-24 13:02:35 +08:00
|
|
|
return 0;
|
|
|
|
|
2005-09-15 15:01:53 +08:00
|
|
|
usb_make_path(d->udev, d->rc_phys, sizeof(d->rc_phys));
|
2006-08-28 10:01:24 +08:00
|
|
|
strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys));
|
2005-09-15 15:01:53 +08:00
|
|
|
|
2005-06-24 13:02:35 +08:00
|
|
|
/* Start the remote-control polling. */
|
2010-08-01 05:04:09 +08:00
|
|
|
if (d->props.rc.legacy.rc_interval < 40)
|
|
|
|
d->props.rc.legacy.rc_interval = 100; /* default */
|
2005-06-24 13:02:35 +08:00
|
|
|
|
2010-08-01 06:07:55 +08:00
|
|
|
if (d->props.rc.mode == DVB_RC_LEGACY)
|
2010-10-30 03:08:23 +08:00
|
|
|
err = legacy_dvb_usb_remote_init(d);
|
2010-08-01 06:07:55 +08:00
|
|
|
else
|
2010-10-30 03:08:23 +08:00
|
|
|
err = rc_core_dvb_usb_remote_init(d);
|
2010-08-01 06:07:55 +08:00
|
|
|
if (err)
|
|
|
|
return err;
|
2005-06-24 13:02:35 +08:00
|
|
|
|
|
|
|
d->state |= DVB_USB_STATE_REMOTE;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int dvb_usb_remote_exit(struct dvb_usb_device *d)
|
|
|
|
{
|
|
|
|
if (d->state & DVB_USB_STATE_REMOTE) {
|
2010-12-14 23:21:17 +08:00
|
|
|
cancel_delayed_work_sync(&d->rc_query_work);
|
2010-08-01 06:07:55 +08:00
|
|
|
if (d->props.rc.mode == DVB_RC_LEGACY)
|
2010-10-30 03:08:23 +08:00
|
|
|
input_unregister_device(d->input_dev);
|
2010-08-01 06:07:55 +08:00
|
|
|
else
|
2010-10-30 03:08:23 +08:00
|
|
|
rc_unregister_device(d->rc_dev);
|
2005-06-24 13:02:35 +08:00
|
|
|
}
|
|
|
|
d->state &= ~DVB_USB_STATE_REMOTE;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DVB_USB_RC_NEC_EMPTY 0x00
|
|
|
|
#define DVB_USB_RC_NEC_KEY_PRESSED 0x01
|
|
|
|
#define DVB_USB_RC_NEC_KEY_REPEATED 0x02
|
|
|
|
int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
|
|
|
|
u8 keybuf[5], u32 *event, int *state)
|
|
|
|
{
|
|
|
|
int i;
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
|
2005-06-24 13:02:35 +08:00
|
|
|
*event = 0;
|
|
|
|
*state = REMOTE_NO_KEY_PRESSED;
|
|
|
|
switch (keybuf[0]) {
|
|
|
|
case DVB_USB_RC_NEC_EMPTY:
|
|
|
|
break;
|
|
|
|
case DVB_USB_RC_NEC_KEY_PRESSED:
|
|
|
|
if ((u8) ~keybuf[1] != keybuf[2] ||
|
|
|
|
(u8) ~keybuf[3] != keybuf[4]) {
|
|
|
|
deb_err("remote control checksum failed.\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
/* See if we can match the raw key code. */
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
|
2009-08-30 02:19:31 +08:00
|
|
|
if (rc5_custom(&keymap[i]) == keybuf[1] &&
|
|
|
|
rc5_data(&keymap[i]) == keybuf[3]) {
|
2010-07-31 22:24:57 +08:00
|
|
|
*event = keymap[i].keycode;
|
2005-06-24 13:02:35 +08:00
|
|
|
*state = REMOTE_KEY_PRESSED;
|
2005-07-08 08:58:24 +08:00
|
|
|
return 0;
|
2005-06-24 13:02:35 +08:00
|
|
|
}
|
|
|
|
deb_err("key mapping failed - no appropriate key found in keymapping\n");
|
|
|
|
break;
|
|
|
|
case DVB_USB_RC_NEC_KEY_REPEATED:
|
|
|
|
*state = REMOTE_KEY_REPEAT;
|
|
|
|
break;
|
|
|
|
default:
|
tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-14 23:09:05 +08:00
|
|
|
deb_err("unknown type of remote status: %d\n",keybuf[0]);
|
2005-06-24 13:02:35 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(dvb_usb_nec_rc_key_to_event);
|