linux/drivers/media/usb/dvb-usb-v2
David Härdeman c003ab1bed [media] rc-core: add separate defines for protocol bitmaps and numbers
The RC_TYPE_* defines are currently used both where a single protocol is
expected and where a bitmap of protocols is expected.

Functions like rc_keydown() and functions which add/remove entries to the
keytable want a single protocol. Future userspace APIs would also
benefit from numeric protocols (rather than bitmap ones). Keytables are
smaller if they can use a small(ish) integer rather than a bitmap.

Other functions or struct members (e.g. allowed_protos,
enabled_protocols, etc) accept multiple protocols and need a bitmap.

Using different types reduces the risk of programmer error. Using a
protocol enum whereever possible also makes for a more future-proof
user-space API as we don't need to worry about a sufficient number of
bits being available (e.g. in structs used for ioctl() calls).

The use of both a number and a corresponding bit is dalso one in e.g.
the input subsystem as well (see all the references to set/clear bit when
changing keytables for example).

This patch separate the different usages in preparation for
upcoming patches.

Where a single protocol is expected, enum rc_type is used; where one or more
protocol(s) are expected, something like u64 is used.

The patch has been rewritten so that the format of the sysfs "protocols"
file is no longer altered (at the loss of some detail). The file itself
should probably be deprecated in the future though.

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 11:49:51 -02:00
..
af9015.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
af9015.h [media] af9015: use Kernel dev_foo() logging 2012-09-23 20:48:10 -03:00
af9035.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
af9035.h [media] Support for Asus MyCinema U3100Mini Plus 2012-09-27 15:14:17 -03:00
anysee.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
anysee.h [media] anysee: do not remove CI when it is not attached 2012-09-27 15:18:24 -03:00
au6610.c [media] au6610: use Kernel dev_foo() logging 2012-09-23 20:50:03 -03:00
au6610.h
az6007.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
ce6230.c [media] ce6230: use Kernel dev_foo() logging 2012-09-23 20:50:42 -03:00
ce6230.h [media] dvb_usb_v2: use dvb_usb_dbg_usb_control_msg() 2012-09-15 11:35:59 -03:00
cypress_firmware.c [media] cypress_firmware: refactor firmware downloading 2012-09-27 15:14:20 -03:00
cypress_firmware.h
dvb_usb_common.h
dvb_usb_core.c [media] dvb_usb_v2: fix error handling for .tuner_attach() 2012-09-27 15:16:31 -03:00
dvb_usb_urb.c
dvb_usb.h [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
ec168.c [media] ec168: use Kernel dev_foo() logging 2012-09-23 20:50:28 -03:00
ec168.h [media] ec168: declare MODULE_FIRMWARE 2012-09-23 20:08:21 -03:00
gl861.c [media] gl861: use Kernel dev_foo() logging 2012-09-23 20:50:13 -03:00
gl861.h
it913x.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
Kconfig [media] Support for Asus MyCinema U3100Mini Plus 2012-09-27 15:14:17 -03:00
lmedm04.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
lmedm04.h
Makefile [media] dvb_usb_v2: rename module dvb_usbv2 => dvb_usb_v2 2012-09-27 15:14:00 -03:00
mxl111sf-demod.c
mxl111sf-demod.h
mxl111sf-gpio.c
mxl111sf-gpio.h
mxl111sf-i2c.c
mxl111sf-i2c.h
mxl111sf-phy.c
mxl111sf-phy.h
mxl111sf-reg.h
mxl111sf-tuner.c
mxl111sf-tuner.h
mxl111sf.c
mxl111sf.h
rtl28xxu.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
rtl28xxu.h [media] rtl28xxu: move rtl2832u tuner probing to .read_config() 2012-09-27 15:14:10 -03:00
usb_urb.c [media] dvb_usb_v2: use ratelimited debugs where appropriate 2012-09-13 13:37:09 -03:00