0sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/driver-api/media/cec-coremodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/pt_BR/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/driver-api/media/cec-coremodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core.rsthKubhsection)}(hhh](htitle)}(hCEC Kernel Supporth]hCEC Kernel Support}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe CEC framework provides a unified kernel interface for use with HDMI CEC hardware. It is designed to handle a multiple types of hardware (receivers, transmitters, USB dongles). The framework also gives the option to decide what to do in the kernel driver and what should be handled by userspace applications. In addition it integrates the remote control passthrough feature into the kernel's remote control framework.h]hXThe CEC framework provides a unified kernel interface for use with HDMI CEC hardware. It is designed to handle a multiple types of hardware (receivers, transmitters, USB dongles). The framework also gives the option to decide what to do in the kernel driver and what should be handled by userspace applications. In addition it integrates the remote control passthrough feature into the kernel’s remote control framework.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hThe CEC Protocolh]hThe CEC Protocol}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hXThe CEC protocol enables consumer electronic devices to communicate with each other through the HDMI connection. The protocol uses logical addresses in the communication. The logical address is strictly connected with the functionality provided by the device. The TV acting as the communication hub is always assigned address 0. The physical address is determined by the physical connection between devices.h]hXThe CEC protocol enables consumer electronic devices to communicate with each other through the HDMI connection. The protocol uses logical addresses in the communication. The logical address is strictly connected with the functionality provided by the device. The TV acting as the communication hub is always assigned address 0. The physical address is determined by the physical connection between devices.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe CEC framework described here is up to date with the CEC 2.0 specification. It is documented in the HDMI 1.4 specification with the new 2.0 bits documented in the HDMI 2.0 specification. But for most of the features the freely available HDMI 1.3a specification is sufficient:h]hXThe CEC framework described here is up to date with the CEC 2.0 specification. It is documented in the HDMI 1.4 specification with the new 2.0 bits documented in the HDMI 2.0 specification. But for most of the features the freely available HDMI 1.3a specification is sufficient:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhttps://www.hdmi.org/spec/indexh]h reference)}(hjh]hhttps://www.hdmi.org/spec/index}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]the-cec-protocolah ]h"]the cec protocolah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCEC Adapter Interfaceh]hCEC Adapter Interface}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hhhhhK!ubh)}(hThe struct cec_adapter represents the CEC adapter hardware. It is created by calling cec_allocate_adapter() and deleted by calling cec_delete_adapter():h]hThe struct cec_adapter represents the CEC adapter hardware. It is created by calling cec_allocate_adapter() and deleted by calling cec_delete_adapter():}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hj<hhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single!cec_allocate_adapter (C function)c.cec_allocate_adapterhNtauh1j[hj<hhhNhNubhdesc)}(hhh](hdesc_signature)}(hstruct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las);h]hdesc_signature_line)}(hstruct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las);h](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1j}hjyhhhhhK&ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjyhhhhhK&ubh)}(hhh]h desc_sig_name)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jcec_allocate_adaptersbc.cec_allocate_adapterasbuh1hhjyhhhhhK&ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhhhK&ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjyhhhhhK&ubh desc_name)}(hcec_allocate_adapterh]j)}(hjh]hcec_allocate_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjyhhhhhK&ubhdesc_parameterlist)}(hZ(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las)h](hdesc_parameter)}(hconst struct cec_adap_ops *opsh](j~)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj~)}(hjh]hstruct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h cec_adap_opsh]h cec_adap_ops}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjQmodnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhjubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hopsh]hops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(h void *privh](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hprivh]hpriv}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hconst char *nameh](j~)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hu32 capsh](h)}(hhh]j)}(hu32h]hu32}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjHmodnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhj?ubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hcapsh]hcaps}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hu8 available_lash](h)}(hhh]j)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h available_lash]h available_las}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1j hjyhhhhhK&ubj)}(h;h]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhhhK&ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jwsphinx_line_type declaratorhjshhhhhK&ubah}(h]jjah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jqhhhK&hjnhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjnhhhhhK&ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jlhhhj<hNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_delete_adapter (C function)c.cec_delete_adapterhNtauh1j[hj<hhhNhNubjm)}(hhh](jr)}(h2void cec_delete_adapter(struct cec_adapter *adap);h]jx)}(h2void cec_delete_adapter(struct cec_adapter *adap);h](j)}(hvoidh]hvoid}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhK+ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhK+ubj)}(hcec_delete_adapterh]j)}(hcec_delete_adapterh]hcec_delete_adapter}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubah}(h]h ](jjeh"]h$]h&]hhuh1jhj$hhhhhK+ubj )}(h(struct cec_adapter *adap)h]j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj`ubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjJsbc.cec_delete_adapterasbuh1hhj`ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj\ubah}(h]h ]h"]h$]h&]hhuh1j hj$hhhhhK+ubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhK+ubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj hhhhhK+ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhhhK+hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhK+ubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j juh1jlhhhj<hNhNubh)}(h@To create an adapter you need to pass the following information:h]h@To create an adapter you need to pass the following information:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj<hhubhdefinition_list)}(hhh](hdefinition_list_item)}(h^ops: adapter operations which are called by the CEC framework and that you have to implement. h](hterm)}(hops:h]hops:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK2hjubh definition)}(hhh]h)}(hXadapter operations which are called by the CEC framework and that you have to implement.h]hXadapter operations which are called by the CEC framework and that you have to implement.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj,ubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhhhK2hjubj)}(hzpriv: will be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer. h](j)}(hpriv:h]hpriv:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK6hjIubj+)}(hhh]h)}(hswill be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer.h]hswill be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hj[ubah}(h]h ]h"]h$]h&]uh1j*hjIubeh}(h]h ]h"]h$]h&]uh1jhhhK6hjhhubj)}(hCname: the name of the CEC adapter. Note: this name will be copied. h](j)}(hname:h]hname:}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK9hjxubj+)}(hhh]h)}(hlock held.h]hThese low-level ops deal with various aspects of controlling the CEC adapter hardware. They are all called with the mutex adap->lock held.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h To enable/disable the hardware::h]hTo enable/disable the hardware:}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(h:int (*adap_enable)(struct cec_adapter *adap, bool enable);h]h:int (*adap_enable)(struct cec_adapter *adap, bool enable);}hj~ sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hXQThis callback enables or disables the CEC hardware. Enabling the CEC hardware means powering it up in a state where no logical addresses are claimed. The physical address will always be valid if CEC_CAP_NEEDS_HPD is set. If that capability is not set, then the physical address can change while the CEC hardware is enabled. CEC drivers should not set CEC_CAP_NEEDS_HPD unless the hardware design requires that as this will make it impossible to wake up displays that pull the HPD low when in standby mode. The initial state of the CEC adapter after calling cec_allocate_adapter() is disabled.h]hXQThis callback enables or disables the CEC hardware. Enabling the CEC hardware means powering it up in a state where no logical addresses are claimed. The physical address will always be valid if CEC_CAP_NEEDS_HPD is set. If that capability is not set, then the physical address can change while the CEC hardware is enabled. CEC drivers should not set CEC_CAP_NEEDS_HPD unless the hardware design requires that as this will make it impossible to wake up displays that pull the HPD low when in standby mode. The initial state of the CEC adapter after calling cec_allocate_adapter() is disabled.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h7Note that adap_enable must return 0 if enable is false.h]h7Note that adap_enable must return 0 if enable is false.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h*To enable/disable the 'monitor all' mode::h]h-To enable/disable the ‘monitor all’ mode:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hFint (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable);h]hFint (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable);}hj sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hXIf enabled, then the adapter should be put in a mode to also monitor messages that are not for us. Not all hardware supports this and this function is only called if the CEC_CAP_MONITOR_ALL capability is set. This callback is optional (some hardware may always be in 'monitor all' mode).h]hX#If enabled, then the adapter should be put in a mode to also monitor messages that are not for us. Not all hardware supports this and this function is only called if the CEC_CAP_MONITOR_ALL capability is set. This callback is optional (some hardware may always be in ‘monitor all’ mode).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hCNote that adap_monitor_all_enable must return 0 if enable is false.h]hCNote that adap_monitor_all_enable must return 0 if enable is false.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h*To enable/disable the 'monitor pin' mode::h]h-To enable/disable the ‘monitor pin’ mode:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hFint (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable);h]hFint (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable);}hj sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hXIf enabled, then the adapter should be put in a mode to also monitor CEC pin changes. Not all hardware supports this and this function is only called if the CEC_CAP_MONITOR_PIN capability is set. This callback is optional (some hardware may always be in 'monitor pin' mode).h]hXIf enabled, then the adapter should be put in a mode to also monitor CEC pin changes. Not all hardware supports this and this function is only called if the CEC_CAP_MONITOR_PIN capability is set. This callback is optional (some hardware may always be in ‘monitor pin’ mode).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hCNote that adap_monitor_pin_enable must return 0 if enable is false.h]hCNote that adap_monitor_pin_enable must return 0 if enable is false.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h"To program a new logical address::h]h!To program a new logical address:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(h@int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr);h]h@int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr);}hj& sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hX^If logical_addr == CEC_LOG_ADDR_INVALID then all programmed logical addresses are to be erased. Otherwise the given logical address should be programmed. If the maximum number of available logical addresses is exceeded, then it should return -ENXIO. Once a logical address is programmed the CEC hardware can receive directed messages to that address.h]hX^If logical_addr == CEC_LOG_ADDR_INVALID then all programmed logical addresses are to be erased. Otherwise the given logical address should be programmed. If the maximum number of available logical addresses is exceeded, then it should return -ENXIO. Once a logical address is programmed the CEC hardware can receive directed messages to that address.}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hNNote that adap_log_addr must return 0 if logical_addr is CEC_LOG_ADDR_INVALID.h]hNNote that adap_log_addr must return 0 if logical_addr is CEC_LOG_ADDR_INVALID.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h)Called when the adapter is unconfigured::h]h(Called when the adapter is unconfigured:}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(h4void (*adap_unconfigured)(struct cec_adapter *adap);h]h4void (*adap_unconfigured)(struct cec_adapter *adap);}hj^ sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hThe adapter is unconfigured. If the driver has to take specific actions after unconfiguration, then that can be done through this optional callback.h]hThe adapter is unconfigured. If the driver has to take specific actions after unconfiguration, then that can be done through this optional callback.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hTo transmit a new message::h]hTo transmit a new message:}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(h|int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg);h]h|int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg);}hj sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hiThis transmits a new message. The attempts argument is the suggested number of attempts for the transmit.h]hiThis transmits a new message. The attempts argument is the suggested number of attempts for the transmit.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXjThe signal_free_time is the number of data bit periods that the adapter should wait when the line is free before attempting to send a message. This value depends on whether this transmit is a retry, a message from a new initiator or a new message for the same initiator. Most hardware will handle this automatically, but in some cases this information is needed.h]hXjThe signal_free_time is the number of data bit periods that the adapter should wait when the line is free before attempting to send a message. This value depends on whether this transmit is a retry, a message from a new initiator or a new message for the same initiator. Most hardware will handle this automatically, but in some cases this information is needed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hxThe CEC_FREE_TIME_TO_USEC macro can be used to convert signal_free_time to microseconds (one data bit period is 2.4 ms).h]hxThe CEC_FREE_TIME_TO_USEC macro can be used to convert signal_free_time to microseconds (one data bit period is 2.4 ms).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h;To pass on the result of a canceled non-blocking transmit::h]h:To pass on the result of a canceled non-blocking transmit:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hyvoid (*adap_nb_transmit_canceled)(struct cec_adapter *adap, const struct cec_msg *msg);h]hyvoid (*adap_nb_transmit_canceled)(struct cec_adapter *adap, const struct cec_msg *msg);}hj sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hXiThis optional callback can be used to obtain the result of a canceled non-blocking transmit with sequence number msg->sequence. This is called if the transmit was aborted, the transmit timed out (i.e. the hardware never signaled that the transmit finished), or the transmit was successful, but the wait for the expected reply was either aborted or it timed out.h]hXiThis optional callback can be used to obtain the result of a canceled non-blocking transmit with sequence number msg->sequence. This is called if the transmit was aborted, the transmit timed out (i.e. the hardware never signaled that the transmit finished), or the transmit was successful, but the wait for the expected reply was either aborted or it timed out.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h(To log the current CEC hardware status::h]h'To log the current CEC hardware status:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hEvoid (*adap_status)(struct cec_adapter *adap, struct seq_file *file);h]hEvoid (*adap_status)(struct cec_adapter *adap, struct seq_file *file);}hj sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hThis optional callback can be used to show the status of the CEC hardware. The status is available through debugfs: cat /sys/kernel/debug/cec/cecX/statush]hThis optional callback can be used to show the status of the CEC hardware. The status is available through debugfs: cat /sys/kernel/debug/cec/cecX/status}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h3To free any resources when the adapter is deleted::h]h2To free any resources when the adapter is deleted:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(h,void (*adap_free)(struct cec_adapter *adap);h]h,void (*adap_free)(struct cec_adapter *adap);}hj" sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hThis optional callback can be used to free any resources that might have been allocated by the driver. It's called from cec_delete_adapter.h]hThis optional callback can be used to free any resources that might have been allocated by the driver. It’s called from cec_delete_adapter.}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hYour adapter driver will also have to react to events (typically interrupt driven) by calling into the framework in the following situations:h]hYour adapter driver will also have to react to events (typically interrupt driven) by calling into the framework in the following situations:}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h6When a transmit finished (successfully or otherwise)::h]h5When a transmit finished (successfully or otherwise):}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hvoid cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt);h]hvoid cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt);}hjZ sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hor::h]hor:}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjN )}(hDvoid cec_transmit_attempt_done(struct cec_adapter *adap, u8 status);h]hDvoid cec_transmit_attempt_done(struct cec_adapter *adap, u8 status);}hjv sbah}(h]h ]h"]h$]h&]hhuh1jM hhhKhj hhubh)}(hThe status can be one of:h]hThe status can be one of:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh](j)}(h/CEC_TX_STATUS_OK: the transmit was successful. h](j)}(hCEC_TX_STATUS_OK:h]hCEC_TX_STATUS_OK:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj+)}(hhh]h)}(hthe transmit was successful.h]hthe transmit was successful.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hCEC_TX_STATUS_ARB_LOST: arbitration was lost: another CEC initiator took control of the CEC line and you lost the arbitration. h](j)}(hCEC_TX_STATUS_ARB_LOST:h]hCEC_TX_STATUS_ARB_LOST:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj+)}(hhh]h)}(hfarbitration was lost: another CEC initiator took control of the CEC line and you lost the arbitration.h]hfarbitration was lost: another CEC initiator took control of the CEC line and you lost the arbitration.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubj)}(hCEC_TX_STATUS_NACK: the message was nacked (for a directed message) or acked (for a broadcast message). A retransmission is needed. h](j)}(hCEC_TX_STATUS_NACK:h]hCEC_TX_STATUS_NACK:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj+)}(hhh]h)}(hothe message was nacked (for a directed message) or acked (for a broadcast message). A retransmission is needed.h]hothe message was nacked (for a directed message) or acked (for a broadcast message). A retransmission is needed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubj)}(hCEC_TX_STATUS_LOW_DRIVE: low drive was detected on the CEC bus. This indicates that a follower detected an error on the bus and requested a retransmission. h](j)}(hCEC_TX_STATUS_LOW_DRIVE:h]hCEC_TX_STATUS_LOW_DRIVE:}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj" ubj+)}(hhh]h)}(hlow drive was detected on the CEC bus. This indicates that a follower detected an error on the bus and requested a retransmission.h]hlow drive was detected on the CEC bus. This indicates that a follower detected an error on the bus and requested a retransmission.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4 ubah}(h]h ]h"]h$]h&]uh1j*hj" ubeh}(h]h ]h"]h$]h&]uh1jhhhM hj hhubj)}(hX~CEC_TX_STATUS_ERROR: some unspecified error occurred: this can be one of ARB_LOST or LOW_DRIVE if the hardware cannot differentiate or something else entirely. Some hardware only supports OK and FAIL as the result of a transmit, i.e. there is no way to differentiate between the different possible errors. In that case map FAIL to CEC_TX_STATUS_NACK and not to CEC_TX_STATUS_ERROR. h](j)}(hCEC_TX_STATUS_ERROR:h]hCEC_TX_STATUS_ERROR:}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjQ ubj+)}(hhh]h)}(hXhsome unspecified error occurred: this can be one of ARB_LOST or LOW_DRIVE if the hardware cannot differentiate or something else entirely. Some hardware only supports OK and FAIL as the result of a transmit, i.e. there is no way to differentiate between the different possible errors. In that case map FAIL to CEC_TX_STATUS_NACK and not to CEC_TX_STATUS_ERROR.h]hXhsome unspecified error occurred: this can be one of ARB_LOST or LOW_DRIVE if the hardware cannot differentiate or something else entirely. Some hardware only supports OK and FAIL as the result of a transmit, i.e. there is no way to differentiate between the different possible errors. In that case map FAIL to CEC_TX_STATUS_NACK and not to CEC_TX_STATUS_ERROR.}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjc ubah}(h]h ]h"]h$]h&]uh1j*hjQ ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubj)}(hX7CEC_TX_STATUS_MAX_RETRIES: could not transmit the message after trying multiple times. Should only be set by the driver if it has hardware support for retrying messages. If set, then the framework assumes that it doesn't have to make another attempt to transmit the message since the hardware did that already. h](j)}(hCEC_TX_STATUS_MAX_RETRIES:h]hCEC_TX_STATUS_MAX_RETRIES:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj+)}(hhh]h)}(hXcould not transmit the message after trying multiple times. Should only be set by the driver if it has hardware support for retrying messages. If set, then the framework assumes that it doesn't have to make another attempt to transmit the message since the hardware did that already.h]hXcould not transmit the message after trying multiple times. Should only be set by the driver if it has hardware support for retrying messages. If set, then the framework assumes that it doesn’t have to make another attempt to transmit the message since the hardware did that already.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubh)}(hQThe hardware must be able to differentiate between OK, NACK and 'something else'.h]hUThe hardware must be able to differentiate between OK, NACK and ‘something else’.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXThe \*_cnt arguments are the number of error conditions that were seen. This may be 0 if no information is available. Drivers that do not support hardware retry can just set the counter corresponding to the transmit error to 1, if the hardware does support retry then either set these counters to 0 if the hardware provides no feedback of which errors occurred and how many times, or fill in the correct values as reported by the hardware.h]hXThe *_cnt arguments are the number of error conditions that were seen. This may be 0 if no information is available. Drivers that do not support hardware retry can just set the counter corresponding to the transmit error to 1, if the hardware does support retry then either set these counters to 0 if the hardware provides no feedback of which errors occurred and how many times, or fill in the correct values as reported by the hardware.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hBe aware that calling these functions can immediately start a new transmit if there is one pending in the queue. So make sure that the hardware is in a state where new transmits can be started *before* calling these functions.h](hBe aware that calling these functions can immediately start a new transmit if there is one pending in the queue. So make sure that the hardware is in a state where new transmits can be started }(hj hhhNhNubhemphasis)}(h*before*h]hbefore}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh calling these functions.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM&hj hhubh)}(hXThe cec_transmit_attempt_done() function is a helper for cases where the hardware never retries, so the transmit is always for just a single attempt. It will call cec_transmit_done() in turn, filling in 1 for the count argument corresponding to the status. Or all 0 if the status was OK.h]hXThe cec_transmit_attempt_done() function is a helper for cases where the hardware never retries, so the transmit is always for just a single attempt. It will call cec_transmit_done() in turn, filling in 1 for the count argument corresponding to the status. Or all 0 if the status was OK.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj hhubh)}(h When a CEC message was received:h]h When a CEC message was received:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj hhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_received_msg (C function)c.cec_received_msghNtauh1j[hj hhhNhNubjm)}(hhh](jr)}(hEvoid cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg);h]jx)}(hEvoid cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg);h](j)}(hvoidh]hvoid}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhM1ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhM1ubj)}(hcec_received_msgh]j)}(hcec_received_msgh]hcec_received_msg}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubah}(h]h ](jjeh"]h$]h&]hhuh1jhj$hhhhhM1ubj )}(h/(struct cec_adapter *adap, struct cec_msg *msg)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj`ubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjJsbc.cec_received_msgasbuh1hhj`ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj\ubj)}(hstruct cec_msg *msgh](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hcec_msgh]hcec_msg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.cec_received_msgasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmsgh]hmsg}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj\ubeh}(h]h ]h"]h$]h&]hhuh1j hj$hhhhhM1ubj)}(hjh]h;}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhhhM1ubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj hhhhhM1ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhhhM1hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhM1ubeh}(h]h ](jfunctioneh"]h$]h&]j jj jmj jmj j juh1jlhhhj hNhNubh)}(hSpeaks for itself.h]hSpeaks for itself.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj hhubeh}(h]&implementing-the-low-level-cec-adapterah ]h"]&implementing the low-level cec adapterah$]h&]uh1hhhhhhhhK`ubh)}(hhh](h)}(h"Implementing the interrupt handlerh]h"Implementing the interrupt handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM7ubh)}(hTypically the CEC hardware provides interrupts that signal when a transmit finished and whether it was successful or not, and it provides and interrupt when a CEC message was received.h]hTypically the CEC hardware provides interrupts that signal when a transmit finished and whether it was successful or not, and it provides and interrupt when a CEC message was received.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjhhubh)}(hX"The CEC driver should always process the transmit interrupts first before handling the receive interrupt. The framework expects to see the cec_transmit_done call before the cec_received_msg call, otherwise it can get confused if the received message was in reply to the transmitted message.h]hX"The CEC driver should always process the transmit interrupts first before handling the receive interrupt. The framework expects to see the cec_transmit_done call before the cec_received_msg call, otherwise it can get confused if the received message was in reply to the transmitted message.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjhhubeh}(h]"implementing-the-interrupt-handlerah ]h"]"implementing the interrupt handlerah$]h&]uh1hhhhhhhhM7ubh)}(hhh](h)}(h.Optional: Implementing Error Injection Supporth]h.Optional: Implementing Error Injection Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMCubh)}(hzIf the CEC adapter supports Error Injection functionality, then that can be exposed through the Error Injection callbacks:h]hzIf the CEC adapter supports Error Injection functionality, then that can be exposed through the Error Injection callbacks:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubjN )}(hXDstruct cec_adap_ops { /* Low-level callbacks */ ... /* Error injection callbacks */ int (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf); bool (*error_inj_parse_line)(struct cec_adapter *adap, char *line); /* High-level CEC message callback */ ... };h]hXDstruct cec_adap_ops { /* Low-level callbacks */ ... /* Error injection callbacks */ int (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf); bool (*error_inj_parse_line)(struct cec_adapter *adap, char *line); /* High-level CEC message callback */ ... };}hjsbah}(h]h ]h"]h$]h&]hhj] j^ nonej` }uh1jM hhhMHhjhhubh)}(hmIf both callbacks are set, then an ``error-inj`` file will appear in debugfs. The basic syntax is as follows:h](h#If both callbacks are set, then an }(hjhhhNhNubhliteral)}(h ``error-inj``h]h error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh= file will appear in debugfs. The basic syntax is as follows:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMVhjhhubh)}(hLeading spaces/tabs are ignored. If the next character is a ``#`` or the end of the line was reached, then the whole line is ignored. Otherwise a command is expected.h](herror-inj`` to clear any error injections without having to know the details of the driver-specific commands.h](h$This ensures that you can always do }(hjMhhhNhNubj)}(h``echo clear >error-inj``h]hecho clear >error-inj}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubhb to clear any error injections without having to know the details of the driver-specific commands.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahjhhubh)}(hbNote that the output of ``error-inj`` shall be valid as input to ``error-inj``. So this must work:h](hNote that the output of }(hjmhhhNhNubj)}(h ``error-inj``h]h error-inj}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh shall be valid as input to }(hjmhhhNhNubj)}(h ``error-inj``h]h error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh. So this must work:}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMdhjhhubjN )}(h3$ cat error-inj >einj.txt $ cat einj.txt >error-injh]h3$ cat error-inj >einj.txt $ cat einj.txt >error-inj}hjsbah}(h]h ]h"]h$]h&]hhj] j^ nonej` }uh1jM hhhMghjhhubh)}(hjThe first callback is called when this file is read and it should show the current error injection state::h]hiThe first callback is called when this file is read and it should show the current error injection state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjhhubjN )}(hEint (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf);h]hEint (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf);}hjsbah}(h]h ]h"]h$]h&]hhuh1jM hhhMohjhhubh)}(hIt is recommended that it starts with a comment block with basic usage information. It returns 0 for success and an error otherwise.h]hIt is recommended that it starts with a comment block with basic usage information. It returns 0 for success and an error otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubh)}(hKThe second callback will parse commands written to the ``error-inj`` file::h](h7The second callback will parse commands written to the }(hjhhhNhNubj)}(h ``error-inj``h]h error-inj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthjhhubjN )}(hCbool (*error_inj_parse_line)(struct cec_adapter *adap, char *line);h]hCbool (*error_inj_parse_line)(struct cec_adapter *adap, char *line);}hjsbah}(h]h ]h"]h$]h&]hhuh1jM hhhMvhjhhubh)}(hXtThe ``line`` argument points to the start of the command. Any leading spaces or tabs have already been skipped. It is a single line only (so there are no embedded newlines) and it is 0-terminated. The callback is free to modify the contents of the buffer. It is only called for lines containing a command, so this callback is never called for empty lines or comment lines.h](hThe }(hjhhhNhNubj)}(h``line``h]hline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhXh argument points to the start of the command. Any leading spaces or tabs have already been skipped. It is a single line only (so there are no embedded newlines) and it is 0-terminated. The callback is free to modify the contents of the buffer. It is only called for lines containing a command, so this callback is never called for empty lines or comment lines.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMxhjhhubh)}(hJReturn true if the command was valid or false if there were syntax errors.h]hJReturn true if the command was valid or false if there were syntax errors.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubeh}(h]-optional-implementing-error-injection-supportah ]h"].optional: implementing error injection supportah$]h&]uh1hhhhhhhhMCubh)}(hhh](h)}(h'Implementing the High-Level CEC Adapterh]h'Implementing the High-Level CEC Adapter}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhMubh)}(hThe low-level operations drive the hardware, the high-level operations are CEC protocol driven. The high-level callbacks are called without the adap->lock mutex being held. The following high-level callbacks are available:h]hThe low-level operations drive the hardware, the high-level operations are CEC protocol driven. The high-level callbacks are called without the adap->lock mutex being held. The following high-level callbacks are available:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubjN )}(hX(struct cec_adap_ops { /* Low-level callbacks */ ... /* Error injection callbacks */ ... /* High-level CEC message callback */ void (*configured)(struct cec_adapter *adap); int (*received)(struct cec_adapter *adap, struct cec_msg *msg); };h]hX(struct cec_adap_ops { /* Low-level callbacks */ ... /* Error injection callbacks */ ... /* High-level CEC message callback */ void (*configured)(struct cec_adapter *adap); int (*received)(struct cec_adapter *adap, struct cec_msg *msg); };}hj\sbah}(h]h ]h"]h$]h&]hhj] j^ nonej` }uh1jM hhhMhj=hhubh)}(h'Called when the adapter is configured::h]h&Called when the adapter is configured:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubjN )}(h-void (*configured)(struct cec_adapter *adap);h]h-void (*configured)(struct cec_adapter *adap);}hjzsbah}(h]h ]h"]h$]h&]hhuh1jM hhhMhj=hhubh)}(hThe adapter is fully configured, i.e. all logical addresses have been successfully claimed. If the driver has to take specific actions after configuration, then that can be done through this optional callback.h]hThe adapter is fully configured, i.e. all logical addresses have been successfully claimed. If the driver has to take specific actions after configuration, then that can be done through this optional callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubh)}(h]The received() callback allows the driver to optionally handle a newly received CEC message::h]h\The received() callback allows the driver to optionally handle a newly received CEC message:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubjN )}(h?int (*received)(struct cec_adapter *adap, struct cec_msg *msg);h]h?int (*received)(struct cec_adapter *adap, struct cec_msg *msg);}hjsbah}(h]h ]h"]h$]h&]hhuh1jM hhhMhj=hhubh)}(hIf the driver wants to process a CEC message, then it can implement this callback. If it doesn't want to handle this message, then it should return -ENOMSG, otherwise the CEC framework assumes it processed this message and it will not do anything with it.h]hXIf the driver wants to process a CEC message, then it can implement this callback. If it doesn’t want to handle this message, then it should return -ENOMSG, otherwise the CEC framework assumes it processed this message and it will not do anything with it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubeh}(h]'implementing-the-high-level-cec-adapterah ]h"]'implementing the high-level cec adapterah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hCEC framework functionsh]hCEC framework functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hCCEC Adapter drivers can call the following CEC framework functions:h]hCCEC Adapter drivers can call the following CEC framework functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_transmit_msg (C function)c.cec_transmit_msghNtauh1j[hjhhhNhNubjm)}(hhh](jr)}(heint cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, bool block);h]jx)}(hPint cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, bool block);h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(hcec_transmit_msgh]j)}(hcec_transmit_msgh]hcec_transmit_msg}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhMubj )}(h;(struct cec_adapter *adap, struct cec_msg *msg, bool block)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj8ubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj\modnameN classnameNjj)}j]j)}jj"sbc.cec_transmit_msgasbuh1hhj8ubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubj)}(hstruct cec_msg *msgh](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hcec_msgh]hcec_msg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jvc.cec_transmit_msgasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubj)}(h bool blockh](j)}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hblockh]hblock}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhhhMubj)}(hjh]h;}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]j jj jzj jzj j juh1jlhhhjhNhNubh)}(hTransmit a CEC message. If block is true, then wait until the message has been transmitted, otherwise just queue it and return.h]hTransmit a CEC message. If block is true, then wait until the message has been transmitted, otherwise just queue it and return.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_s_phys_addr (C function)c.cec_s_phys_addrhNtauh1j[hjhhhNhNubjm)}(hhh](jr)}(hJvoid cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);h]jx)}(hJvoid cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(hcec_s_phys_addrh]j)}(hcec_s_phys_addrh]hcec_s_phys_addr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhMubj )}(h5(struct cec_adapter *adap, u16 phys_addr, bool block)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.cec_s_phys_addrasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hadaph]hadap}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h u16 phys_addrh](h)}(hhh]j)}(hu16h]hu16}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjXmodnameN classnameNjj)}j]jc.cec_s_phys_addrasbuh1hhjOubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubj)}(h phys_addrh]h phys_addr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h bool blockh](j)}(hj h]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhhhMubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j juh1jlhhhjhNhNubh)}(hXMChange the physical address. This function will set adap->phys_addr and send an event if it has changed. If cec_s_log_addrs() has been called and the physical address has become valid, then the CEC framework will start claiming the logical addresses. If block is true, then this function won't return until this process has finished.h]hXOChange the physical address. This function will set adap->phys_addr and send an event if it has changed. If cec_s_log_addrs() has been called and the physical address has become valid, then the CEC framework will start claiming the logical addresses. If block is true, then this function won’t return until this process has finished.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXvWhen the physical address is set to a valid value the CEC adapter will be enabled (see the adap_enable op). When it is set to CEC_PHYS_ADDR_INVALID, then the CEC adapter will be disabled. If you change a valid physical address to another valid physical address, then this function will first set the address to CEC_PHYS_ADDR_INVALID before enabling the new physical address.h]hXvWhen the physical address is set to a valid value the CEC adapter will be enabled (see the adap_enable op). When it is set to CEC_PHYS_ADDR_INVALID, then the CEC adapter will be disabled. If you change a valid physical address to another valid physical address, then this function will first set the address to CEC_PHYS_ADDR_INVALID before enabling the new physical address.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh&cec_s_phys_addr_from_edid (C function)c.cec_s_phys_addr_from_edidhNtauh1j[hjhhhNhNubjm)}(hhh](jr)}(hqvoid cec_s_phys_addr_from_edid(struct cec_adapter *adap, const struct edid *edid);h]jx)}(hRvoid cec_s_phys_addr_from_edid(struct cec_adapter *adap, const struct edid *edid);h](j)}(hvoidh]hvoid}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhhhMubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhhhMubj)}(hcec_s_phys_addr_from_edidh]j)}(hcec_s_phys_addr_from_edidh]hcec_s_phys_addr_from_edid}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ](jjeh"]h$]h&]hhuh1jhj+hhhhhMubj )}(h3(struct cec_adapter *adap, const struct edid *edid)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjgubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjQsbc.cec_s_phys_addr_from_edidasbuh1hhjgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjcubj)}(hconst struct edid *edidh](j~)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hedidh]hedid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.cec_s_phys_addr_from_edidasbuh1hhjubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hedidh]hedid}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjcubeh}(h]h ]h"]h$]h&]hhuh1j hj+hhhhhMubj)}(hjh]h;}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj'hhhhhMubah}(h]j"ah ](jjeh"]h$]h&]jj)jhuh1jqhhhMhj$hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj$hhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j juh1jlhhhjhNhNubh)}(hA helper function that extracts the physical address from the edid struct and calls cec_s_phys_addr() with that address, or CEC_PHYS_ADDR_INVALID if the EDID did not contain a physical address or edid was a NULL pointer.h]hA helper function that extracts the physical address from the edid struct and calls cec_s_phys_addr() with that address, or CEC_PHYS_ADDR_INVALID if the EDID did not contain a physical address or edid was a NULL pointer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_s_log_addrs (C function)c.cec_s_log_addrshNtauh1j[hjhhhNhNubjm)}(hhh](jr)}(hoint cec_s_log_addrs(struct cec_adapter *adap, struct cec_log_addrs *log_addrs, bool block);h]jx)}(h[int cec_s_log_addrs(struct cec_adapter *adap, struct cec_log_addrs *log_addrs, bool block);h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj)}(hcec_s_log_addrsh]j)}(hcec_s_log_addrsh]hcec_s_log_addrs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhMubj )}(hG(struct cec_adapter *adap, struct cec_log_addrs *log_addrs, bool block)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.cec_s_log_addrsasbuh1hhjubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hadaph]hadap}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct cec_log_addrs *log_addrsh](j~)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjdubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j)}(h cec_log_addrsh]h cec_log_addrs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j0c.cec_s_log_addrsasbuh1hhjdubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h log_addrsh]h log_addrs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h bool blockh](j)}(hj h]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhhhMubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]j jj j3j j3j j juh1jlhhhjhNhNubh)}(hX!Claim the CEC logical addresses. Should never be called if CEC_CAP_LOG_ADDRS is set. If block is true, then wait until the logical addresses have been claimed, otherwise just queue it and return. To unconfigure all logical addresses call this function with log_addrs set to NULL or with log_addrs->num_log_addrs set to 0. The block argument is ignored when unconfiguring. This function will just return if the physical address is invalid. Once the physical address becomes valid, then the framework will attempt to claim these logical addresses.h]hX!Claim the CEC logical addresses. Should never be called if CEC_CAP_LOG_ADDRS is set. If block is true, then wait until the logical addresses have been claimed, otherwise just queue it and return. To unconfigure all logical addresses call this function with log_addrs set to NULL or with log_addrs->num_log_addrs set to 0. The block argument is ignored when unconfiguring. This function will just return if the physical address is invalid. Once the physical address becomes valid, then the framework will attempt to claim these logical addresses.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]cec-framework-functionsah ]h"]cec framework functionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hCEC Pin frameworkh]hCEC Pin framework}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhhhhhMubh)}(hX'Most CEC hardware operates on full CEC messages where the software provides the message and the hardware handles the low-level CEC protocol. But some hardware only drives the CEC pin and software has to handle the low-level CEC protocol. The CEC pin framework was created to handle such devices.h]hX'Most CEC hardware operates on full CEC messages where the software provides the message and the hardware handles the low-level CEC protocol. But some hardware only drives the CEC pin and software has to handle the low-level CEC protocol. The CEC pin framework was created to handle such devices.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMhhubh)}(hXNote that due to the close-to-realtime requirements it can never be guaranteed to work 100%. This framework uses highres timers internally, but if a timer goes off too late by more than 300 microseconds wrong results can occur. In reality it appears to be fairly reliable.h]hXNote that due to the close-to-realtime requirements it can never be guaranteed to work 100%. This framework uses highres timers internally, but if a timer goes off too late by more than 300 microseconds wrong results can occur. In reality it appears to be fairly reliable.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMhhubh)}(hOne advantage of this low-level implementation is that it can be used as a cheap CEC analyser, especially if interrupts can be used to detect CEC pin transitions from low to high or vice versa.h]hOne advantage of this low-level implementation is that it can be used as a cheap CEC analyser, especially if interrupts can be used to detect CEC pin transitions from low to high or vice versa.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_pin_ops (C struct) c.cec_pin_opshNtauh1j[hjMhhhNhNubjm)}(hhh](jr)}(h cec_pin_opsh]jx)}(hstruct cec_pin_opsh](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h cec_pin_opsh]j)}(hjh]h cec_pin_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhjhKhjhhubj)}(hhh]h)}(hlow-level CEC pin operationsh]hlow-level CEC pin operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j jj jj jj j juh1jlhhhjMhNhNubh container)}(hXx**Definition**:: struct cec_pin_ops { int (*read)(struct cec_adapter *adap); void (*low)(struct cec_adapter *adap); void (*high)(struct cec_adapter *adap); bool (*enable_irq)(struct cec_adapter *adap); void (*disable_irq)(struct cec_adapter *adap); void (*free)(struct cec_adapter *adap); void (*status)(struct cec_adapter *adap, struct seq_file *file); int (*read_hpd)(struct cec_adapter *adap); int (*read_5v)(struct cec_adapter *adap); int (*received)(struct cec_adapter *adap, struct cec_msg *msg); }; **Members** ``read`` read the CEC pin. Returns > 0 if high, 0 if low, or an error if negative. ``low`` drive the CEC pin low. ``high`` stop driving the CEC pin. The pull-up will drive the pin high, unless someone else is driving the pin low. ``enable_irq`` optional, enable the interrupt to detect pin voltage changes. ``disable_irq`` optional, disable the interrupt. ``free`` optional. Free any allocated resources. Called when the adapter is deleted. ``status`` optional, log status information. ``read_hpd`` optional. Read the HPD pin. Returns > 0 if high, 0 if low or an error if negative. ``read_5v`` optional. Read the 5V pin. Returns > 0 if high, 0 if low or an error if negative. ``received`` optional. High-level CEC message callback. Allows the driver to process CEC messages.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubjN )}(hXstruct cec_pin_ops { int (*read)(struct cec_adapter *adap); void (*low)(struct cec_adapter *adap); void (*high)(struct cec_adapter *adap); bool (*enable_irq)(struct cec_adapter *adap); void (*disable_irq)(struct cec_adapter *adap); void (*free)(struct cec_adapter *adap); void (*status)(struct cec_adapter *adap, struct seq_file *file); int (*read_hpd)(struct cec_adapter *adap); int (*read_5v)(struct cec_adapter *adap); int (*received)(struct cec_adapter *adap, struct cec_msg *msg); };h]hXstruct cec_pin_ops { int (*read)(struct cec_adapter *adap); void (*low)(struct cec_adapter *adap); void (*high)(struct cec_adapter *adap); bool (*enable_irq)(struct cec_adapter *adap); void (*disable_irq)(struct cec_adapter *adap); void (*free)(struct cec_adapter *adap); void (*status)(struct cec_adapter *adap, struct seq_file *file); int (*read_hpd)(struct cec_adapter *adap); int (*read_5v)(struct cec_adapter *adap); int (*received)(struct cec_adapter *adap, struct cec_msg *msg); };}hj$sbah}(h]h ]h"]h$]h&]hhuh1jM hb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubh)}(h **Members**h]j )}(hj5h]hMembers}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK"hjubj)}(hhh](j)}(hS``read`` read the CEC pin. Returns > 0 if high, 0 if low, or an error if negative. h](j)}(h``read``h]j)}(hjTh]hread}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjNubj+)}(hhh]h)}(hIread the CEC pin. Returns > 0 if high, 0 if low, or an error if negative.h]hIread the CEC pin. Returns > 0 if high, 0 if low, or an error if negative.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjjubah}(h]h ]h"]h$]h&]uh1j*hjNubeh}(h]h ]h"]h$]h&]uh1jhjihKhjKubj)}(h``low`` drive the CEC pin low. h](j)}(h``low``h]j)}(hjh]hlow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(hdrive the CEC pin low.h]hdrive the CEC pin low.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(ht``high`` stop driving the CEC pin. The pull-up will drive the pin high, unless someone else is driving the pin low. h](j)}(h``high``h]j)}(hjh]hhigh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(hjstop driving the CEC pin. The pull-up will drive the pin high, unless someone else is driving the pin low.h]hjstop driving the CEC pin. The pull-up will drive the pin high, unless someone else is driving the pin low.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(hM``enable_irq`` optional, enable the interrupt to detect pin voltage changes. h](j)}(h``enable_irq``h]j)}(hjh]h enable_irq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(h=optional, enable the interrupt to detect pin voltage changes.h]h=optional, enable the interrupt to detect pin voltage changes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(h1``disable_irq`` optional, disable the interrupt. h](j)}(h``disable_irq``h]j)}(hj:h]h disable_irq}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhj4ubj+)}(hhh]h)}(h optional, disable the interrupt.h]h optional, disable the interrupt.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhKhjPubah}(h]h ]h"]h$]h&]uh1j*hj4ubeh}(h]h ]h"]h$]h&]uh1jhjOhKhjKubj)}(hU``free`` optional. Free any allocated resources. Called when the adapter is deleted. h](j)}(h``free``h]j)}(hjsh]hfree}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjmubj+)}(hhh]h)}(hKoptional. Free any allocated resources. Called when the adapter is deleted.h]hKoptional. Free any allocated resources. Called when the adapter is deleted.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubah}(h]h ]h"]h$]h&]uh1j*hjmubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(h-``status`` optional, log status information. h](j)}(h ``status``h]j)}(hjh]hstatus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(h!optional, log status information.h]h!optional, log status information.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(h```read_hpd`` optional. Read the HPD pin. Returns > 0 if high, 0 if low or an error if negative. h](j)}(h ``read_hpd``h]j)}(hjh]hread_hpd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(hRoptional. Read the HPD pin. Returns > 0 if high, 0 if low or an error if negative.h]hRoptional. Read the HPD pin. Returns > 0 if high, 0 if low or an error if negative.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjKubj)}(h^``read_5v`` optional. Read the 5V pin. Returns > 0 if high, 0 if low or an error if negative. h](j)}(h ``read_5v``h]j)}(hj h]hread_5v}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj+)}(hhh]h)}(hQoptional. Read the 5V pin. Returns > 0 if high, 0 if low or an error if negative.h]hQoptional. Read the 5V pin. Returns > 0 if high, 0 if low or an error if negative.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhj6ubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhj5hKhjKubj)}(hb``received`` optional. High-level CEC message callback. Allows the driver to process CEC messages.h](j)}(h ``received``h]j)}(hjZh]hreceived}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjTubj+)}(hhh]h)}(hUoptional. High-level CEC message callback. Allows the driver to process CEC messages.h]hUoptional. High-level CEC message callback. Allows the driver to process CEC messages.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohKhjpubah}(h]h ]h"]h$]h&]uh1j*hjTubeh}(h]h ]h"]h$]h&]uh1jhjohKhjKubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjMhhhNhNubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK#hjMhhubh)}(hnThese operations (except for the **received** op) are used by the cec pin framework to manipulate the CEC pin.h](h!These operations (except for the }(hjhhhNhNubj )}(h **received**h]hreceived}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhA op) are used by the cec pin framework to manipulate the CEC pin.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK hjMhhubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jhcec_pin_changed (C function)c.cec_pin_changedhNtauh1j[hjMhhhNhNubjm)}(hhh](jr)}(h;void cec_pin_changed (struct cec_adapter *adap, bool value)h]jx)}(h:void cec_pin_changed(struct cec_adapter *adap, bool value)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK4ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK4ubj)}(hcec_pin_changedh]j)}(hcec_pin_changedh]hcec_pin_changed}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhK4ubj )}(h&(struct cec_adapter *adap, bool value)h](j)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj%ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjImodnameN classnameNjj)}j]j)}jjsbc.cec_pin_changedasbuh1hhj%ubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hjh]h*}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(h bool valueh](j)}(hj h]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hvalueh]hvalue}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhK4ubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhjhK4ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhjhK4hjhhubj)}(hhh]h)}(hupdate pin state from interrupth]hupdate pin state from interrupt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK4hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK4ubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j juh1jlhhhjMhNhNubj)}(hX**Parameters** ``struct cec_adapter *adap`` pointer to the cec adapter ``bool value`` when true the pin is high, otherwise it is low **Description** If changes of the CEC voltage are detected via an interrupt, then cec_pin_changed is called from the interrupt with the new value.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK8hjubj)}(hhh](j)}(h8``struct cec_adapter *adap`` pointer to the cec adapter h](j)}(h``struct cec_adapter *adap``h]j)}(hj!h]hstruct cec_adapter *adap}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK6hjubj+)}(hhh]h)}(hpointer to the cec adapterh]hpointer to the cec adapter}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hK6hj7ubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhj6hK6hjubj)}(h>``bool value`` when true the pin is high, otherwise it is low h](j)}(h``bool value``h]j)}(hjZh]h bool value}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK7hjTubj+)}(hhh]h)}(h.when true the pin is high, otherwise it is lowh]h.when true the pin is high, otherwise it is low}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohK7hjpubah}(h]h ]h"]h$]h&]uh1j*hjTubeh}(h]h ]h"]h$]h&]uh1jhjohK7hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK9hjubh)}(hIf changes of the CEC voltage are detected via an interrupt, then cec_pin_changed is called from the interrupt with the new value.h]hIf changes of the CEC voltage are detected via an interrupt, then cec_pin_changed is called from the interrupt with the new value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK8hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjMhhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh%cec_pin_allocate_adapter (C function)c.cec_pin_allocate_adapterhNtauh1j[hjMhhhNhNubjm)}(hhh](jr)}(hystruct cec_adapter * cec_pin_allocate_adapter (const struct cec_pin_ops *pin_ops, void *priv, const char *name, u32 caps)h]jx)}(hwstruct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops, void *priv, const char *name, u32 caps)h](j~)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK?ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK?ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jcec_pin_allocate_adaptersbc.cec_pin_allocate_adapterasbuh1hhjhhhjhK?ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK?ubj)}(hjh]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK?ubj)}(hcec_pin_allocate_adapterh]j)}(hjh]hcec_pin_allocate_adapter}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhK?ubj )}(hK(const struct cec_pin_ops *pin_ops, void *priv, const char *name, u32 caps)h](j)}(h!const struct cec_pin_ops *pin_opsh](j~)}(hjh]hconst}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjPubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj~)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjPubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubh)}(hhh]j)}(h cec_pin_opsh]h cec_pin_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.cec_pin_allocate_adapterasbuh1hhjPubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(hpin_opsh]hpin_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjLubj)}(h void *privh](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hprivh]hpriv}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjLubj)}(hconst char *nameh](j~)}(hjh]hconst}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hcharh]hchar}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjLubj)}(hu32 capsh](h)}(hhh]j)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.cec_pin_allocate_adapterasbuh1hhjzubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubj)}(hcapsh]hcaps}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjLubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhK?ubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhjhhhjhK?ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jqhjhK?hjhhubj)}(hhh]h)}(h allocate a pin-based cec adapterh]h allocate a pin-based cec adapter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK?hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK?ubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j juh1jlhhhjMhNhNubj)}(hX(**Parameters** ``const struct cec_pin_ops *pin_ops`` low-level pin operations ``void *priv`` will be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer. ``const char *name`` the name of the CEC adapter. Note: this name will be copied. ``u32 caps`` capabilities of the CEC adapter. This will be ORed with CEC_CAP_MONITOR_ALL and CEC_CAP_MONITOR_PIN. **Description** Allocate a cec adapter using the cec pin framework. **Return** a pointer to the cec adapter or an error pointerh](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKChjubj)}(hhh](j)}(h?``const struct cec_pin_ops *pin_ops`` low-level pin operations h](j)}(h%``const struct cec_pin_ops *pin_ops``h]j)}(hj h]h!const struct cec_pin_ops *pin_ops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKAhj ubj+)}(hhh]h)}(hlow-level pin operationsh]hlow-level pin operations}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj- hKAhj. ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1jhj- hKAhj ubj)}(h``void *priv`` will be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer. h](j)}(h``void *priv``h]j)}(hjQ h]h void *priv}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKChjK ubj+)}(hhh]h)}(hswill be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer.h]hswill be stored in adap->priv and can be used by the adapter ops. Use cec_get_drvdata(adap) to get the priv pointer.}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKBhjg ubah}(h]h ]h"]h$]h&]uh1j*hjK ubeh}(h]h ]h"]h$]h&]uh1jhjf hKChj ubj)}(hR``const char *name`` the name of the CEC adapter. Note: this name will be copied. h](j)}(h``const char *name``h]j)}(hj h]hconst char *name}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKDhj ubj+)}(hhh]h)}(h&hhhjS&hK2ubah}(h]j9&ah ](jjeh"]h$]h&]jj)jhuh1jqhjS&hK2hj;&hhubj)}(hhh]h)}(h7find or create a new cec_notifier for the given device.h]h7find or create a new cec_notifier for the given device.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK2hj (hhubah}(h]h ]h"]h$]h&]uh1jhj;&hhhjS&hK2ubeh}(h]h ](jfunctioneh"]h$]h&]j jj j&(j j&(j j juh1jlhhhj[!hNhNubj)}(hXk**Parameters** ``struct device *hdmi_dev`` HDMI device that sends the events. ``const char *port_name`` the connector name from which the event occurs. May be NULL if there is always only one HDMI connector created by the HDMI device. ``struct cec_adapter *adap`` the cec adapter that registered this notifier. **Description** If a notifier for device **dev** and connector **port_name** already exists, then increase the refcount and return that notifier. If it doesn't exist, then allocate a new notifier struct and return a pointer to that new struct. Return NULL if the memory could not be allocated.h](h)}(h**Parameters**h]j )}(hj0(h]h Parameters}(hj2(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj.(ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK6hj*(ubj)}(hhh](j)}(h?``struct device *hdmi_dev`` HDMI device that sends the events. h](j)}(h``struct device *hdmi_dev``h]j)}(hjO(h]hstruct device *hdmi_dev}(hjQ(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM(ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK4hjI(ubj+)}(hhh]h)}(h"HDMI device that sends the events.h]h"HDMI device that sends the events.}(hjh(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd(hK4hje(ubah}(h]h ]h"]h$]h&]uh1j*hjI(ubeh}(h]h ]h"]h$]h&]uh1jhjd(hK4hjF(ubj)}(h``const char *port_name`` the connector name from which the event occurs. May be NULL if there is always only one HDMI connector created by the HDMI device. h](j)}(h``const char *port_name``h]j)}(hj(h]hconst char *port_name}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK6hj(ubj+)}(hhh]h)}(hthe connector name from which the event occurs. May be NULL if there is always only one HDMI connector created by the HDMI device.h]hthe connector name from which the event occurs. May be NULL if there is always only one HDMI connector created by the HDMI device.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK5hj(ubah}(h]h ]h"]h$]h&]uh1j*hj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hK6hjF(ubj)}(hL``struct cec_adapter *adap`` the cec adapter that registered this notifier. h](j)}(h``struct cec_adapter *adap``h]j)}(hj(h]hstruct cec_adapter *adap}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK7hj(ubj+)}(hhh]h)}(h.the cec adapter that registered this notifier.h]h.the cec adapter that registered this notifier.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hK7hj(ubah}(h]h ]h"]h$]h&]uh1j*hj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hK7hjF(ubeh}(h]h ]h"]h$]h&]uh1jhj*(ubh)}(h**Description**h]j )}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK9hj*(ubh)}(hIf a notifier for device **dev** and connector **port_name** already exists, then increase the refcount and return that notifier.h](hIf a notifier for device }(hj)hhhNhNubj )}(h**dev**h]hdev}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubh and connector }(hj)hhhNhNubj )}(h **port_name**h]h port_name}(hj-)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubhE already exists, then increase the refcount and return that notifier.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK8hj*(ubh)}(haIf it doesn't exist, then allocate a new notifier struct and return a pointer to that new struct.h]hcIf it doesn’t exist, then allocate a new notifier struct and return a pointer to that new struct.}(hjF)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK;hj*(ubh)}(h1Return NULL if the memory could not be allocated.h]h1Return NULL if the memory could not be allocated.}(hjU)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK>hj*(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh-cec_notifier_cec_adap_unregister (C function)"c.cec_notifier_cec_adap_unregisterhNtauh1j[hj[!hhhNhNubjm)}(hhh](jr)}(hXvoid cec_notifier_cec_adap_unregister (struct cec_notifier *n, struct cec_adapter *adap)h]jx)}(hWvoid cec_notifier_cec_adap_unregister(struct cec_notifier *n, struct cec_adapter *adap)h](j)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKFubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)hhhj)hKFubj)}(h cec_notifier_cec_adap_unregisterh]j)}(h cec_notifier_cec_adap_unregisterh]h cec_notifier_cec_adap_unregister}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)hhhj)hKFubj )}(h2(struct cec_notifier *n, struct cec_adapter *adap)h](j)}(hstruct cec_notifier *nh](j~)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubh)}(hhh]j)}(h cec_notifierh]h cec_notifier}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj)modnameN classnameNjj)}j]j)}jj)sb"c.cec_notifier_cec_adap_unregisterasbuh1hhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hjh]h*}(hj *hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hjh]hn}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubj)}(hstruct cec_adapter *adaph](j~)}(hjh]hstruct}(hj2*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj.*ubj)}(h h]h }(hj?*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.*ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjP*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjR*modnameN classnameNjj)}j]j)"c.cec_notifier_cec_adap_unregisterasbuh1hhj.*ubj)}(h h]h }(hjn*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.*ubj)}(hjh]h*}(hj|*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.*ubj)}(hadaph]hadap}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubeh}(h]h ]h"]h$]h&]hhuh1j hj)hhhj)hKFubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj|)hhhj)hKFubah}(h]jw)ah ](jjeh"]h$]h&]jj)jhuh1jqhj)hKFhjy)hhubj)}(hhh]h)}(h9decrease refcount and delete when the refcount reaches 0.h]h9decrease refcount and delete when the refcount reaches 0.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKFhj*hhubah}(h]h ]h"]h$]h&]uh1jhjy)hhhj)hKFubeh}(h]h ](jfunctioneh"]h$]h&]j jj j*j j*j j juh1jlhhhj[!hNhNubj)}(h**Parameters** ``struct cec_notifier *n`` notifier. If NULL, then this function does nothing. ``struct cec_adapter *adap`` the cec adapter that registered this notifier.h](h)}(h**Parameters**h]j )}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKJhj*ubj)}(hhh](j)}(hO``struct cec_notifier *n`` notifier. If NULL, then this function does nothing. h](j)}(h``struct cec_notifier *n``h]j)}(hj*h]hstruct cec_notifier *n}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKHhj*ubj+)}(hhh]h)}(h3notifier. If NULL, then this function does nothing.h]h3notifier. If NULL, then this function does nothing.}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj +hKHhj +ubah}(h]h ]h"]h$]h&]uh1j*hj*ubeh}(h]h ]h"]h$]h&]uh1jhj +hKHhj*ubj)}(hK``struct cec_adapter *adap`` the cec adapter that registered this notifier.h](j)}(h``struct cec_adapter *adap``h]j)}(hj-+h]hstruct cec_adapter *adap}(hj/+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj++ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKJhj'+ubj+)}(hhh]h)}(h.the cec adapter that registered this notifier.h]h.the cec adapter that registered this notifier.}(hjF+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKIhjC+ubah}(h]h ]h"]h$]h&]uh1j*hj'+ubeh}(h]h ]h"]h$]h&]uh1jhjB+hKJhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh'cec_notifier_set_phys_addr (C function)c.cec_notifier_set_phys_addrhNtauh1j[hj[!hhhNhNubjm)}(hhh](jr)}(h@void cec_notifier_set_phys_addr (struct cec_notifier *n, u16 pa)h]jx)}(h?void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa)h](j)}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKOubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj+hKOubj)}(hcec_notifier_set_phys_addrh]j)}(hcec_notifier_set_phys_addrh]hcec_notifier_set_phys_addr}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj+hhhj+hKOubj )}(h (struct cec_notifier *n, u16 pa)h](j)}(hstruct cec_notifier *nh](j~)}(hjh]hstruct}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj+ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubh)}(hhh]j)}(h cec_notifierh]h cec_notifier}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+modnameN classnameNjj)}j]j)}jj+sbc.cec_notifier_set_phys_addrasbuh1hhj+ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj)}(hjh]h*}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj)}(hjh]hn}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj+ubj)}(hu16 pah](h)}(hhh]j)}(hu16h]hu16}(hj8,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj:,modnameN classnameNjj)}j]j+c.cec_notifier_set_phys_addrasbuh1hhj1,ubj)}(h h]h }(hjV,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1,ubj)}(hpah]hpa}(hjd,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj+ubeh}(h]h ]h"]h$]h&]hhuh1j hj+hhhj+hKOubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj+hhhj+hKOubah}(h]jz+ah ](jjeh"]h$]h&]jj)jhuh1jqhj+hKOhj|+hhubj)}(hhh]h)}(hset a new physical address.h]hset a new physical address.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKOhj,hhubah}(h]h ]h"]h$]h&]uh1jhj|+hhhj+hKOubeh}(h]h ](jfunctioneh"]h$]h&]j jj j,j j,j j juh1jlhhhj[!hNhNubj)}(h**Parameters** ``struct cec_notifier *n`` the CEC notifier ``u16 pa`` the CEC physical address **Description** Set a new CEC physical address. Does nothing if **n** == NULL.h](h)}(h**Parameters**h]j )}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKShj,ubj)}(hhh](j)}(h,``struct cec_notifier *n`` the CEC notifier h](j)}(h``struct cec_notifier *n``h]j)}(hj,h]hstruct cec_notifier *n}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKPhj,ubj+)}(hhh]h)}(hthe CEC notifierh]hthe CEC notifier}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKPhj,ubah}(h]h ]h"]h$]h&]uh1j*hj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hKPhj,ubj)}(h$``u16 pa`` the CEC physical address h](j)}(h ``u16 pa``h]j)}(hj-h]hu16 pa}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKQhj-ubj+)}(hhh]h)}(hthe CEC physical addressh]hthe CEC physical address}(hj!-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKQhj-ubah}(h]h ]h"]h$]h&]uh1j*hj-ubeh}(h]h ]h"]h$]h&]uh1jhj-hKQhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,ubh)}(h**Description**h]j )}(hjC-h]h Description}(hjE-hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjA-ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKShj,ubh)}(h>Set a new CEC physical address. Does nothing if **n** == NULL.h](h0Set a new CEC physical address. Does nothing if }(hjY-hhhNhNubj )}(h**n**h]hn}(hja-hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjY-ubh == NULL.}(hjY-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKRhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh1cec_notifier_set_phys_addr_from_edid (C function)&c.cec_notifier_set_phys_addr_from_edidhNtauh1j[hj[!hhhNhNubjm)}(hhh](jr)}(h[void cec_notifier_set_phys_addr_from_edid (struct cec_notifier *n, const struct edid *edid)h]jx)}(hZvoid cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n, const struct edid *edid)h](j)}(hvoidh]hvoid}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKYubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhj-hKYubj)}(h$cec_notifier_set_phys_addr_from_edidh]j)}(h$cec_notifier_set_phys_addr_from_edidh]h$cec_notifier_set_phys_addr_from_edid}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj-hhhj-hKYubj )}(h1(struct cec_notifier *n, const struct edid *edid)h](j)}(hstruct cec_notifier *nh](j~)}(hjh]hstruct}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubh)}(hhh]j)}(h cec_notifierh]h cec_notifier}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj-modnameN classnameNjj)}j]j)}jj-sb&c.cec_notifier_set_phys_addr_from_edidasbuh1hhj-ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(hjh]h*}(hj#.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(hjh]hn}(hj0.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj-ubj)}(hconst struct edid *edidh](j~)}(hjh]hconst}(hjH.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjD.ubj)}(h h]h }(hjU.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD.ubj~)}(hjh]hstruct}(hjc.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjD.ubj)}(h h]h }(hjp.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD.ubh)}(hhh]j)}(hedidh]hedid}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj.modnameN classnameNjj)}j]j.&c.cec_notifier_set_phys_addr_from_edidasbuh1hhjD.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD.ubj)}(hjh]h*}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD.ubj)}(hedidh]hedid}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD.ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj-ubeh}(h]h ]h"]h$]h&]hhuh1j hj-hhhj-hKYubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj-hhhj-hKYubah}(h]j-ah ](jjeh"]h$]h&]jj)jhuh1jqhj-hKYhj-hhubj)}(hhh]h)}(hset parse the PA from the EDID.h]hset parse the PA from the EDID.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKYhj.hhubah}(h]h ]h"]h$]h&]uh1jhj-hhhj-hKYubeh}(h]h ](jfunctioneh"]h$]h&]j jj j.j j.j j juh1jlhhhj[!hNhNubj)}(h**Parameters** ``struct cec_notifier *n`` the CEC notifier ``const struct edid *edid`` the struct edid pointer **Description** Parses the EDID to obtain the new CEC physical address and set it. Does nothing if **n** == NULL.h](h)}(h**Parameters**h]j )}(hj/h]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK]hj/ubj)}(hhh](j)}(h,``struct cec_notifier *n`` the CEC notifier h](j)}(h``struct cec_notifier *n``h]j)}(hj%/h]hstruct cec_notifier *n}(hj'/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#/ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKZhj/ubj+)}(hhh]h)}(hthe CEC notifierh]hthe CEC notifier}(hj>/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:/hKZhj;/ubah}(h]h ]h"]h$]h&]uh1j*hj/ubeh}(h]h ]h"]h$]h&]uh1jhj:/hKZhj/ubj)}(h4``const struct edid *edid`` the struct edid pointer h](j)}(h``const struct edid *edid``h]j)}(hj^/h]hconst struct edid *edid}(hj`/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\/ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK[hjX/ubj+)}(hhh]h)}(hthe struct edid pointerh]hthe struct edid pointer}(hjw/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs/hK[hjt/ubah}(h]h ]h"]h$]h&]uh1j*hjX/ubeh}(h]h ]h"]h$]h&]uh1jhjs/hK[hj/ubeh}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h**Description**h]j )}(hj/h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK]hj/ubh)}(haParses the EDID to obtain the new CEC physical address and set it. Does nothing if **n** == NULL.h](hSParses the EDID to obtain the new CEC physical address and set it. Does nothing if }(hj/hhhNhNubj )}(h**n**h]hn}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubh == NULL.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK\hj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh,cec_notifier_parse_hdmi_phandle (C function)!c.cec_notifier_parse_hdmi_phandlehNtauh1j[hj[!hhhNhNubjm)}(hhh](jr)}(hDstruct device * cec_notifier_parse_hdmi_phandle (struct device *dev)h]jx)}(hBstruct device *cec_notifier_parse_hdmi_phandle(struct device *dev)h](j~)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj/hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKdubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hKdubh)}(hhh]j)}(hdeviceh]hdevice}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0modnameN classnameNjj)}j]j)}jcec_notifier_parse_hdmi_phandlesb!c.cec_notifier_parse_hdmi_phandleasbuh1hhj/hhhj/hKdubj)}(h h]h }(hj00hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hKdubj)}(hjh]h*}(hj>0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hKdubj)}(hcec_notifier_parse_hdmi_phandleh]j)}(hj-0h]hcec_notifier_parse_hdmi_phandle}(hjO0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK0ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj/hhhj/hKdubj )}(h(struct device *dev)h]j)}(hstruct device *devh](j~)}(hjh]hstruct}(hjj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjf0ubj)}(h h]h }(hjw0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf0ubh)}(hhh]j)}(hdeviceh]hdevice}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0modnameN classnameNjj)}j]j+0!c.cec_notifier_parse_hdmi_phandleasbuh1hhjf0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf0ubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf0ubj)}(hdevh]hdev}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf0ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjb0ubah}(h]h ]h"]h$]h&]hhuh1j hj/hhhj/hKdubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj/hhhj/hKdubah}(h]j/ah ](jjeh"]h$]h&]jj)jhuh1jqhj/hKdhj/hhubj)}(hhh]h)}(h(find the hdmi device from "hdmi-phandle"h]h,find the hdmi device from “hdmi-phandle”}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKdhj0hhubah}(h]h ]h"]h$]h&]uh1jhj/hhhj/hKdubeh}(h]h ](jfunctioneh"]h$]h&]j jj j1j j1j j juh1jlhhhj[!hNhNubj)}(hXl**Parameters** ``struct device *dev`` the device with the "hdmi-phandle" device tree property **Description** Returns the device pointer referenced by the "hdmi-phandle" property. Note that the refcount of the returned device is not incremented. This device pointer is only used as a key value in the notifier list, but it is never accessed by the CEC driver.h](h)}(h**Parameters**h]j )}(hj 1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj 1ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhhj1ubj)}(hhh]j)}(hO``struct device *dev`` the device with the "hdmi-phandle" device tree property h](j)}(h``struct device *dev``h]j)}(hj,1h]hstruct device *dev}(hj.1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*1ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKehj&1ubj+)}(hhh]h)}(h7the device with the "hdmi-phandle" device tree propertyh]h;the device with the “hdmi-phandle” device tree property}(hjE1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA1hKehjB1ubah}(h]h ]h"]h$]h&]uh1j*hj&1ubeh}(h]h ]h"]h$]h&]uh1jhjA1hKehj#1ubah}(h]h ]h"]h$]h&]uh1jhj1ubh)}(h**Description**h]j )}(hjg1h]h Description}(hji1hhhNhNubah}(h]h ]h"]h$]h&]uh1j hje1ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKghj1ubh)}(hReturns the device pointer referenced by the "hdmi-phandle" property. Note that the refcount of the returned device is not incremented. This device pointer is only used as a key value in the notifier list, but it is never accessed by the CEC driver.h]hReturns the device pointer referenced by the “hdmi-phandle” property. Note that the refcount of the returned device is not incremented. This device pointer is only used as a key value in the notifier list, but it is never accessed by the CEC driver.}(hj}1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKfhj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubj\)}(hhh]h}(h]h ]h"]h$]h&]entries](jh.cec_notifier_phys_addr_invalidate (C function)#c.cec_notifier_phys_addr_invalidatehNtauh1j[hj[!hhhNhNubjm)}(hhh](jr)}(h?void cec_notifier_phys_addr_invalidate (struct cec_notifier *n)h]jx)}(h>void cec_notifier_phys_addr_invalidate(struct cec_notifier *n)h](j)}(hvoidh]hvoid}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1hhhj1hKubj)}(h!cec_notifier_phys_addr_invalidateh]j)}(h!cec_notifier_phys_addr_invalidateh]h!cec_notifier_phys_addr_invalidate}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj1hhhj1hKubj )}(h(struct cec_notifier *n)h]j)}(hstruct cec_notifier *nh](j~)}(hjh]hstruct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubh)}(hhh]j)}(h cec_notifierh]h cec_notifier}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj 2modnameN classnameNjj)}j]j)}jj1sb#c.cec_notifier_phys_addr_invalidateasbuh1hhj1ubj)}(h h]h }(hj'2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(hjh]h*}(hj52hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(hjh]hn}(hjB2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj1ubah}(h]h ]h"]h$]h&]hhuh1j hj1hhhj1hKubeh}(h]h ]h"]h$]h&]hhjuh1jwjjhj1hhhj1hKubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1jqhj1hKhj1hhubj)}(hhh]h)}(h#set the physical address to INVALIDh]h#set the physical address to INVALID}(hjk2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhjh2hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj1hKubeh}(h]h ](jfunctioneh"]h$]h&]j jj j2j j2j j juh1jlhhhj[!hNhNubj)}(h**Parameters** ``struct cec_notifier *n`` the CEC notifier **Description** This is a simple helper function to invalidate the physical address. Does nothing if **n** == NULL.h](h)}(h**Parameters**h]j )}(hj2h]h Parameters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhj2ubj)}(hhh]j)}(h,``struct cec_notifier *n`` the CEC notifier h](j)}(h``struct cec_notifier *n``h]j)}(hj2h]hstruct cec_notifier *n}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhj2ubj+)}(hhh]h)}(hthe CEC notifierh]hthe CEC notifier}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hKhj2ubah}(h]h ]h"]h$]h&]uh1j*hj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hKhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubh)}(h**Description**h]j )}(hj2h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhj2ubh)}(hcThis is a simple helper function to invalidate the physical address. Does nothing if **n** == NULL.h](hUThis is a simple helper function to invalidate the physical address. Does nothing if }(hj2hhhNhNubj )}(h**n**h]hn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj2ubh == NULL.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj[!hhhNhNubeh}(h]cec-notifier-frameworkah ]h"]cec notifier frameworkah$]h&]uh1hhhhhhhhMubeh}(h]cec-kernel-supportah ]h"]cec kernel supportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjX3error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j23j/3j9j6j j jjjjj:j7jjjJjGjX!jU!j*3j'3u nametypes}(j23j9j jjj:jjJjX!j*3uh}(j/3hj6hj j<jjjsjj j%j*jMjRjjjj j j jj jjj7jjj=jGjjjjjj"j'jjjU!jMjjjjjjj'3j[!j!j!j$j$j9&j>&jw)j|)jz+j+j-j-j/j/j1j1u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.