History

[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.

Mauro Carvalho Chehab committed 11 years ago

Commit be14c5c1 parent 326ab272 files · +66 −49Browse files

Showing the changes to include/media/lirc_dev.h (1 of 2 files). Show all

Unified · Split

include/media/lirc_dev.h+65−49
@@ -118,6 +118,71 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 117 unmodified lines
118118 return ret;
119119 }
120120
121+/**
122+ * struct lirc_driver - Defines the parameters on a LIRC driver
123+ *
124+ * @name: this string will be used for logs
125+ *
126+ * @minor: indicates minor device (/dev/lirc) number for
127+ * registered driver if caller fills it with negative
128+ * value, then the first free minor number will be used
129+ * (if available).
130+ *
131+ * @code_length: length of the remote control key code expressed in bits.
132+ *
133+ * @buffer_size: Number of FIFO buffers with @chunk_size size. If zero,
134+ * creates a buffer with BUFLEN size (16 bytes).
135+ *
136+ * @sample_rate: if zero, the device will wait for an event with a new
137+ * code to be parsed. Otherwise, specifies the sample
138+ * rate for polling. Value should be between 0
139+ * and HZ. If equal to HZ, it would mean one polling per
140+ * second.
141+ *
142+ * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
143+ * LIRC_CAN_*, as defined at include/media/lirc.h.
144+ *
145+ * @chunk_size: Size of each FIFO buffer.
146+ *
147+ * @data: it may point to any driver data and this pointer will
148+ * be passed to all callback functions.
149+ *
150+ * @min_timeout: Minimum timeout for record. Valid only if
151+ * LIRC_CAN_SET_REC_TIMEOUT is defined.
152+ *
153+ * @max_timeout: Maximum timeout for record. Valid only if
154+ * LIRC_CAN_SET_REC_TIMEOUT is defined.
155+ *
156+ * @add_to_buf: add_to_buf will be called after specified period of the
157+ * time or triggered by the external event, this behavior
158+ * depends on value of the sample_rate this function will
159+ * be called in user context. This routine should return
160+ * 0 if data was added to the buffer and -ENODATA if none
161+ * was available. This should add some number of bits
162+ * evenly divisible by code_length to the buffer.
163+ *
164+ * @rbuf: if not NULL, it will be used as a read buffer, you will
165+ * have to write to the buffer by other means, like irq's
166+ * (see also lirc_serial.c).
167+ *
168+ * @set_use_inc: set_use_inc will be called after device is opened
169+ *
170+ * @set_use_dec: set_use_dec will be called after device is closed
171+ *
172+ * @rdev: Pointed to struct rc_dev associated with the LIRC
173+ * device.
174+ *
175+ * @fops: file_operations for drivers which don't fit the current
176+ * driver model.
177+ * Some ioctl's can be directly handled by lirc_dev if the
178+ * driver's ioctl function is NULL or if it returns
179+ * -ENOIOCTLCMD (see also lirc_serial.c).
180+ *
181+ * @dev: pointer to the struct device associated with the LIRC
182+ * device.
183+ *
184+ * @owner: the module owning this struct
185+ */
121186 struct lirc_driver {
122187 char name[40];
123188 int minor;
@@ -141,55 +206,6 @@ struct lirc_driver { · 17 unmodified lines
141206 struct module *owner;
142207 };
143208
144−/* name:
145− * this string will be used for logs
146− *
147− * minor:
148− * indicates minor device (/dev/lirc) number for registered driver
149− * if caller fills it with negative value, then the first free minor
150− * number will be used (if available)
151− *
152− * code_length:
153− * length of the remote control key code expressed in bits
154− *
155− * sample_rate:
156− *
157− * data:
158− * it may point to any driver data and this pointer will be passed to
159− * all callback functions
160− *
161− * add_to_buf:
162− * add_to_buf will be called after specified period of the time or
163− * triggered by the external event, this behavior depends on value of
164− * the sample_rate this function will be called in user context. This
165− * routine should return 0 if data was added to the buffer and
166− * -ENODATA if none was available. This should add some number of bits
167− * evenly divisible by code_length to the buffer
168− *
169− * rbuf:
170− * if not NULL, it will be used as a read buffer, you will have to
171− * write to the buffer by other means, like irq's (see also
172− * lirc_serial.c).
173− *
174− * set_use_inc:
175− * set_use_inc will be called after device is opened
176− *
177− * set_use_dec:
178− * set_use_dec will be called after device is closed
179− *
180− * fops:
181− * file_operations for drivers which don't fit the current driver model.
182− *
183− * Some ioctl's can be directly handled by lirc_dev if the driver's
184− * ioctl function is NULL or if it returns -ENOIOCTLCMD (see also
185− * lirc_serial.c).
186− *
187− * owner:
188− * the module owning this struct
189− *
190− */
191−
192−
193209 /* following functions can be called ONLY from user context
194210 *
195211 * returns negative value on error or minor number