summaryrefslogtreecommitdiff
path: root/include/media/lirc_dev.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-05 19:35:37 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-05 19:49:03 +0300
commitbe14c5cd592b6a268c825ca78ff7be758bab316d (patch)
treeb80698fb322e98c80792d67d7e68b20e4fcd3eb7 /include/media/lirc_dev.h
parent326ab27bbddf053e6b578fde312b5069aa55b2ab (diff)
downloadlinux-be14c5cd592b6a268c825ca78ff7be758bab316d.tar.xz
[media] DocBook: Convert struct lirc_driver to doc-nano format
The struct lirc_driver is already documented, but on some internal format. Convert it to Kernel doc-nano format and add documentation for some additional parameters that are also present at the structure. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media/lirc_dev.h')
-rw-r--r--include/media/lirc_dev.h114
1 files changed, 65 insertions, 49 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
index 05e7ad5d2c8b..abb92f879ba2 100644
--- a/include/media/lirc_dev.h
+++ b/include/media/lirc_dev.h
@@ -118,6 +118,71 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
return ret;
}
+/**
+ * struct lirc_driver - Defines the parameters on a LIRC driver
+ *
+ * @name: this string will be used for logs
+ *
+ * @minor: indicates minor device (/dev/lirc) number for
+ * registered driver if caller fills it with negative
+ * value, then the first free minor number will be used
+ * (if available).
+ *
+ * @code_length: length of the remote control key code expressed in bits.
+ *
+ * @buffer_size: Number of FIFO buffers with @chunk_size size. If zero,
+ * creates a buffer with BUFLEN size (16 bytes).
+ *
+ * @sample_rate: if zero, the device will wait for an event with a new
+ * code to be parsed. Otherwise, specifies the sample
+ * rate for polling. Value should be between 0
+ * and HZ. If equal to HZ, it would mean one polling per
+ * second.
+ *
+ * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
+ * LIRC_CAN_*, as defined at include/media/lirc.h.
+ *
+ * @chunk_size: Size of each FIFO buffer.
+ *
+ * @data: it may point to any driver data and this pointer will
+ * be passed to all callback functions.
+ *
+ * @min_timeout: Minimum timeout for record. Valid only if
+ * LIRC_CAN_SET_REC_TIMEOUT is defined.
+ *
+ * @max_timeout: Maximum timeout for record. Valid only if
+ * LIRC_CAN_SET_REC_TIMEOUT is defined.
+ *
+ * @add_to_buf: add_to_buf will be called after specified period of the
+ * time or triggered by the external event, this behavior
+ * depends on value of the sample_rate this function will
+ * be called in user context. This routine should return
+ * 0 if data was added to the buffer and -ENODATA if none
+ * was available. This should add some number of bits
+ * evenly divisible by code_length to the buffer.
+ *
+ * @rbuf: if not NULL, it will be used as a read buffer, you will
+ * have to write to the buffer by other means, like irq's
+ * (see also lirc_serial.c).
+ *
+ * @set_use_inc: set_use_inc will be called after device is opened
+ *
+ * @set_use_dec: set_use_dec will be called after device is closed
+ *
+ * @rdev: Pointed to struct rc_dev associated with the LIRC
+ * device.
+ *
+ * @fops: file_operations for drivers which don't fit the current
+ * driver model.
+ * Some ioctl's can be directly handled by lirc_dev if the
+ * driver's ioctl function is NULL or if it returns
+ * -ENOIOCTLCMD (see also lirc_serial.c).
+ *
+ * @dev: pointer to the struct device associated with the LIRC
+ * device.
+ *
+ * @owner: the module owning this struct
+ */
struct lirc_driver {
char name[40];
int minor;
@@ -141,55 +206,6 @@ struct lirc_driver {
struct module *owner;
};
-/* name:
- * this string will be used for logs
- *
- * minor:
- * indicates minor device (/dev/lirc) number for registered driver
- * if caller fills it with negative value, then the first free minor
- * number will be used (if available)
- *
- * code_length:
- * length of the remote control key code expressed in bits
- *
- * sample_rate:
- *
- * data:
- * it may point to any driver data and this pointer will be passed to
- * all callback functions
- *
- * add_to_buf:
- * add_to_buf will be called after specified period of the time or
- * triggered by the external event, this behavior depends on value of
- * the sample_rate this function will be called in user context. This
- * routine should return 0 if data was added to the buffer and
- * -ENODATA if none was available. This should add some number of bits
- * evenly divisible by code_length to the buffer
- *
- * rbuf:
- * if not NULL, it will be used as a read buffer, you will have to
- * write to the buffer by other means, like irq's (see also
- * lirc_serial.c).
- *
- * set_use_inc:
- * set_use_inc will be called after device is opened
- *
- * set_use_dec:
- * set_use_dec will be called after device is closed
- *
- * fops:
- * file_operations for drivers which don't fit the current driver model.
- *
- * Some ioctl's can be directly handled by lirc_dev if the driver's
- * ioctl function is NULL or if it returns -ENOIOCTLCMD (see also
- * lirc_serial.c).
- *
- * owner:
- * the module owning this struct
- *
- */
-
-
/* following functions can be called ONLY from user context
*
* returns negative value on error or minor number