Improve LIRC documentation
Subsystems (3)
cover Improve LIRC documentation
The LIRC documentation doesn't follow the remaining of the media book.
There's just a single page with all ioctls inside, and, IMHO, not very clear. Also, the LIRC_CAN flags were not described.
This patchset address these. Also, it removes some LIRC ioctls that aren't used.
Mauro Carvalho Chehab (20):
[media] doc-rst: Document ioctl LIRC_GET_FEATURES
[media] doc-rst: add media/uapi/rc/lirc-header.rst [media] lirc.h: remove several unused ioctls
[media] doc-rst: remove not used ioctls from documentation [media] doc-rst: Fix LIRC_GET_FEATURES references
[media] doc-rst: document ioctl LIRC_GET_SEND_MODE [media] doc-rst: fix some lirc cross-references
[media] doc-rst: document ioctl LIRC_GET_REC_MODE
[media] doc-rst: document LIRC_GET_REC_RESOLUTION
[media] doc-rst: document LIRC_SET_SEND_DUTY_CYCLE [media] doc-rst: document LIRC_GET_*_TIMEOUT ioctls [media] doc-rst: Document LIRC_GET_LENGTH ioctl
[media] doc-rst: document LIRC set carrier ioctls
[media] doc-rst: document LIRC_SET_TRANSMITTER_MASK [media] doc-rst: document LIRC_SET_REC_TIMEOUT
[media] doc-rst: document LIRC_SET_REC_TIMEOUT_REPORTS [media] doc-rst: add documentation for LIRC_SET_MEASURE_CARRIER_MODE [media] doc-rst: document LIRC_SET_WIDEBAND_RECEIVER [media] doc-rst: Document LIRC set mode ioctls
[media] doc-rst: reorganize LIRC ReST files
Documentation/media/lirc.h.rst.exceptions | 39 +--
.../rc/{lirc_dev_intro.rst => lirc-dev-intro.rst} | 34 +++
.../rc/{lirc_device_interface.rst => lirc-dev.rst} | 7 +-
Documentation/media/uapi/rc/lirc-func.rst | 28 +++
Documentation/media/uapi/rc/lirc-get-features.rst | 181 ++++++++++++++
Documentation/media/uapi/rc/lirc-get-length.rst | 45 ++++
Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 45 ++++
.../media/uapi/rc/lirc-get-rec-resolution.rst | 49 ++++
Documentation/media/uapi/rc/lirc-get-send-mode.rst | 45 ++++
Documentation/media/uapi/rc/lirc-get-timeout.rst | 55 +++++
Documentation/media/uapi/rc/lirc-header.rst | 10 +
.../media/uapi/rc/{lirc_read.rst => lirc-read.rst} | 10 +-
.../uapi/rc/lirc-set-measure-carrier-mode.rst | 48 ++++
.../media/uapi/rc/lirc-set-rec-carrier-range.rst | 49 ++++
.../media/uapi/rc/lirc-set-rec-carrier.rst | 48 ++++
.../media/uapi/rc/lirc-set-rec-timeout-reports.rst | 49 ++++
.../media/uapi/rc/lirc-set-rec-timeout.rst | 52 ++++
.../media/uapi/rc/lirc-set-send-carrier.rst | 43 ++++
.../media/uapi/rc/lirc-set-send-duty-cycle.rst | 49 ++++
.../media/uapi/rc/lirc-set-transmitter-mask.rst | 53 ++++
.../media/uapi/rc/lirc-set-wideband-receiver.rst | 56 +++++
.../uapi/rc/{lirc_write.rst => lirc-write.rst} | 4 +-
Documentation/media/uapi/rc/lirc_ioctl.rst | 270 ---------------------
Documentation/media/uapi/rc/remote_controllers.rst | 3 +-
include/uapi/linux/lirc.h | 39 +--
25 files changed, 956 insertions(+), 355 deletions(-)
rename Documentation/media/uapi/rc/{lirc_dev_intro.rst => lirc-dev-intro.rst} (52%)
rename Documentation/media/uapi/rc/{lirc_device_interface.rst => lirc-dev.rst} (67%)
create mode 100644 Documentation/media/uapi/rc/lirc-func.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-features.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-length.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-mode.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-resolution.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-send-mode.rst
create mode 100644 Documentation/media/uapi/rc/lirc-get-timeout.rst
create mode 100644 Documentation/media/uapi/rc/lirc-header.rst
rename Documentation/media/uapi/rc/{lirc_read.rst => lirc-read.rst} (83%)
create mode 100644 Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-carrier.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-timeout.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-send-carrier.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst
create mode 100644 Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst
rename Documentation/media/uapi/rc/{lirc_write.rst => lirc-write.rst} (94%)
delete mode 100644 Documentation/media/uapi/rc/lirc_ioctl.rstSignature · 1 line
2.7.4
PATCH 1/20 doc-rst: Document ioctl LIRC_GET_FEATURES
The documentation for this ioctl was really crappy.
Add a better documentation, using the lirc.4 man pages as a reference, plus what was written originally at the lirc-ioctl.
--- Documentation/media/lirc.h.rst.exceptions | 35 ----- Documentation/media/uapi/rc/lirc-get-features.rst | 168 +++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 8 - 4 files changed, 169 insertions(+), 43 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-features.rst
Documentation/media/lirc.h.rst.exceptions +0 -35
@@ -37,38 +37,3 @@ ignore define LIRC_VALUE_MASK ignore define LIRC_MODE2_MASK ignore define LIRC_MODE_RAW - -ignore define LIRC_CAN_SEND_RAW -ignore define LIRC_CAN_SEND_PULSE -ignore define LIRC_CAN_SEND_MODE2 -ignore define LIRC_CAN_SEND_LIRCCODE - -ignore define LIRC_CAN_SEND_MASK - -ignore define LIRC_CAN_SET_SEND_CARRIER -ignore define LIRC_CAN_SET_SEND_DUTY_CYCLE -ignore define LIRC_CAN_SET_TRANSMITTER_MASK - -ignore define LIRC_CAN_REC_RAW -ignore define LIRC_CAN_REC_PULSE -ignore define LIRC_CAN_REC_MODE2 -ignore define LIRC_CAN_REC_LIRCCODE - -ignore define LIRC_CAN_REC_MASK - -ignore define LIRC_CAN_SET_REC_CARRIER -ignore define LIRC_CAN_SET_REC_DUTY_CYCLE - -ignore define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE -ignore define LIRC_CAN_SET_REC_CARRIER_RANGE -ignore define LIRC_CAN_GET_REC_RESOLUTION -ignore define LIRC_CAN_SET_REC_TIMEOUT -ignore define LIRC_CAN_SET_REC_FILTER - -ignore define LIRC_CAN_MEASURE_CARRIER -ignore define LIRC_CAN_USE_WIDEBAND_RECEIVER - -ignore define LIRC_CAN_SEND(x) -ignore define LIRC_CAN_REC(x) - -ignore define LIRC_CAN_NOTIFY_DECODE
Documentation/media/uapi/rc/lirc-get-features.rst new file +168 -0
168 lines not on this page · raw message
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -12,4 +12,5 @@ LIRC Device Interface lirc_dev_intro lirc_read lirc_write + lirc-get-features lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -8
@@ -50,14 +50,6 @@ I/O control requests ==================== -.. _LIRC_GET_FEATURES: - -``LIRC_GET_FEATURES`` - - Obviously, get the underlying hardware device's features. If a - driver does not announce support of certain features, calling of the - corresponding ioctls is undefined. - .. _LIRC_GET_SEND_MODE: .. _lirc-mode-pulse:
Signature · 1 line
2.7.4
PATCH 2/20 doc-rst: add media/uapi/rc/lirc-header.rst
In reply to Mauro Carvalho Chehabchangeset 68cd5e0bed99 ("[media] doc-rst: add LIRC header to the book") did everything but adding the lirc-reader.rst :-p
My fault: I forgot to do a git add for this guy on such changeset.
--- Documentation/media/uapi/rc/lirc-header.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Documentation/media/uapi/rc/lirc-header.rst
Documentation/media/uapi/rc/lirc-header.rst new file +10 -0
@@ -0,0 +1,10 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_header: + +**************** +LIRC Header File +**************** + +.. kernel-include:: $BUILDDIR/lirc.h.rst +
Signature · 1 line
2.7.4
PATCH 3/20 lirc.h: remove several unused ioctls
In reply to Mauro Carvalho ChehabWhile reviewing the documentation gaps on LIRC, it was noticed that several ioctls aren't used by any LIRC drivers (nor at staging or mainstream).
It doesn't make sense to document them, as they're not used anywhere. So, let's remove those from the lirc header.
--- include/uapi/linux/lirc.h | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-)
include/uapi/linux/lirc.h +2 -37
@@ -90,20 +90,11 @@#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32)#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) -#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) -#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) -#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) -#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32)#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32)#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32)#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) -#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) -#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) -#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) -#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) -/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ #define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32)
@@ -113,7 +104,6 @@#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32)#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32)#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) -#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32)#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32)/*
@@ -127,42 +117,17 @@#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32)/* -* pulses shorter than this are filtered out by hardware (software -* emulation in lirc_dev?) -*/ -#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32) -/* -* spaces shorter than this are filtered out by hardware (software -* emulation in lirc_dev?) -*/ -#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) -/* -* if filter cannot be set independently for pulse/space, this should -* be used -*/ -#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) - -/* * if enabled from the next key press on the driver will send * LIRC_MODE2_FREQUENCY packets */ #define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32)/* -* to set a range use -* LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the -* lower bound first and later -* LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound +* to set a range use LIRC_SET_REC_CARRIER_RANGE with the +* lower bound first and later LIRC_SET_REC_CARRIER with the upper bound */ - -#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32)#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) -#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020) - -#define LIRC_SETUP_START _IO('i', 0x00000021) -#define LIRC_SETUP_END _IO('i', 0x00000022) -#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32)#endif
Signature · 1 line
2.7.4
Sean Young
maintainerRe: [PATCH 03/20] [media] lirc.h: remove several unused ioctls
Quoted 6 lines · Mauro Carvalho Chehab
While reviewing the documentation gaps on LIRC, it was noticed that several ioctls aren't used by any LIRC drivers (nor at staging or mainstream).
It doesn't make sense to document them, as they're not used anywhere. So, let's remove those from the lirc header.
Good to see these go.
Quoted 32 lines
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- include/uapi/linux/lirc.h | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-)include/uapi/linux/lirc.h +0
-9@@ -90,20 +90,11 @@#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32)#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) -#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) -#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) -#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) -#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32)#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32)#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32)#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) -#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) -#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) -#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) -#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) -/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ #define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32)
include/uapi/linux/lirc.h line 116
Quoted 4 lines
include/uapi/linux/lirc.h +0
-1@@ -113,7 +104,6 @@#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32)#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32)#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) -#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32)
Also remove LIRC_CAN_SET_REC_DUTY_CYCLE andLIRC_CAN_SET_REC_DUTY_CYCLE_RANGE.
Quoted 11 lines
include/uapi/linux/lirc.h +0
-4#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32)/* @@ -127,42 +117,17 @@#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32)/* -* pulses shorter than this are filtered out by hardware (software -* emulation in lirc_dev?) -*/ -#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32)
include/uapi/linux/lirc.h line 143
Quoted 10 lines
include/uapi/linux/lirc.h +0
-10-/* -* spaces shorter than this are filtered out by hardware (software -* emulation in lirc_dev?) -*/ -#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) -/* -* if filter cannot be set independently for pulse/space, this should -* be used -*/ -#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32)
Also remove LIRC_CAN_SET_REC_FILTER.
Quoted 10 lines
include/uapi/linux/lirc.h +0
-4- -/* * if enabled from the next key press on the driver will send * LIRC_MODE2_FREQUENCY packets */ #define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32)/* -* to set a range use -* LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the
include/uapi/linux/lirc.h line 161
Quoted 10 lines
include/uapi/linux/lirc.h +2
-5-* lower bound first and later -* LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound +* to set a range use LIRC_SET_REC_CARRIER_RANGE with the +* lower bound first and later LIRC_SET_REC_CARRIER with the upper bound */ - -#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32)#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) -#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020)
Also remove LIRC_CAN_NOTIFY_DECODE.
include/uapi/linux/lirc.h line 133
Quoted 7 lines
include/uapi/linux/lirc.h +0
-4- -#define LIRC_SETUP_START _IO('i', 0x00000021) -#define LIRC_SETUP_END _IO('i', 0x00000022) -#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32)#endif
Sean
Re: [PATCH 03/20] [media] lirc.h: remove several unused ioctls
Em Tue, 12 Jul 2016 14:14:06 +0100
Sean Young <[email protected]> escreveu:
Quoted 40 lines · Mauro Carvalho Chehab
Quoted 6 lines
While reviewing the documentation gaps on LIRC, it was noticed that several ioctls aren't used by any LIRC drivers (nor at staging or mainstream).
It doesn't make sense to document them, as they're not used anywhere. So, let's remove those from the lirc header.
Good to see these go.
Quoted 31 lines
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- include/uapi/linux/lirc.h | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-)include/uapi/linux/lirc.h +0
-9@@ -90,20 +90,11 @@#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32)#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) -#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) -#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) -#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) -#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32)#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32)#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32)#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) -#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) -#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) -#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) -#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) -/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ #define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32)
Quoted 8 lines
include/uapi/linux/lirc.h line 116
Quoted 5 lines
include/uapi/linux/lirc.h +0
-1@@ -113,7 +104,6 @@#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32)#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32)#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) -#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32)Also remove
LIRC_CAN_SET_REC_DUTY_CYCLEandLIRC_CAN_SET_REC_DUTY_CYCLE_RANGE.
Removing the "LIRC_CAN" macros can break userspace, as some app could be using it to print the LIRC features. That's why I opted to keep them, but to document that those features are unused - this is at the next patch (04/20).
Thanks,
Mauro
Sean Young
maintainerRe: [PATCH 03/20] [media] lirc.h: remove several unused ioctls
Quoted 3 lines · Mauro Carvalho Chehab
Em Tue, 12 Jul 2016 14:14:06 +0100
Sean Young <[email protected]> escreveu:Quoted 1 line · Mauro Carvalho Chehab
-snip-
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
-#define
LIRC_SET_REC_DUTY_CYCLE_IOW('i', 0x00000016, __u32)Also remove
LIRC_CAN_SET_REC_DUTY_CYCLEandLIRC_CAN_SET_REC_DUTY_CYCLE_RANGE.Removing the "
LIRC_CAN" macros can break userspace, as some app could be using it to print the LIRC features. That's why I opted to keep them, but to document that those features are unused - this is at the next patch (04/20).
How is that different from removing the ioctls? Might as well go the whole hog.
Also note that LIRC_CAN_SET_REC_DUTY_CYCLE has the same value as LIRC_CAN_MEASURE_CARRIER, so if some userspace program uses this it might end up in the mistaken belief its supports LIRC_CAN_SET_REC_DUTY_CYCLE.
Sean
Sean Young
maintainerRe: [PATCH 03/20] [media] lirc.h: remove several unused ioctls
Quoted 10 lines · Sean Young
Quoted 3 lines · Mauro Carvalho Chehab
Em Tue, 12 Jul 2016 14:14:06 +0100
Sean Young <[email protected]> escreveu:Quoted 1 line · Mauro Carvalho Chehab
-snip-
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
-#define
LIRC_SET_REC_DUTY_CYCLE_IOW('i', 0x00000016, __u32)Also remove
LIRC_CAN_SET_REC_DUTY_CYCLEandLIRC_CAN_SET_REC_DUTY_CYCLE_RANGE.
Quoted 7 lines
Quoted 4 lines
Removing the "
LIRC_CAN" macros can break userspace, as some app could be using it to print the LIRC features. That's why I opted to keep them, but to document that those features are unused - this is at the next patch (04/20).How is that different from removing the ioctls? Might as well go the whole hog.
Ah you meant that if someone later adds a new feature then we might reuse an existing bit. Oops, sorry.
Quoted 3 lines
Also note that
LIRC_CAN_SET_REC_DUTY_CYCLEhas the same value asLIRC_CAN_MEASURE_CARRIER, so if some userspace program uses this it might end up in the mistaken belief its supportsLIRC_CAN_SET_REC_DUTY_CYCLE.
So there is an argument for removing LIRC_CAN_SET_REC_DUTY_CYCLE, but that should be a separate patch.
Sean
Re: [PATCH 03/20] [media] lirc.h: remove several unused ioctls
Em Tue, 12 Jul 2016 14:54:38 +0100
Sean Young <[email protected]> escreveu:
Quoted 11 lines · Sean Young
Quoted 10 lines · Mauro Carvalho Chehab
Quoted 3 lines
Em Tue, 12 Jul 2016 14:14:06 +0100
Sean Young <[email protected]> escreveu:Quoted 1 line · Mauro Carvalho Chehab
-snip-
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
-#define
LIRC_SET_REC_DUTY_CYCLE_IOW('i', 0x00000016, __u32)Also remove
LIRC_CAN_SET_REC_DUTY_CYCLEandLIRC_CAN_SET_REC_DUTY_CYCLE_RANGE.
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Removing the "
LIRC_CAN" macros can break userspace, as some app could be using it to print the LIRC features. That's why I opted to keep them, but to document that those features are unused - this is at the next patch (04/20).How is that different from removing the ioctls? Might as well go the whole hog.
If someone implemented LIRC_GET_FEATURES and handled all flags, such program would break, as the API change.
Quoted 3 lines
Ah you meant that if someone later adds a new feature then we might reuse an existing bit. Oops, sorry.
Yes, this is another possibility. In such case, the ABI will also break, with is more severe than a pure API change.
Removing the ioctl declarations will still work for compiled programs, as they'll still receive an error code when the ioctl is issued.
Quoted 7 lines
Quoted 4 lines
Also note that
LIRC_CAN_SET_REC_DUTY_CYCLEhas the same value asLIRC_CAN_MEASURE_CARRIER, so if some userspace program uses this it might end up in the mistaken belief its supportsLIRC_CAN_SET_REC_DUTY_CYCLE.So there is an argument for removing
LIRC_CAN_SET_REC_DUTY_CYCLE, but that should be a separate patch.
Yes. Yet, IMHO, the best would be to put those unused LIRC_CAN into a:
#ifndef __KERNEL
macro block, to:
1) avoid the risk of breaking userspace;
2) be clear that those are deprecated stuff and should not be used on newer programs;
3) Reserve the bits for not be used, to avoid possible conflicts.
Regards,
Mauro
PATCH 4/20 doc-rst: remove not used ioctls from documentation
In reply to Mauro Carvalho ChehabAs we removed those ioctls from the header file, do the same at the documentation side.
--- Documentation/media/uapi/rc/lirc-get-features.rst | 9 +-- Documentation/media/uapi/rc/lirc_ioctl.rst | 74 ++--------------------- 2 files changed, 9 insertions(+), 74 deletions(-)
Documentation/media/uapi/rc/lirc-get-features.rst +3 -6
@@ -91,8 +91,7 @@ LIRC features .. _LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE: ``LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE`` - The driver supports - :ref:`LIRC_SET_REC_DUTY_CYCLE_RANGE.` + Unused. Kept just to avoid breaking uAPI. .. _LIRC_CAN_SET_REC_CARRIER_RANGE:
@@ -115,8 +114,7 @@ LIRC features .. _LIRC_CAN_SET_REC_FILTER: ``LIRC_CAN_SET_REC_FILTER`` - The driver supports - :ref:`LIRC_SET_REC_FILTER.` + Unused. Kept just to avoid breaking uAPI. .. _LIRC_CAN_MEASURE_CARRIER:
@@ -133,8 +131,7 @@ LIRC features .. _LIRC_CAN_NOTIFY_DECODE: ``LIRC_CAN_NOTIFY_DECODE`` - The driver supports - :ref:`LIRC_NOTIFY_DECODE.` + Unused. Kept just to avoid breaking uAPI. .. _LIRC_CAN_SEND_RAW:
Documentation/media/uapi/rc/lirc_ioctl.rst +6 -68
108 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 5/20 doc-rst: Fix LIRC_GET_FEATURES references
In reply to Mauro Carvalho ChehabThe references pointed by LIRC_GET_FEATURES ioctl are broken.
Fix them.
--- Documentation/media/lirc.h.rst.exceptions | 4 + Documentation/media/uapi/rc/lirc-get-features.rst | 95 +++++++++++++---------- 2 files changed, 60 insertions(+), 39 deletions(-)
Documentation/media/lirc.h.rst.exceptions +4 -0
@@ -24,6 +24,10 @@ ignore define LIRC_REC2MODE ignore define LIRC_CAN_SEND ignore define LIRC_CAN_REC +ignore define LIRC_CAN_SEND_MASK +ignore define LIRC_CAN_REC_MASK +ignore define LIRC_CAN_SET_REC_DUTY_CYCLE + # Undocumented macros ignore define PULSE_BIT
Documentation/media/uapi/rc/lirc-get-features.rst +56 -39
176 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 6/20 doc-rst: document ioctl LIRC_GET_SEND_MODE
In reply to Mauro Carvalho ChehabMove the documentation of this ioctl from lirc_ioctl to its own file, and add a short description about the pulse mode used by IR TX.
--- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 48 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-send-mode.rst
Documentation/media/uapi/rc/lirc-get-send-mode.rst new file +48 -0
@@ -0,0 +1,48 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_send_mode: + +************************ +ioctl LIRC_GET_SEND_MODE +************************ + +Name +==== + +LIRC_GET_SEND_MODE - Get supported transmit mode. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *tx_modes ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_SEND_MODE + +``tx_modes`` + Bitmask with the supported transmit modes. + + +Description +=========== + +Get supported transmit mode. + +.. _lirc-mode-pulse: + +Currently, only ``LIRC_MODE_PULSE`` is supported by lircd on TX. On +puse mode, a sequence of pulse/space integer values are written to the +lirc device using ``write()``. + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -13,4 +13,5 @@ LIRC Device Interface lirc_read lirc_write lirc-get-features + lirc-get-send-mode lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -9
@@ -49,15 +49,6 @@ device can rely on working with the default settings initially. I/O control requests ==================== - -.. _LIRC_GET_SEND_MODE: -.. _lirc-mode-pulse: - -``LIRC_GET_SEND_MODE`` - - Get supported transmit mode. Only ``LIRC_MODE_PULSE`` is supported by - lircd. - .. _LIRC_GET_REC_MODE: .. _lirc-mode-mode2: .. _lirc-mode-lirccode:
Signature · 1 line
2.7.4
PATCH 7/20 doc-rst: fix some lirc cross-references
In reply to Mauro Carvalho ChehabSome references were broken. It was also mentioning LIRC_MODE_RAW, with it is not implemented on current LIRC drivers.
So, fix the references.
--- Documentation/media/uapi/rc/lirc-get-features.rst | 5 ++--- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 2 +- Documentation/media/uapi/rc/lirc_read.rst | 2 +- Documentation/media/uapi/rc/lirc_write.rst | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-)
Documentation/media/uapi/rc/lirc-get-features.rst +2 -3
@@ -44,8 +44,7 @@ LIRC features ``LIRC_CAN_REC_RAW`` - The driver is capable of receiving using - :ref:`LIRC_MODE_RAW <lirc-mode-raw>`. + Unused. Kept just to avoid breaking uAPI. .. _LIRC-CAN-REC-PULSE:
@@ -153,7 +152,7 @@ LIRC features ``LIRC_CAN_SEND_RAW`` - The driver supports sending using :ref:`LIRC_MODE_RAW <lirc-mode-raw>`. + Unused. Kept just to avoid breaking uAPI. .. _LIRC-CAN-SEND-PULSE:
Documentation/media/uapi/rc/lirc-get-send-mode.rst +1 -1
@@ -38,7 +38,7 @@ Get supported transmit mode. Currently, only ``LIRC_MODE_PULSE`` is supported by lircd on TX. On puse mode, a sequence of pulse/space integer values are written to the -lirc device using ``write()``. +lirc device using :Ref:`lirc-write`. Return Value ============
Documentation/media/uapi/rc/lirc_read.rst +1 -1
@@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _lirc_read: +.. _lirc-read: *********** LIRC read()
Documentation/media/uapi/rc/lirc_write.rst +2 -2
@@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _lirc_write: +.. _lirc-write: ************ LIRC write()
@@ -36,7 +36,7 @@ Arguments Description =========== -:ref:`write() <func-write>` writes up to ``count`` bytes to the device +:ref:`write() <lirc-write>` writes up to ``count`` bytes to the device referenced by the file descriptor ``fd`` from the buffer starting at ``buf``.
Signature · 1 line
2.7.4
PATCH 8/20 doc-rst: document ioctl LIRC_GET_REC_MODE
In reply to Mauro Carvalho ChehabMove the documentation of this ioctl from lirc_ioctl to its own file, and add a short description about the pulse mode used by IR RX.
--- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 59 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-mode.rst
Documentation/media/uapi/rc/lirc-get-rec-mode.rst new file +59 -0
@@ -0,0 +1,59 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_rec_mode: + +*********************** +ioctl LIRC_GET_REC_MODE +*********************** + +Name +==== + +LIRC_GET_REC_MODE - Get supported receive modes. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 rx_modes) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_REC_MODE + +``rx_modes`` + Bitmask with the supported transmit modes. + +Description +=========== + +Get supported receive modes. + +Supported receive modes +======================= + +.. _lirc-mode-mode2: + +``LIRC_MODE_MODE2`` + + The driver returns a sequence of pulse and space codes to userspace. + +.. _lirc-mode-lirccode: + +``LIRC_MODE_LIRCCODE`` + + The IR signal is decoded internally by the receiver. The LIRC interface + returns the scancode as an integer value. This is the usual mode used + by several TV media cards. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -14,4 +14,5 @@ LIRC Device Interface lirc_write lirc-get-features lirc-get-send-mode + lirc-get-rec-mode lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -9
@@ -49,15 +49,6 @@ device can rely on working with the default settings initially. I/O control requests ==================== -.. _LIRC_GET_REC_MODE: -.. _lirc-mode-mode2: -.. _lirc-mode-lirccode: - -``LIRC_GET_REC_MODE`` - - Get supported receive modes. Only ``LIRC_MODE_MODE2`` and - ``LIRC_MODE_LIRCCODE`` are supported by lircd. - .. _LIRC_SET_SEND_DUTY_CYCLE: ``LIRC_SET_SEND_DUTY_CYCLE``
Signature · 1 line
2.7.4
Sean Young
maintainerRe: [PATCH 08/20] [media] doc-rst: document ioctl LIRC_GET_REC_MODE
Quoted 59 lines · Mauro Carvalho Chehab
Move the documentation of this ioctl from
lirc_ioctlto its own file, and add a short description about the pulse mode used by IR RX.Signed-off-by Mauro Carvalho Chehab <[email protected]>--- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 59 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-mode.rstDocumentation/media/uapi/rc/lirc-get-rec-mode.rst new file +41
-0@@ -0,0 +1,59 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_rec_mode: + +*********************** +ioctl LIRC_GET_REC_MODE +*********************** + +Name +==== + +LIRC_GET_REC_MODE - Get supported receive modes. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 rx_modes) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_REC_MODE + +``rx_modes`` + Bitmask with the supported transmit modes. + +Description +=========== + +Get supported receive modes. + +Supported receive modes +======================= + +.. _lirc-mode-mode2: + +``LIRC_MODE_MODE2``
Documentation/media/uapi/rc/lirc-get-rec-mode.rst line 51
Quoted 10 lines
Documentation/media/uapi/rc/lirc-get-rec-mode.rst new file +10
-0+ + The driver returns a sequence of pulse and space codes to userspace. + +.. _lirc-mode-lirccode: + +``LIRC_MODE_LIRCCODE`` + + The IR signal is decoded internally by the receiver. The LIRC interface + returns the scancode as an integer value. This is the usual mode used + by several TV media cards.
Actually rc devices that produce scancodes (rather than raw IR) do have not have an associated lirc device so no LIRC_MODE_LIRCCODE there. The exception to this is the lirc_sasem and lirc_zilog drivers in staging; those two are the only drivers that use LIRC_MODE_LIRCCODE at all.
The lirc_sasem driver should be ported to rc-core, but I've never been able to find the hardware for it. When it is ported it won't need LIRCCODE any more.
The lirc_zilog driver is just for sending and also should be ported to rc-core. The hardware supports sending raw IR, I just do not know how so I can't port it.
Sean
Re: [PATCH 08/20] [media] doc-rst: document ioctl LIRC_GET_REC_MODE
Em Tue, 12 Jul 2016 14:01:59 +0100
Sean Young <[email protected]> escreveu:
Quoted 65 lines · Mauro Carvalho Chehab
Quoted 64 lines
Move the documentation of this ioctl from
lirc_ioctlto its own file, and add a short description about the pulse mode used by IR RX.Signed-off-by Mauro Carvalho Chehab <[email protected]>--- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 59 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-mode.rstDocumentation/media/uapi/rc/lirc-get-rec-mode.rst new file +46
-0@@ -0,0 +1,59 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_rec_mode: + +*********************** +ioctl LIRC_GET_REC_MODE +*********************** + +Name +==== + +LIRC_GET_REC_MODE - Get supported receive modes. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 rx_modes) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_REC_MODE + +``rx_modes`` + Bitmask with the supported transmit modes. + +Description +=========== + +Get supported receive modes. + +Supported receive modes +======================= + +.. _lirc-mode-mode2: + +``LIRC_MODE_MODE2`` + + The driver returns a sequence of pulse and space codes to userspace. + +.. _lirc-mode-lirccode: +
Quoted 8 lines
Documentation/media/uapi/rc/lirc-get-rec-mode.rst line 51
Quoted 5 lines
Documentation/media/uapi/rc/lirc-get-rec-mode.rst new file +5
-0+``LIRC_MODE_LIRCCODE`` + + The IR signal is decoded internally by the receiver. The LIRC interface + returns the scancode as an integer value. This is the usual mode used + by several TV media cards.Actually rc devices that produce scancodes (rather than raw IR) do have not have an associated lirc device so no
LIRC_MODE_LIRCCODEthere.
Yeah, I noticed. Yet, the core reports feature = LIRC_MODE_LIRCCODE if the driver doesn't set features.
Quoted 11 lines
The exception
to this is thelirc_sasemandlirc_zilogdrivers in staging; those two are the only drivers that useLIRC_MODE_LIRCCODEat all.The
lirc_sasemdriver should be ported to rc-core, but I've never been able to find the hardware for it. When it is ported it won't need LIRCCODE any more.The
lirc_zilogdriver is just for sending and also should be ported to rc-core. The hardware supports sending raw IR, I just do not know how so I can't port it.
Still, it makes sense to have LIRC_MODE_LIRCCODE supported for IR send, in order to support HDMI CEC. That's why I opted to keep it documented.
Regards,
Mauro
PATCH 9/20 doc-rst: document LIRC_GET_REC_RESOLUTION
In reply to Mauro Carvalho ChehabImprove the documentation for this ioctl, adding it to a separate file, in order to look like the rest of the book, and to later allow to generate a man page for this ioctl.
--- .../media/uapi/rc/lirc-get-rec-resolution.rst | 49 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 10 ----- 3 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-rec-resolution.rst
Documentation/media/uapi/rc/lirc-get-rec-resolution.rst new file +49 -0
@@ -0,0 +1,49 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_rec_resolution: + +***************************** +ioctl LIRC_GET_REC_RESOLUTION +***************************** + +Name +==== + +LIRC_GET_REC_RESOLUTION - Obtain the value of receive resolution, in microseconds. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *microseconds) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_REC_RESOLUTION + +``microseconds`` + Resolution, in microseconds. + + +Description +=========== + +Some receivers have maximum resolution which is defined by internal +sample rate or data format limitations. E.g. it's common that +signals can only be reported in 50 microsecond steps. + +This ioctl returns the integer value with such resolution, with can be +used by userspace applications like lircd to automatically adjust the +tolerance value. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -15,4 +15,5 @@ LIRC Device Interface lirc-get-features lirc-get-send-mode lirc-get-rec-mode + lirc-get-rec-resolution lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -10
@@ -58,16 +58,6 @@ I/O control requests could be used to switch off carrier generation in the future, so these values should be reserved. -.. _LIRC_GET_REC_RESOLUTION: - -``LIRC_GET_REC_RESOLUTION`` - - Some receiver have maximum resolution which is defined by internal - sample rate or data format limitations. E.g. it's common that - signals can only be reported in 50 microsecond steps. This integer - value is used by lircd to automatically adjust the aeps tolerance - value in the lircd config file. - .. _LIRC_GET_MIN_TIMEOUT: .. _LIRC_GET_MAX_TIMEOUT:
Signature · 1 line
2.7.4
PATCH 10/20 doc-rst: document LIRC_SET_SEND_DUTY_CYCLE
In reply to Mauro Carvalho ChehabAdd a separate page for this ioctl.
--- .../media/uapi/rc/lirc-set-send-duty-cycle.rst | 49 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst
Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst new file +49 -0
@@ -0,0 +1,49 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_send_duty_cycle: + +****************************** +ioctl LIRC_SET_SEND_DUTY_CYCLE +****************************** + +Name +==== + +LIRC_SET_SEND_DUTY_CYCLE - Set the duty cycle of the carrier signal for +IR transmit. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *duty_cycle) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_SEND_DUTY_CYCLE + +``duty_cycle`` + Duty cicle, describing the pulse width in percent (from 1 to 99) of + the total cycle. Values 0 and 100 are reserved. + + +Description +=========== + +Get/set the duty cycle of the carrier signal for IR transmit. + +Currently, no special meaning is defined for 0 or 100, but this +could be used to switch off carrier generation in the future, so +these values should be reserved. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -16,4 +16,5 @@ LIRC Device Interface lirc-get-send-mode lirc-get-rec-mode lirc-get-rec-resolution + lirc-set-send-duty-cycle lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -9
@@ -49,15 +49,6 @@ device can rely on working with the default settings initially. I/O control requests ==================== -.. _LIRC_SET_SEND_DUTY_CYCLE: - -``LIRC_SET_SEND_DUTY_CYCLE`` - - Set the duty cycle (from 0 to 100) of the carrier signal. - Currently, no special meaning is defined for 0 or 100, but this - could be used to switch off carrier generation in the future, so - these values should be reserved. - .. _LIRC_GET_MIN_TIMEOUT: .. _LIRC_GET_MAX_TIMEOUT:
Signature · 1 line
2.7.4
PATCH 11/20 doc-rst: document LIRC_GET_*_TIMEOUT ioctls
In reply to Mauro Carvalho ChehabImprove the documentation for those ioctls, adding them to a separate file, in order to look like the rest of the book, and to later allow to generate a man page for those ioctls.
--- Documentation/media/uapi/rc/lirc-get-timeout.rst | 55 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 13 ----- 3 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-timeout.rst
Documentation/media/uapi/rc/lirc-get-timeout.rst new file +55 -0
@@ -0,0 +1,55 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_min_timeout: +.. _lirc_get_max_timeout: + +**************************************************** +ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT +**************************************************** + +Name +==== + +LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout +range for IR receive. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *timeout) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_MIN_TIMEOUT or LIRC_GET_MAX_TIMEOUT + +``timeout`` + Timeout, in microseconds. + + +Description +=========== + +Some devices have internal timers that can be used to detect when +there's no IR activity for a long time. This can help lircd in +detecting that a IR signal is finished and can speed up the decoding +process. Returns an integer value with the minimum/maximum timeout +that can be set. + +.. note:: + + Some devices have a fixed timeout, in that case + both ioctls will return the same value even though the timeout + cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -17,4 +17,5 @@ LIRC Device Interface lirc-get-rec-mode lirc-get-rec-resolution lirc-set-send-duty-cycle + lirc-get-timeout lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -13
@@ -49,19 +49,6 @@ device can rely on working with the default settings initially. I/O control requests ==================== -.. _LIRC_GET_MIN_TIMEOUT: -.. _LIRC_GET_MAX_TIMEOUT: - -``LIRC_GET_M{IN,AX}_TIMEOUT`` - - Some devices have internal timers that can be used to detect when - there's no IR activity for a long time. This can help lircd in - detecting that a IR signal is finished and can speed up the decoding - process. Returns an integer value with the minimum/maximum timeout - that can be set. Some devices have a fixed timeout, in that case - both ioctls will return the same value even though the timeout - cannot be changed. - .. _LIRC_GET_LENGTH: ``LIRC_GET_LENGTH``
Signature · 1 line
2.7.4
PATCH 12/20 doc-rst: Document LIRC_GET_LENGTH ioctl
In reply to Mauro Carvalho ChehabPut documentation for this ioctl on its own page.
--- Documentation/media/uapi/rc/lirc-get-length.rst | 45 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 11 ------ 3 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-get-length.rst
Documentation/media/uapi/rc/lirc-get-length.rst new file +45 -0
@@ -0,0 +1,45 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_get_length: + +********************* +ioctl LIRC_GET_LENGTH +********************* + +Name +==== + +LIRC_GET_LENGTH - Retrieves the code length in bits. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *length ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_GET_LENGTH + +``length`` + length, in bits + + +Description +=========== + +Retrieves the code length in bits (only for ``LIRC-MODE-LIRCCODE``). +Reads on the device must be done in blocks matching the bit count. +The bit could should be rounded up so that it matches full bytes. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -18,4 +18,5 @@ LIRC Device Interface lirc-get-rec-resolution lirc-set-send-duty-cycle lirc-get-timeout + lirc-get-length lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -11
@@ -46,17 +46,6 @@ device can rely on working with the default settings initially. .. _lirc-request: -I/O control requests -==================== - -.. _LIRC_GET_LENGTH: - -``LIRC_GET_LENGTH`` - - Retrieves the code length in bits (only for ``LIRC_MODE_LIRCCODE).`` - Reads on the device must be done in blocks matching the bit count. - The bit could should be rounded up so that it matches full bytes. - .. _LIRC_SET_SEND_MODE: .. _LIRC_SET_REC_MODE:
Signature · 1 line
2.7.4
PATCH 13/20 doc-rst: document LIRC set carrier ioctls
In reply to Mauro Carvalho ChehabPut each ioctl on its own page and improve documentation, adding cross-references for LIRC_SET_REC_CARRIER_RANGE and LIRC_SET_REC_CARRIER, with can be used together to set a carrier frequency range.
--- .../media/uapi/rc/lirc-set-rec-carrier-range.rst | 49 ++++++++++++++++++++++ .../media/uapi/rc/lirc-set-rec-carrier.rst | 48 +++++++++++++++++++++ .../media/uapi/rc/lirc-set-send-carrier.rst | 43 +++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 3 ++ Documentation/media/uapi/rc/lirc_ioctl.rst | 18 -------- 5 files changed, 143 insertions(+), 18 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-carrier.rst create mode 100644 Documentation/media/uapi/rc/lirc-set-send-carrier.rst
Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst new file +49 -0
@@ -0,0 +1,49 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_rec_carrier_range: + +******************************** +ioctl LIRC_SET_REC_CARRIER_RANGE +******************************** + +Name +==== + +LIRC_SET_REC_CARRIER_RANGE - Set lower bond of the carrier used to modulate +IR receive. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_REC_CARRIER_RANGE + +``frequency`` + Frequency of the carrier that modulates PWM data, in Hz. + +Description +=========== + +This ioctl sets the upper range of carrier frequency that will be recognized +by the IR receiver. + +.. note:: + + To set a range use :ref:`LIRC_SET_REC_CARRIER_RANGE + <LIRC_SET_REC_CARRIER_RANGE>` with the lower bound first and later call + :ref:`LIRC_SET_REC_CARRIER <LIRC_SET_REC_CARRIER>` with the upper bound. + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc-set-rec-carrier.rst new file +48 -0
48 lines not on this page · raw message
Documentation/media/uapi/rc/lirc-set-send-carrier.rst new file +43 -0
43 lines not on this page · raw message
Documentation/media/uapi/rc/lirc_device_interface.rst +3 -0
@@ -19,4 +19,7 @@ LIRC Device Interface lirc-set-send-duty-cycle lirc-get-timeout lirc-get-length + lirc-set-rec-carrier + lirc-set-rec-carrier-range + lirc-set-send-carrier lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -18
@@ -54,13 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_SEND_CARRIER: -.. _LIRC_SET_REC_CARRIER: - -``LIRC_SET_{SEND,REC}_CARRIER`` - - Set send/receive carrier (in Hz). - .. _LIRC_SET_TRANSMITTER_MASK: ``LIRC_SET_TRANSMITTER_MASK``
@@ -99,17 +92,6 @@ device can rely on working with the default settings initially. press on, the driver will send ``LIRC_MODE2_FREQUENCY`` packets. By default this should be turned off. - -.. _LIRC_SET_REC_CARRIER_RANGE: - -``LIRC_SET_REC_CARRIER_RANGE`` - - To set a range use - ``LIRC_SET_REC_CARRIER_RANGE`` - with the lower bound first and later - ``LIRC_SET_REC_CARRIER`` with the upper - bound. - .. _LIRC_SET_WIDEBAND_RECEIVER: ``LIRC_SET_WIDEBAND_RECEIVER``
Signature · 1 line
2.7.4
PATCH 14/20 doc-rst: document LIRC_SET_TRANSMITTER_MASK
In reply to Mauro Carvalho ChehabAdd proper documentation for this ioctl, providing some additional information about its usage.
--- .../media/uapi/rc/lirc-set-transmitter-mask.rst | 53 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 10 ---- 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst
Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst new file +53 -0
@@ -0,0 +1,53 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_transmitter_mask: + +******************************* +ioctl LIRC_SET_TRANSMITTER_MASK +******************************* + +Name +==== + +LIRC_SET_TRANSMITTER_MASK - Enables send codes on a given set of transmitters + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *mask ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_TRANSMITTER_MASK + +``mask`` + Mask with channels to enable tx. Channel 0 is the least significant bit. + + +Description +=========== + +Some IR TX devices have multiple output channels, in such case, +:ref:`LIRC_CAN_SET_TRANSMITTER_MASK <LIRC-CAN-SET-TRANSMITTER-MASK>` is +returned via :ref:`LIRC_GET_FEATURES` and this ioctl sets what channels will +send IR codes. + +This ioctl enables the given set of transmitters. The first transmitter is +encoded by the least significant bit and so on. + +When an invalid bit mask is given, i.e. a bit is set, even though the device +does not have so many transitters, then this ioctl returns the number of +available transitters and does nothing otherwise. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -22,4 +22,5 @@ LIRC Device Interface lirc-set-rec-carrier lirc-set-rec-carrier-range lirc-set-send-carrier + lirc-set-transmitter-mask lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -10
@@ -54,16 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_TRANSMITTER_MASK: - -``LIRC_SET_TRANSMITTER_MASK`` - - This enables the given set of transmitters. The first transmitter is - encoded by the least significant bit, etc. When an invalid bit mask - is given, i.e. a bit is set, even though the device does not have so - many transitters, then this ioctl returns the number of available - transitters and does nothing otherwise. - .. _LIRC_SET_REC_TIMEOUT: ``LIRC_SET_REC_TIMEOUT``
Signature · 1 line
2.7.4
PATCH 15/20 doc-rst: document LIRC_SET_REC_TIMEOUT
In reply to Mauro Carvalho ChehabAdd a separate page for this ioctl and adds the cross-references.
--- .../media/uapi/rc/lirc-set-rec-timeout.rst | 52 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 11 ----- 3 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-timeout.rst
Documentation/media/uapi/rc/lirc-set-rec-timeout.rst new file +52 -0
@@ -0,0 +1,52 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_rec_timeout: + +************************** +ioctl LIRC_SET_REC_TIMEOUT +************************** + +Name +==== + +LIRC_SET_REC_TIMEOUT - sets the integer value for IR inactivity timeout. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *timeout ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_REC_TIMEOUT + +``timeout`` + Timeout, in microseconds. + + +Description +=========== + +Sets the integer value for IR inactivity timeout. + +If supported by the hardware, setting it to 0 disables all hardware timeouts +and data should be reported as soon as possible. If the exact value +cannot be set, then the next possible value _greater_ than the +given value should be set. + +.. note:: + + The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -18,6 +18,7 @@ LIRC Device Interface lirc-get-rec-resolution lirc-set-send-duty-cycle lirc-get-timeout + lirc-set-rec-timeout lirc-get-length lirc-set-rec-carrier lirc-set-rec-carrier-range
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -11
@@ -54,17 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_REC_TIMEOUT: - -``LIRC_SET_REC_TIMEOUT`` - - Sets the integer value for IR inactivity timeout (cf. - ``LIRC_GET_MIN_TIMEOUT`` and ``LIRC_GET_MAX_TIMEOUT).`` A value of 0 - (if supported by the hardware) disables all hardware timeouts and - data should be reported as soon as possible. If the exact value - cannot be set, then the next possible value _greater_ than the - given value should be set. - .. _LIRC_SET_REC_TIMEOUT_REPORTS: ``LIRC_SET_REC_TIMEOUT_REPORTS``
Signature · 1 line
2.7.4
PATCH 16/20 doc-rst: document LIRC_SET_REC_TIMEOUT_REPORTS
In reply to Mauro Carvalho ChehabAdd a separate page for this ioctl and improve its documentation.
--- .../media/uapi/rc/lirc-set-rec-timeout-reports.rst | 49 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 8 ---- 3 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst
Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst new file +49 -0
@@ -0,0 +1,49 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_rec_timeout_reports: + +********************************** +ioctl LIRC_SET_REC_TIMEOUT_REPORTS +********************************** + +Name +==== + +LIRC_SET_REC_TIMEOUT_REPORTS - enable or disable timeout reports for IR receive + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_REC_TIMEOUT_REPORTS + +``enable`` + enable = 1 means enable timeout report, enable = 0 means disable timeout + reports. + + +Description +=========== + +Enable or disable timeout reports for IR receive. By default, timeout reports +should be turned off. + +.. note:: + + This ioctl is only valid for :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -24,4 +24,5 @@ LIRC Device Interface lirc-set-rec-carrier-range lirc-set-send-carrier lirc-set-transmitter-mask + lirc-set-rec-timeout-reports lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -8
@@ -54,14 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_REC_TIMEOUT_REPORTS: - -``LIRC_SET_REC_TIMEOUT_REPORTS`` - - Enable (1) or disable (0) timeout reports in ``LIRC_MODE_MODE2.`` By - default, timeout reports should be turned off. - - .. _LIRC_SET_MEASURE_CARRIER_MODE: .. _lirc-mode2-frequency:
Signature · 1 line
2.7.4
PATCH 17/20 doc-rst: add documentation for LIRC_SET_MEASURE_CARRIER_MODE
In reply to Mauro Carvalho ChehabPlace documentation for this ioctl on its own page.
--- .../uapi/rc/lirc-set-measure-carrier-mode.rst | 48 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 9 ---- 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst
Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst new file +48 -0
@@ -0,0 +1,48 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_measure_carrier_mode: + +*********************************** +ioctl LIRC_SET_MEASURE_CARRIER_MODE +*********************************** + +Name +==== + +LIRC_SET_MEASURE_CARRIER_MODE - enable or disable measure mode + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_MEASURE_CARRIER_MODE + +``enable`` + enable = 1 means enable measure mode, enable = 0 means disable measure + mode. + + +Description +=========== + +.. _lirc-mode2-frequency: + +Enable or disable measure mode. If enabled, from the next key +press on, the driver will send ``LIRC_MODE2_FREQUENCY`` packets. By +default this should be turned off. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -25,4 +25,5 @@ LIRC Device Interface lirc-set-send-carrier lirc-set-transmitter-mask lirc-set-rec-timeout-reports + lirc-set-measure-carrier-mode lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -9
@@ -54,15 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_MEASURE_CARRIER_MODE: -.. _lirc-mode2-frequency: - -``LIRC_SET_MEASURE_CARRIER_MODE`` - - Enable (1)/disable (0) measure mode. If enabled, from the next key - press on, the driver will send ``LIRC_MODE2_FREQUENCY`` packets. By - default this should be turned off. - .. _LIRC_SET_WIDEBAND_RECEIVER: ``LIRC_SET_WIDEBAND_RECEIVER``
Signature · 1 line
2.7.4
PATCH 18/20 doc-rst: document LIRC_SET_WIDEBAND_RECEIVER
In reply to Mauro Carvalho ChehabPut documentation for this ioctl on a separate page and improve it.
--- .../media/uapi/rc/lirc-set-wideband-receiver.rst | 56 ++++++++++++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 + Documentation/media/uapi/rc/lirc_ioctl.rst | 19 -------- 3 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst
Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst new file +56 -0
@@ -0,0 +1,56 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_set_wideband_receiver: + +******************************** +ioctl LIRC_SET_WIDEBAND_RECEIVER +******************************** + +Name +==== + +LIRC_SET_WIDEBAND_RECEIVER - enable wide band receiver. + +Synopsis +======== + +.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) + +Arguments +========= + +``fd`` + File descriptor returned by open(). + +``request`` + LIRC_SET_WIDEBAND_RECEIVER + +``enable`` + enable = 1 means enable wideband receiver, enable = 0 means disable + wideband receiver. + + +Description +=========== + +Some receivers are equipped with special wide band receiver which is +intended to be used to learn output of existing remote. This ioctl +allows enabling or disabling it. + +This might be useful of receivers that have otherwise narrow band receiver +that prevents them to be used with some remotes. Wide band receiver might +also be more precise. On the other hand its disadvantage it usually +reduced range of reception. + +.. note:: Wide band receiver might be implictly enabled if you enable + carrier reports. In that case it will be disabled as soon as you disable + carrier reports. Trying to disable wide band receiver while carrier + reports are active will do nothing. + + +Return Value +============ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc_device_interface.rst +1 -0
@@ -26,4 +26,5 @@ LIRC Device Interface lirc-set-transmitter-mask lirc-set-rec-timeout-reports lirc-set-measure-carrier-mode + lirc-set-wideband-receiver lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst +0 -19
@@ -54,25 +54,6 @@ device can rely on working with the default settings initially. Set send/receive mode. Largely obsolete for send, as only ``LIRC_MODE_PULSE`` is supported. -.. _LIRC_SET_WIDEBAND_RECEIVER: - -``LIRC_SET_WIDEBAND_RECEIVER`` - - Some receivers are equipped with special wide band receiver which is - intended to be used to learn output of existing remote. Calling that - ioctl with (1) will enable it, and with (0) disable it. This might - be useful of receivers that have otherwise narrow band receiver that - prevents them to be used with some remotes. Wide band receiver might - also be more precise On the other hand its disadvantage it usually - reduced range of reception. - - .. note:: Wide band receiver might be - implictly enabled if you enable carrier reports. In that case it - will be disabled as soon as you disable carrier reports. Trying to - disable wide band receiver while carrier reports are active will do - nothing. - - .. _lirc_dev_errors: Return Value
Signature · 1 line
2.7.4
PATCH 19/20 doc-rst: Document LIRC set mode ioctls
In reply to Mauro Carvalho ChehabAdd LIRC_SET_[REC|SEND]_MODE ioctls to the corresponding GET functions, and put all LIRC modes altogether.
As now everything is already documented on its own ioctl pages, get rid of lirc_ioctl.rst.
--- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 32 +++-------- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 17 +++--- Documentation/media/uapi/rc/lirc_dev_intro.rst | 34 ++++++++++++ .../media/uapi/rc/lirc_device_interface.rst | 1 - Documentation/media/uapi/rc/lirc_ioctl.rst | 64 ---------------------- 5 files changed, 50 insertions(+), 98 deletions(-) delete mode 100644 Documentation/media/uapi/rc/lirc_ioctl.rst
Documentation/media/uapi/rc/lirc-get-rec-mode.rst +9 -23
@@ -1,15 +1,16 @@ .. -*- coding: utf-8; mode: rst -*- .. _lirc_get_rec_mode: +.. _lirc_set_rec_mode: -*********************** -ioctl LIRC_GET_REC_MODE -*********************** +********************************************** +ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE +********************************************** Name ==== -LIRC_GET_REC_MODE - Get supported receive modes. +LIRC_GET_REC_MODE/LIRC_GET_REC_MODE - Get/set supported receive modes. Synopsis ========
@@ -23,7 +24,7 @@ Arguments File descriptor returned by open(). ``request`` - LIRC_GET_REC_MODE + LIRC_GET_REC_MODE or LIRC_GET_REC_MODE ``rx_modes`` Bitmask with the supported transmit modes.
@@ -31,24 +32,9 @@ Arguments Description =========== -Get supported receive modes. - -Supported receive modes -======================= - -.. _lirc-mode-mode2: - -``LIRC_MODE_MODE2`` - - The driver returns a sequence of pulse and space codes to userspace. - -.. _lirc-mode-lirccode: - -``LIRC_MODE_LIRCCODE`` - - The IR signal is decoded internally by the receiver. The LIRC interface - returns the scancode as an integer value. This is the usual mode used - by several TV media cards. +Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` +and :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` are supported for IR +receive. Return Value
Documentation/media/uapi/rc/lirc-get-send-mode.rst +7 -10
@@ -1,15 +1,16 @@ .. -*- coding: utf-8; mode: rst -*- .. _lirc_get_send_mode: +.. _lirc_set_send_mode: -************************ -ioctl LIRC_GET_SEND_MODE -************************ +************************************************ +ioctls LIRC_GET_SEND_MODE and LIRC_SET_SEND_MODE +************************************************ Name ==== -LIRC_GET_SEND_MODE - Get supported transmit mode. +LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set supported transmit mode. Synopsis ========
@@ -32,13 +33,9 @@ Arguments Description =========== -Get supported transmit mode. +Get/set supported transmit mode. -.. _lirc-mode-pulse: - -Currently, only ``LIRC_MODE_PULSE`` is supported by lircd on TX. On -puse mode, a sequence of pulse/space integer values are written to the -lirc device using :Ref:`lirc-write`. +Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` is supported by for IR send. Return Value ============
Documentation/media/uapi/rc/lirc_dev_intro.rst +34 -0
@@ -26,3 +26,37 @@ What you should see for a chardev: $ ls -l /dev/lirc* crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0 + +********** +LIRC modes +********** + +LIRC supports some modes of receiving and sending IR codes, as shown +on the following table. + +.. _lirc-mode-mode2: + +``LIRC_MODE_MODE2`` + + The driver returns a sequence of pulse and space codes to userspace. + + This mode is used only for IR receive. + +.. _lirc-mode-lirccode: + +``LIRC_MODE_LIRCCODE`` + + The IR signal is decoded internally by the receiver. The LIRC interface + returns the scancode as an integer value. This is the usual mode used + by several TV media cards. + + This mode is used only for IR receive. + +.. _lirc-mode-pulse: + +``LIRC_MODE_PULSE`` + + On puse mode, a sequence of pulse/space integer values are written to the + lirc device using :Ref:`lirc-write`. + + This mode is used only for IR send.
Documentation/media/uapi/rc/lirc_device_interface.rst +0 -1
@@ -27,4 +27,3 @@ LIRC Device Interface lirc-set-rec-timeout-reports lirc-set-measure-carrier-mode lirc-set-wideband-receiver - lirc_ioctl
Documentation/media/uapi/rc/lirc_ioctl.rst deleted +0 -64
64 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 20/20 doc-rst: reorganize LIRC ReST files
In reply to Mauro Carvalho ChehabReorganize the LIRC rst files, using "-" instead of "_" on their names, and creating a separate chapter for syscalls.
---
.../uapi/rc/{lirc_dev_intro.rst => lirc-dev-intro.rst} | 0
Documentation/media/uapi/rc/lirc-dev.rst | 14 ++++++++++++++
.../uapi/rc/{lirc_device_interface.rst => lirc-func.rst} | 11 +++++------
.../media/uapi/rc/{lirc_read.rst => lirc-read.rst} | 8 ++++----
.../media/uapi/rc/{lirc_write.rst => lirc-write.rst} | 0
Documentation/media/uapi/rc/remote_controllers.rst | 3 +--
6 files changed, 24 insertions(+), 12 deletions(-)
rename Documentation/media/uapi/rc/{lirc_dev_intro.rst => lirc-dev-intro.rst} (100%)
create mode 100644 Documentation/media/uapi/rc/lirc-dev.rst
rename Documentation/media/uapi/rc/{lirc_device_interface.rst => lirc-func.rst} (81%)
rename Documentation/media/uapi/rc/{lirc_read.rst => lirc-read.rst} (83%)
rename Documentation/media/uapi/rc/{lirc_write.rst => lirc-write.rst} (100%)Documentation/media/uapi/rc/lirc-dev-intro.rst renamed from Documentation/media/uapi/rc/lirc_dev_intro.rst +0 -0
Documentation/media/uapi/rc/lirc-dev.rst new file +14 -0
@@ -0,0 +1,14 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_dev: + +LIRC Device Interface +===================== + + +.. toctree:: + :maxdepth: 1 + + lirc-dev-intro + lirc-func + lirc-header
Documentation/media/uapi/rc/lirc-func.rst renamed from Documentation/media/uapi/rc/lirc_device_interface.rst +5 -6
@@ -1,17 +1,16 @@ .. -*- coding: utf-8; mode: rst -*- -.. _lirc_dev: +.. _lirc_func: -LIRC Device Interface -===================== +LIRC Function Reference +======================= .. toctree:: :maxdepth: 1 - lirc_dev_intro - lirc_read - lirc_write + lirc-read + lirc-write lirc-get-features lirc-get-send-mode lirc-get-rec-mode
Documentation/media/uapi/rc/lirc-read.rst renamed from Documentation/media/uapi/rc/lirc_read.rst +4 -4
@@ -44,10 +44,10 @@ is greater than ``SSIZE_MAX``, the result is unspecified. The lircd userspace daemon reads raw IR data from the LIRC chardev. The exact format of the data depends on what modes a driver supports, and what mode has been selected. lircd obtains supported modes and sets the -active mode via the ioctl interface, detailed at :ref:`lirc_ioctl`. -The generally preferred mode is LIRC_MODE_MODE2, in which packets -containing an int value describing an IR signal are read from the -chardev. +active mode via the ioctl interface, detailed at :ref:`lirc_func`. +The generally preferred mode for receive is +:ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`, in which packets containing an +int value describing an IR signal are read from the chardev. See also `http://www.lirc.org/html/technical.html <http://www.lirc.org/html/technical.html>`__
Documentation/media/uapi/rc/lirc-write.rst renamed from Documentation/media/uapi/rc/lirc_write.rst +0 -0
Documentation/media/uapi/rc/remote_controllers.rst +1 -2
@@ -23,8 +23,7 @@ Remote Controllers rc-sysfs-nodes rc-tables rc-table-change - lirc_device_interface - lirc-header + lirc-dev **********************
Signature · 1 line
2.7.4