@@ -36,8 +36,9 @@ The struct cec_adapter represents the CEC adapter hardware. It is created by
3636calling cec_allocate_adapter() and deleted by calling cec_delete_adapter():
3737
3838.. c :function ::
39- struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv,
40- const char *name, u32 caps, u8 available_las);
39+ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, \
40+ void *priv, const char *name, \
41+ u32 caps, u8 available_las);
4142
4243.. c :function ::
4344 void cec_delete_adapter(struct cec_adapter *adap);
@@ -74,7 +75,8 @@ To register the /dev/cecX device node and the remote control device (if
7475CEC_CAP_RC is set) you call:
7576
7677.. c :function ::
77- int cec_register_adapter(struct cec_adapter *adap, struct device *parent);
78+ int cec_register_adapter(struct cec_adapter *adap, \
79+ struct device *parent);
7880
7981where parent is the parent device.
8082
@@ -123,9 +125,8 @@ The seven low-level ops deal with various aspects of controlling the CEC adapter
123125hardware:
124126
125127
126- To enable/disable the hardware:
128+ To enable/disable the hardware::
127129
128- .. c :function ::
129130 int (*adap_enable)(struct cec_adapter *adap, bool enable);
130131
131132This callback enables or disables the CEC hardware. Enabling the CEC hardware
@@ -137,9 +138,8 @@ state of the CEC adapter after calling cec_allocate_adapter() is disabled.
137138Note that adap_enable must return 0 if enable is false.
138139
139140
140- To enable/disable the 'monitor all' mode:
141+ To enable/disable the 'monitor all' mode::
141142
142- .. c :function ::
143143 int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable);
144144
145145If enabled, then the adapter should be put in a mode to also monitor messages
@@ -150,9 +150,8 @@ called if the CEC_CAP_MONITOR_ALL capability is set. This callback is optional
150150Note that adap_monitor_all_enable must return 0 if enable is false.
151151
152152
153- To enable/disable the 'monitor pin' mode:
153+ To enable/disable the 'monitor pin' mode::
154154
155- .. c :function ::
156155 int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable);
157156
158157If enabled, then the adapter should be put in a mode to also monitor CEC pin
@@ -163,9 +162,8 @@ the CEC_CAP_MONITOR_PIN capability is set. This callback is optional
163162Note that adap_monitor_pin_enable must return 0 if enable is false.
164163
165164
166- To program a new logical address:
165+ To program a new logical address::
167166
168- .. c :function ::
169167 int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr);
170168
171169If logical_addr == CEC_LOG_ADDR_INVALID then all programmed logical addresses
@@ -177,9 +175,8 @@ can receive directed messages to that address.
177175Note that adap_log_addr must return 0 if logical_addr is CEC_LOG_ADDR_INVALID.
178176
179177
180- To transmit a new message:
178+ To transmit a new message::
181179
182- .. c :function ::
183180 int (*adap_transmit)(struct cec_adapter *adap, u8 attempts,
184181 u32 signal_free_time, struct cec_msg *msg);
185182
@@ -196,17 +193,15 @@ The CEC_FREE_TIME_TO_USEC macro can be used to convert signal_free_time to
196193microseconds (one data bit period is 2.4 ms).
197194
198195
199- To log the current CEC hardware status:
196+ To log the current CEC hardware status::
200197
201- .. c :function ::
202198 void (*adap_status)(struct cec_adapter *adap, struct seq_file *file);
203199
204200This optional callback can be used to show the status of the CEC hardware.
205201The status is available through debugfs: cat /sys/kernel/debug/cec/cecX/status
206202
207- To free any resources when the adapter is deleted:
203+ To free any resources when the adapter is deleted::
208204
209- .. c :function ::
210205 void (*adap_free)(struct cec_adapter *adap);
211206
212207This optional callback can be used to free any resources that might have been
@@ -216,15 +211,14 @@ allocated by the driver. It's called from cec_delete_adapter.
216211Your adapter driver will also have to react to events (typically interrupt
217212driven) by calling into the framework in the following situations:
218213
219- When a transmit finished (successfully or otherwise):
214+ When a transmit finished (successfully or otherwise)::
220215
221- .. c : function ::
222- void cec_transmit_done(struct cec_adapter * adap, u8 status , u8 arb_lost_cnt ,
223- u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt);
216+ void cec_transmit_done(struct cec_adapter *adap, u8 status,
217+ u8 arb_lost_cnt, u8 nack_cnt , u8 low_drive_cnt ,
218+ u8 error_cnt);
224219
225- or:
220+ or::
226221
227- .. c :function ::
228222 void cec_transmit_attempt_done(struct cec_adapter *adap, u8 status);
229223
230224The status can be one of:
@@ -341,17 +335,15 @@ So this must work:
341335 $ cat einj.txt >error-inj
342336
343337 The first callback is called when this file is read and it should show the
344- the current error injection state:
338+ the current error injection state::
345339
346- .. c :function ::
347340 int (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf);
348341
349342It is recommended that it starts with a comment block with basic usage
350343information. It returns 0 for success and an error otherwise.
351344
352- The second callback will parse commands written to the ``error-inj `` file:
345+ The second callback will parse commands written to the ``error-inj `` file::
353346
354- .. c :function ::
355347 bool (*error_inj_parse_line)(struct cec_adapter *adap, char *line);
356348
357349The ``line `` argument points to the start of the command. Any leading
@@ -382,9 +374,8 @@ CEC protocol driven. The following high-level callbacks are available:
382374 };
383375
384376 The received() callback allows the driver to optionally handle a newly
385- received CEC message
377+ received CEC message::
386378
387- .. c :function ::
388379 int (*received)(struct cec_adapter *adap, struct cec_msg *msg);
389380
390381If the driver wants to process a CEC message, then it can implement this
@@ -399,15 +390,14 @@ CEC framework functions
399390CEC Adapter drivers can call the following CEC framework functions:
400391
401392.. c :function ::
402- int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg,
403- bool block);
393+ int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, \
394+ bool block);
404395
405396Transmit a CEC message. If block is true, then wait until the message has been
406397transmitted, otherwise just queue it and return.
407398
408399.. c :function ::
409- void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr,
410- bool block);
400+ void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
411401
412402Change the physical address. This function will set adap->phys_addr and
413403send an event if it has changed. If cec_s_log_addrs() has been called and
@@ -422,15 +412,15 @@ to another valid physical address, then this function will first set the
422412address to CEC_PHYS_ADDR_INVALID before enabling the new physical address.
423413
424414.. c :function ::
425- void cec_s_phys_addr_from_edid(struct cec_adapter *adap,
426- const struct edid *edid);
415+ void cec_s_phys_addr_from_edid(struct cec_adapter *adap, \
416+ const struct edid *edid);
427417
428418A helper function that extracts the physical address from the edid struct
429419and calls cec_s_phys_addr() with that address, or CEC_PHYS_ADDR_INVALID
430420if the EDID did not contain a physical address or edid was a NULL pointer.
431421
432422.. c :function ::
433- int cec_s_log_addrs(struct cec_adapter *adap,
423+ int cec_s_log_addrs(struct cec_adapter *adap, \
434424 struct cec_log_addrs *log_addrs, bool block);
435425
436426Claim the CEC logical addresses. Should never be called if CEC_CAP_LOG_ADDRS
0 commit comments