• Home
  • Raw
  • Download

Lines Matching +full:hardware +full:- +full:driven

1 .. SPDX-License-Identifier: GPL-2.0
7 hardware. It is designed to handle a multiple types of hardware (receivers,
15 ----------------
33 ---------------------
35 The struct cec_adapter represents the CEC adapter hardware. It is created by
53 will be stored in adap->priv and can be used by the adapter ops.
61 capabilities of the hardware and which parts are to be handled
95 Implementing the Low-Level CEC Adapter
96 --------------------------------------
98 The following low-level adapter operations have to be implemented in
103 .. code-block:: none
107 /* Low-level callbacks */
123 /* High-level callback */
127 These low-level ops deal with various aspects of controlling the CEC adapter
128 hardware. They are all called with the mutex adap->lock held.
131 To enable/disable the hardware::
135 This callback enables or disables the CEC hardware. Enabling the CEC hardware
139 hardware is enabled. CEC drivers should not set CEC_CAP_NEEDS_HPD unless
140 the hardware design requires that as this will make it impossible to wake
152 that are not for us. Not all hardware supports this and this function is only
154 (some hardware may always be in 'monitor all' mode).
164 changes. Not all hardware supports this and this function is only called if
166 (some hardware may always be in 'monitor pin' mode).
178 should return -ENXIO. Once a logical address is programmed the CEC hardware
203 a new message for the same initiator. Most hardware will handle this
210 To pass on the result of a canceled non-blocking transmit::
216 non-blocking transmit with sequence number msg->sequence. This is
218 hardware never signaled that the transmit finished), or the transmit
223 To log the current CEC hardware status::
227 This optional callback can be used to show the status of the CEC hardware.
239 driven) by calling into the framework in the following situations:
271 or LOW_DRIVE if the hardware cannot differentiate or something
272 else entirely. Some hardware only supports OK and FAIL as the
279 Should only be set by the driver if it has hardware support for
282 since the hardware did that already.
284 The hardware must be able to differentiate between OK, NACK and 'something
289 hardware retry can just set the counter corresponding to the transmit error
290 to 1, if the hardware does support retry then either set these counters to
291 0 if the hardware provides no feedback of which errors occurred and how many
292 times, or fill in the correct values as reported by the hardware.
295 if there is one pending in the queue. So make sure that the hardware is in
299 hardware never retries, so the transmit is always for just a single
311 ----------------------------------
313 Typically the CEC hardware provides interrupts that signal when a transmit
323 ----------------------------------------------
328 .. code-block:: none
331 /* Low-level callbacks */
338 /* High-level CEC message callback */
342 If both callbacks are set, then an ``error-inj`` file will appear in debugfs.
353 This ensures that you can always do ``echo clear >error-inj`` to clear any error
354 injections without having to know the details of the driver-specific commands.
356 Note that the output of ``error-inj`` shall be valid as input to ``error-inj``.
359 .. code-block:: none
361 $ cat error-inj >einj.txt
362 $ cat einj.txt >error-inj
372 The second callback will parse commands written to the ``error-inj`` file::
378 are no embedded newlines) and it is 0-terminated. The callback is free to
384 Implementing the High-Level CEC Adapter
385 ---------------------------------------
387 The low-level operations drive the hardware, the high-level operations are
388 CEC protocol driven. The high-level callbacks are called without the adap->lock
389 mutex being held. The following high-level callbacks are available:
391 .. code-block:: none
394 /* Low-level callbacks */
400 /* High-level CEC message callback */
421 -ENOMSG, otherwise the CEC framework assumes it processed this message and
426 -----------------------
440 Change the physical address. This function will set adap->phys_addr and
468 log_addrs->num_log_addrs set to 0. The block argument is ignored when
474 -----------------
476 Most CEC hardware operates on full CEC messages where the software provides
477 the message and the hardware handles the low-level CEC protocol. But some
478 hardware only drives the CEC pin and software has to handle the low-level
481 Note that due to the close-to-realtime requirements it can never be guaranteed
486 One advantage of this low-level implementation is that it can be used as
490 .. kernel-doc:: include/media/cec-pin.h
493 ----------------------
502 .. kernel-doc:: include/media/cec-notifier.h