Tsphinx.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]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:}(hhhhhNhNubah}(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&]refurijuh1j hjubah}(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():}(hj9hhhNhNubah}(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_adapterhNtauh1jGhj(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}(hjkhhhNhNubah}(h]h ]kah"]h$]h&]uh1jihjehhhhhK&ubhdesc_sig_space)}(h h]h }(hj|hhhNhNubah}(h]h ]wah"]h$]h&]uh1jzhjehhhhhK&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_adapterasbuh1hhjehhhhhK&ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjehhhhhK&ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjehhhhhK&ubh desc_name)}(hcec_allocate_adapterh]j)}(hjh]hcec_allocate_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjehhhhhK&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](jj)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(hhh]j)}(h cec_adap_opsh]h cec_adap_ops}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj=modnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhjubj{)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hopsh]hops}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(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&]uh1jzhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hprivh]hpriv}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst char *nameh](jj)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hu32 capsh](h)}(hhh]j)}(hu32h]hu32}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj4modnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhj+ubj{)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj+ubj)}(hcapsh]hcaps}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hu8 available_lash](h)}(hhh]j)}(hu8h]hu8}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj|modnameN classnameNjj)}j]jc.cec_allocate_adapterasbuh1hhjsubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjsubj)}(h available_lash]h available_las}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjehhhhhK&ubj)}(h;h]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhhhK&ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jcsphinx_line_type declaratorhj_hhhhhK&ubah}(h]jVah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j]hhhK&hjZhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjZhhhhhK&ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jXhhhj(hNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_delete_adapter (C function)c.cec_delete_adapterhNtauh1jGhj(hhhNhNubjY)}(hhh](j^)}(h2void cec_delete_adapter(struct cec_adapter *adap);h]jd)}(h2void cec_delete_adapter(struct cec_adapter *adap);h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhK+ubj{)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhhhK+ubj)}(hcec_delete_adapterh]j)}(hcec_delete_adapterh]hcec_delete_adapter}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhK+ubj)}(h(struct cec_adapter *adap)h]j)}(hstruct cec_adapter *adaph](jj)}(hjmh]hstruct}(hjPhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjLubj{)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjpmodnameN classnameNjj)}j]j)}jj6sbc.cec_delete_adapterasbuh1hhjLubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubah}(h]h ]h"]h$]h&]hhuh1jhjhhhhhK+ubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhK+ubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj hhhhhK+ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhK+hj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhhhK+ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jXhhhj(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(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:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK6hj5ubj)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjGubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhhhK6hjhhubj)}(hCname: the name of the CEC adapter. Note: this name will be copied. h](j)}(hname:h]hname:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK9hjdubj)}(hhh]h)}(hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hparenth]hparent}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjzubeh}(h]h ]h"]h$]h&]hhuh1jhjBhhhhhKMubj)}(hjh]h;}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhhhKMubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj>hhhhhKMubah}(h]j9ah ](jjeh"]h$]h&]jj)jhuh1j]hhhKMhj;hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj;hhhhhKMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jXhhhj(hNhNubh)}(h"where parent is the parent device.h]h"where parent is the parent device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhj(hhubh)}(hTo unregister the devices call:h]hTo unregister the devices call:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShj(hhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT#cec_unregister_adapter (C function)c.cec_unregister_adapterhNtauh1jGhj(hhhNhNubjY)}(hhh](j^)}(h6void cec_unregister_adapter(struct cec_adapter *adap);h]jd)}(h6void cec_unregister_adapter(struct cec_adapter *adap);h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKUubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhhhKUubj)}(hcec_unregister_adapterh]j)}(hcec_unregister_adapterh]hcec_unregister_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhKUubj)}(h(struct cec_adapter *adap)h]j)}(hstruct cec_adapter *adaph](jj)}(hjmh]hstruct}(hj hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jjsbc.cec_unregister_adapterasbuh1hhjubj{)}(h h]h }(hj> hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hjL hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hadaph]hadap}(hjY hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhhhKUubj)}(hjh]h;}(hjt hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKUubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhhhKUubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhKUhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhKUubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jXhhhj(hNhNubh)}(hXRNote: if cec_register_adapter() fails, then call cec_delete_adapter() to clean up. But if cec_register_adapter() succeeded, then only call cec_unregister_adapter() to clean up, never cec_delete_adapter(). The unregister function will delete the adapter automatically once the last user of that /dev/cecX device has closed its file handle.h]hXRNote: if cec_register_adapter() fails, then call cec_delete_adapter() to clean up. But if cec_register_adapter() succeeded, then only call cec_unregister_adapter() to clean up, never cec_delete_adapter(). The unregister function will delete the adapter automatically once the last user of that /dev/cecX device has closed its file handle.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhj(hhubeh}(h]cec-adapter-interfaceah ]h"]cec adapter interfaceah$]h&]uh1hhhhhhhhK!ubh)}(hhh](h)}(h&Implementing the Low-Level CEC Adapterh]h&Implementing the Low-Level CEC Adapter}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK`ubh)}(hQThe following low-level adapter operations have to be implemented in your driver:h]hQThe following low-level adapter operations have to be implemented in your driver:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj hhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_adap_ops (C struct)c.cec_adap_opshNtauh1jGhj hhhNhNubjY)}(hhh](j^)}(h cec_adap_opsh]jd)}(hstruct cec_adap_opsh](jj)}(hjmh]hstruct}(hj hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj hhhhhKeubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj hhhhhKeubj)}(h cec_adap_opsh]j)}(hj h]h cec_adap_ops}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhhhKeubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj hhhhhKeubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j]hhhKehj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhhhKeubeh}(h]h ](jstructeh"]h$]h&]jjjj5 jj5 jjjuh1jXhhhj hNhNubh literal_block)}(hXstruct cec_adap_ops { /* Low-level callbacks */ int (*adap_enable)(struct cec_adapter *adap, bool enable); int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable); int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); void (*adap_unconfigured)(struct cec_adapter *adap); int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg); void (*adap_nb_transmit_canceled)(struct cec_adapter *adap, const struct cec_msg *msg); void (*adap_status)(struct cec_adapter *adap, struct seq_file *file); void (*adap_free)(struct cec_adapter *adap); /* Error injection callbacks */ ... /* High-level callback */ ... };h]hXstruct cec_adap_ops { /* Low-level callbacks */ int (*adap_enable)(struct cec_adapter *adap, bool enable); int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable); int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); void (*adap_unconfigured)(struct cec_adapter *adap); int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg); void (*adap_nb_transmit_canceled)(struct cec_adapter *adap, const struct cec_msg *msg); void (*adap_status)(struct cec_adapter *adap, struct seq_file *file); void (*adap_free)(struct cec_adapter *adap); /* Error injection callbacks */ ... /* High-level callback */ ... };}hj; sbah}(h]h ]h"]h$]h&]hhforcelanguagenonehighlight_args}uh1j9 hhhKghj hhubh)}(hThese low-level ops deal with various aspects of controlling the CEC adapter hardware. They are all called with the mutex adap->lock 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.}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h To enable/disable the hardware::h]hTo enable/disable the hardware:}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj: )}(h:int (*adap_enable)(struct cec_adapter *adap, bool enable);h]h:int (*adap_enable)(struct cec_adapter *adap, bool enable);}hjj sbah}(h]h ]h"]h$]h&]hhuh1j9 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.}(hjx 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 hhubj: )}(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&]hhuh1j9 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 hhubj: )}(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&]hhuh1j9 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 hhubj: )}(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&]hhuh1j9 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.}(hj 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.}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h)Called when the adapter is unconfigured::h]h(Called when the adapter is unconfigured:}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj: )}(h4void (*adap_unconfigured)(struct cec_adapter *adap);h]h4void (*adap_unconfigured)(struct cec_adapter *adap);}hjJ sbah}(h]h ]h"]h$]h&]hhuh1j9 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.}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hTo transmit a new message::h]hTo transmit a new message:}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj: )}(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);}hjt sbah}(h]h ]h"]h$]h&]hhuh1j9 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 hhubj: )}(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&]hhuh1j9 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 hhubj: )}(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&]hhuh1j9 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 hhubj: )}(h,void (*adap_free)(struct cec_adapter *adap);h]h,void (*adap_free)(struct cec_adapter *adap);}hj sbah}(h]h ]h"]h$]h&]hhuh1j9 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.}(hj 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):}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj: )}(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);}hjF sbah}(h]h ]h"]h$]h&]hhuh1j9 hhhKhj hhubh)}(hor::h]hor:}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj: )}(hDvoid cec_transmit_attempt_done(struct cec_adapter *adap, u8 status);h]hDvoid cec_transmit_attempt_done(struct cec_adapter *adap, u8 status);}hjb sbah}(h]h ]h"]h$]h&]hhuh1j9 hhhKhj hhubh)}(hThe status can be one of:h]hThe status can be one of:}(hjp 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&]uh1jhj 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&]uh1jhj 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&]uh1jhj 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.}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj 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:}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj= 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.}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjO ubah}(h]h ]h"]h$]h&]uh1jhj= 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:}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjl 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&]uh1jhjl 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:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj hhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_received_msg (C function)c.cec_received_msghNtauh1jGhj hhhNhNubjY)}(hhh](j^)}(hEvoid cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg);h]jd)}(hEvoid cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg);h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhM1ubj{)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhhhM1ubj)}(hcec_received_msgh]j)}(hcec_received_msgh]hcec_received_msg}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhM1ubj)}(h/(struct cec_adapter *adap, struct cec_msg *msg)h](j)}(hstruct cec_adapter *adaph](jj)}(hjmh]hstruct}(hjPhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjLubj{)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjpmodnameN classnameNjj)}j]j)}jj6sbc.cec_received_msgasbuh1hhjLubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubj)}(hstruct cec_msg *msgh](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(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&]uh1jzhjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhhhM1ubj)}(hjh]h;}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhM1ubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj hhhhhM1ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhM1hj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhhhM1ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjYjjYjjjuh1jXhhhj hNhNubh)}(hSpeaks for itself.h]hSpeaks for itself.}(hj]hhhNhNubah}(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}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhM7ubh)}(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&]uh1hhhhM9hjshhubh)}(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=hjshhubeh}(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&]uh1hhhhMEhjhhubj: )}(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&]hhjI jJ nonejL }uh1j9 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 }(hj9hhhNhNubj)}(h``echo clear >error-inj``h]hecho clear >error-inj}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubhb to clear any error injections without having to know the details of the driver-specific commands.}(hj9hhhNhNubeh}(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 }(hjYhhhNhNubj)}(h ``error-inj``h]h error-inj}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh shall be valid as input to }(hjYhhhNhNubj)}(h ``error-inj``h]h error-inj}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh. So this must work:}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMdhjhhubj: )}(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&]hhjI jJ nonejL }uh1j9 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&]uh1hhhhMlhjhhubj: )}(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&]hhuh1j9 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&]uh1hhhhMthjhhubj: )}(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&]hhuh1j9 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.}(hjhhhNhNubah}(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:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj: )}(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); };}hjHsbah}(h]h ]h"]h$]h&]hhjI jJ nonejL }uh1j9 hhhMhj)hhubh)}(h'Called when the adapter is configured::h]h&Called when the adapter is configured:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj: )}(h-void (*configured)(struct cec_adapter *adap);h]h-void (*configured)(struct cec_adapter *adap);}hjfsbah}(h]h ]h"]h$]h&]hhuh1j9 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.}(hjthhhNhNubah}(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)hhubj: )}(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&]hhuh1j9 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&]uh1hhhhMhjhhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_transmit_msg (C function)c.cec_transmit_msghNtauh1jGhjhhhNhNubjY)}(hhh](j^)}(heint cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, bool block);h]jd)}(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&]uh1jzhjhhhhhMubj)}(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](jj)}(hjmh]hstruct}(hj(hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj$ubj{)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj$ubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjHmodnameN classnameNjj)}j]j)}jjsbc.cec_transmit_msgasbuh1hhj$ubj{)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj$ubj)}(hjh]h*}(hjthhhNhNubah}(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](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(hhh]j)}(hcec_msgh]hcec_msg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jbc.cec_transmit_msgasbuh1hhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(h bool blockh](j)}(hboolh]hbool}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hblockh]hblock}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhhhMubj)}(hjh]h;}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjfjjfjjjuh1jXhhhjhNhNubh)}(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.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_s_phys_addr (C function)c.cec_s_phys_addrhNtauh1jGhjhhhNhNubjY)}(hhh](j^)}(hJvoid cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);h]jd)}(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&]uh1jzhjhhhhhMubj)}(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](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(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 }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hjhhhNhNubah}(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}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjDmodnameN classnameNjj)}j]jc.cec_s_phys_addrasbuh1hhj;ubj{)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj;ubj)}(h phys_addrh]h phys_addr}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubeh}(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&]uh1jzhjubj)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhhhMubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jXhhhjhNhNubh)}(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&]uh1hhhhMhjhhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT&cec_s_phys_addr_from_edid (C function)c.cec_s_phys_addr_from_edidhNtauh1jGhjhhhNhNubjY)}(hhh](j^)}(hqvoid cec_s_phys_addr_from_edid(struct cec_adapter *adap, const struct edid *edid);h]jd)}(hRvoid cec_s_phys_addr_from_edid(struct cec_adapter *adap, const struct edid *edid);h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubj{)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhhhMubj)}(hcec_s_phys_addr_from_edidh]j)}(hcec_s_phys_addr_from_edidh]hcec_s_phys_addr_from_edid}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhMubj)}(h3(struct cec_adapter *adap, const struct edid *edid)h](j)}(hstruct cec_adapter *adaph](jj)}(hjmh]hstruct}(hjWhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjSubj{)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjSubh)}(hhh]j)}(h cec_adapterh]h cec_adapter}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjwmodnameN classnameNjj)}j]j)}jj=sbc.cec_s_phys_addr_from_edidasbuh1hhjSubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjSubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(hadaph]hadap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubj)}(hconst struct edid *edidh](jj)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(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 }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hedidh]hedid}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjOubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhhhMubj)}(hjh]h;}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj{jj{jjjuh1jXhhhjhNhNubh)}(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&]uh1hhhhMhjhhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_s_log_addrs (C function)c.cec_s_log_addrshNtauh1jGhjhhhNhNubjY)}(hhh](j^)}(hoint cec_s_log_addrs(struct cec_adapter *adap, struct cec_log_addrs *log_addrs, bool block);h]jd)}(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&]uh1jzhjhhhhhMubj)}(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](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(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 }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(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)}(hstruct cec_log_addrs *log_addrsh](jj)}(hjmh]hstruct}(hjThhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjPubj{)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjPubh)}(hhh]j)}(h cec_log_addrsh]h cec_log_addrs}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjtmodnameN classnameNjj)}j]jc.cec_s_log_addrsasbuh1hhjPubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjPubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(h log_addrsh]h log_addrs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubeh}(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&]uh1jzhjubj)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhhhMubj)}(hjh]h;}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhMubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhhhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhhhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jXhhhjhNhNubh)}(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.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]cec-framework-functionsah ]h"]cec framework functionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hCEC Pin frameworkh]hCEC Pin framework}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhMubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubh)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_pin_ops (C struct) c.cec_pin_opshNtauh1jGhj9hhhNhNubjY)}(hhh](j^)}(h cec_pin_opsh]jd)}(hstruct cec_pin_opsh](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjhhhb/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&]uh1jzhjhhhjhKubj)}(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&]hhjuh1jcjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hjhKhjhhubj)}(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&]jjjjjjjjjuh1jXhhhj9hNhNubh 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubj: )}(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); };}hjsbah}(h]h ]h"]h$]h&]hhuh1j9 hb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjubh)}(h **Members**h]j)}(hj!h]hMembers}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(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)}(hj@h]hread}(hjBhhhNhNubah}(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.hhKhj:ubj)}(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.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjVubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhjUhKhj7ubj)}(h``low`` drive the CEC pin low. h](j)}(h``low``h]j)}(hjzh]hlow}(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)}(hdrive the CEC pin low.h]hdrive the CEC pin low.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhj ubj)}(hhh]h)}(h optional, disable the interrupt.h]h optional, disable the interrupt.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hKhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj;hKhj7ubj)}(hU``free`` optional. Free any allocated resources. Called when the adapter is deleted. h](j)}(h``free``h]j)}(hj_h]hfree}(hjahhhNhNubah}(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.hhKhjYubj)}(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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhjuubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhjthKhj7ubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubj)}(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}(hjhhhNhNubah}(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.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.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhj"ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj!hKhj7ubj)}(hb``received`` optional. High-level CEC message callback. Allows the driver to process CEC messages.h](j)}(h ``received``h]j)}(hjFh]hreceived}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKhj@ubj)}(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.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hKhj\ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj[hKhj7ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj9hhhNhNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK#hj9hhubh)}(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&]uh1jhjubhA 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!hj9hhubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jTcec_pin_changed (C function)c.cec_pin_changedhNtauh1jGhj9hhhNhNubjY)}(hhh](j^)}(h;void cec_pin_changed (struct cec_adapter *adap, bool value)h]jd)}(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.hhK``bool value`` when true the pin is high, otherwise it is low h](j)}(h``bool value``h]j)}(hjFh]h bool value}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhK7hj@ubj)}(hhh]h)}(h.when true the pin is high, otherwise it is lowh]h.when true the pin is high, otherwise it is low}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hK7hj\ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj[hK7hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(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.hhK9hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj9hhhNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT%cec_pin_allocate_adapter (C function)c.cec_pin_allocate_adapterhNtauh1jGhj9hhhNhNubjY)}(hhh](j^)}(hystruct cec_adapter * cec_pin_allocate_adapter (const struct cec_pin_ops *pin_ops, void *priv, const char *name, u32 caps)h]jd)}(hwstruct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops, void *priv, const char *name, u32 caps)h](jj)}(hjmh]hstruct}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKLubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhKLubh)}(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_adapterasbuh1hhjhhhjhKLubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhKLubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKLubj)}(hcec_pin_allocate_adapterh]j)}(hjh]hcec_pin_allocate_adapter}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKLubj)}(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](jj)}(hjh]hconst}(hj@hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj<ubj{)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj<ubjj)}(hjmh]hstruct}(hj[hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj<ubj{)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj<ubh)}(hhh]j)}(h cec_pin_opsh]h cec_pin_ops}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{modnameN classnameNjj)}j]jc.cec_pin_allocate_adapterasbuh1hhj<ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj<ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj)}(hpin_opsh]hpin_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubj)}(h void *privh](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hprivh]hpriv}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubj)}(hconst char *nameh](jj)}(hjh]hconst}(hj hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj ubj)}(hcharh]hchar}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj{)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj ubj)}(hjh]h*}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hnameh]hname}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubj)}(hu32 capsh](h)}(hhh]j)}(hu32h]hu32}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjomodnameN classnameNjj)}j]jc.cec_pin_allocate_adapterasbuh1hhjfubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjfubj)}(hcapsh]hcaps}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKLubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjhhhjhKLubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j]hjhKLhjhhubj)}(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&]uh1jhjhhhjhKLubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jXhhhj9hNhNubj)}(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&]uh1jhjubah}(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.hhKAhjubj)}(hhh]h)}(hlow-level pin operationsh]hlow-level pin operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKAhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKAhjubj)}(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)}(hj= h]h void *priv}(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.hhKChj7 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.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKBhjS ubah}(h]h ]h"]h$]h&]uh1jhj7 ubeh}(h]h ]h"]h$]h&]uh1jhjR hKChjubj)}(hR``const char *name`` the name of the CEC adapter. Note: this name will be copied. h](j)}(h``const char *name``h]j)}(hjw h]hconst char *name}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:490: ./include/media/cec-pin.hhKDhjq ubj)}(hhh]h)}(h*modnameN classnameNjj)}j]j)"c.cec_notifier_cec_adap_unregisterasbuh1hhj*ubj{)}(h h]h }(hjZ*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj*ubj)}(hjh]h*}(hjh*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hadaph]hadap}(hju*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubeh}(h]h ]h"]h$]h&]hhuh1jhjl)hhhj~)hKKubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjh)hhhj~)hKKubah}(h]jc)ah ](jjeh"]h$]h&]jj)jhuh1j]hj~)hKKhje)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&]uh1jhje)hhhj~)hKKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj*jj*jjjuh1jXhhhjG!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&]uh1jhj*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&]uh1jhj*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.}(hj2+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKIhj/+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj.+hKJhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjG!hhhNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT'cec_notifier_set_phys_addr (C function)c.cec_notifier_set_phys_addrhNtauh1jGhjG!hhhNhNubjY)}(hhh](j^)}(h@void cec_notifier_set_phys_addr (struct cec_notifier *n, u16 pa)h]jd)}(h?void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa)h](j)}(hvoidh]hvoid}(hjs+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjo+hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKVubj{)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjo+hhhj+hKVubj)}(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&]hhuh1jhjo+hhhj+hKVubj)}(h (struct cec_notifier *n, u16 pa)h](j)}(hstruct cec_notifier *nh](jj)}(hjmh]hstruct}(hj+hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj+ubj{)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj+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&]uh1jzhj+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}(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_addrasbuh1hhj,ubj{)}(h h]h }(hjB,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj,ubj)}(hpah]hpa}(hjP,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj+ubeh}(h]h ]h"]h$]h&]hhuh1jhjo+hhhj+hKVubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhjk+hhhj+hKVubah}(h]jf+ah ](jjeh"]h$]h&]jj)jhuh1j]hj+hKVhjh+hhubj)}(hhh]h)}(hset a new physical address.h]hset a new physical address.}(hjz,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKOhjw,hhubah}(h]h ]h"]h$]h&]uh1jhjh+hhhj+hKVubeh}(h]h ](jfunctioneh"]h$]h&]jjjj,jj,jjjuh1jXhhhjG!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&]uh1jhj,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&]uh1jhj,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&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj -hKQhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,ubh)}(h**Description**h]j)}(hj/-h]h Description}(hj1-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj--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 }(hjE-hhhNhNubj)}(h**n**h]hn}(hjM-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE-ubh == NULL.}(hjE-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKShj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjG!hhhNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT1cec_notifier_set_phys_addr_from_edid (C function)&c.cec_notifier_set_phys_addr_from_edidhNtauh1jGhjG!hhhNhNubjY)}(hhh](j^)}(h[void cec_notifier_set_phys_addr_from_edid (struct cec_notifier *n, const struct edid *edid)h]jd)}(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.hhK`ubj{)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj-hhhj-hK`ubj)}(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-hK`ubj)}(h1(struct cec_notifier *n, const struct edid *edid)h](j)}(hstruct cec_notifier *nh](jj)}(hjmh]hstruct}(hj-hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj-ubj{)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj-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&]uh1jzhj-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)}(hconst struct edid *edidh](jj)}(hjh]hconst}(hj4.hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj0.ubj{)}(h h]h }(hjA.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj0.ubjj)}(hjmh]hstruct}(hjO.hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj0.ubj{)}(h h]h }(hj\.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj0.ubh)}(hhh]j)}(hedidh]hedid}(hjm.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjo.modnameN classnameNjj)}j]j-&c.cec_notifier_set_phys_addr_from_edidasbuh1hhj0.ubj{)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj0.ubj)}(hjh]h*}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0.ubj)}(hedidh]hedid}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0.ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj-ubeh}(h]h ]h"]h$]h&]hhuh1jhj-hhhj-hK`ubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj~-hhhj-hK`ubah}(h]jy-ah ](jjeh"]h$]h&]jj)jhuh1j]hj-hK`hj{-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-hK`ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj.jj.jjjuh1jXhhhjG!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&]uh1jhj.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&]uh1jhj /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)}(hjJ/h]hconst struct edid *edid}(hjL/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH/ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhK[hjD/ubj)}(hhh]h)}(hthe struct edid pointerh]hthe struct edid pointer}(hjc/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_/hK[hj`/ubah}(h]h ]h"]h$]h&]uh1jhjD/ubeh}(h]h ]h"]h$]h&]uh1jhj_/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&]uh1jhj/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&]uh1jhj/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&]uh1jhjG!hhhNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT,cec_notifier_parse_hdmi_phandle (C function)!c.cec_notifier_parse_hdmi_phandlehNtauh1jGhjG!hhhNhNubjY)}(hhh](j^)}(hDstruct device * cec_notifier_parse_hdmi_phandle (struct device *dev)h]jd)}(hBstruct device *cec_notifier_parse_hdmi_phandle(struct device *dev)h](jj)}(hjmh]hstruct}(hj/hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj/hhhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKlubj{)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj/hhhj/hKlubh)}(hhh]j)}(hdeviceh]hdevice}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj/modnameN classnameNjj)}j]j)}jcec_notifier_parse_hdmi_phandlesb!c.cec_notifier_parse_hdmi_phandleasbuh1hhj/hhhj/hKlubj{)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj/hhhj/hKlubj)}(hjh]h*}(hj*0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hKlubj)}(hcec_notifier_parse_hdmi_phandleh]j)}(hj0h]hcec_notifier_parse_hdmi_phandle}(hj;0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj70ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj/hhhj/hKlubj)}(h(struct device *dev)h]j)}(hstruct device *devh](jj)}(hjmh]hstruct}(hjV0hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihjR0ubj{)}(h h]h }(hjc0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjR0ubh)}(hhh]j)}(hdeviceh]hdevice}(hjt0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjv0modnameN classnameNjj)}j]j0!c.cec_notifier_parse_hdmi_phandleasbuh1hhjR0ubj{)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjR0ubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR0ubj)}(hdevh]hdev}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR0ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjN0ubah}(h]h ]h"]h$]h&]hhuh1jhj/hhhj/hKlubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj/hhhj/hKlubah}(h]j/ah ](jjeh"]h$]h&]jj)jhuh1j]hj/hKlhj/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/hKlubeh}(h]h ](jfunctioneh"]h$]h&]jjjj0jj0jjjuh1jXhhhjG!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)}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhhj0ubj)}(hhh]j)}(hO``struct device *dev`` the device with the "hdmi-phandle" device tree property h](j)}(h``struct device *dev``h]j)}(hj1h]hstruct device *dev}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKehj1ubj)}(hhh]h)}(h7the device with the "hdmi-phandle" device tree propertyh]h;the device with the “hdmi-phandle” device tree property}(hj11hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-1hKehj.1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj-1hKehj1ubah}(h]h ]h"]h$]h&]uh1jhj0ubh)}(h**Description**h]j)}(hjS1h]h Description}(hjU1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ1ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKghj0ubh)}(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.}(hji1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKghj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjG!hhhNhNubjH)}(hhh]h}(h]h ]h"]h$]h&]entries](jT.cec_notifier_phys_addr_invalidate (C function)#c.cec_notifier_phys_addr_invalidatehNtauh1jGhjG!hhhNhNubjY)}(hhh](j^)}(h?void cec_notifier_phys_addr_invalidate (struct cec_notifier *n)h]jd)}(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&]uh1jzhj1hhhj1hKubj)}(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](jj)}(hjmh]hstruct}(hj1hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jihj1ubj{)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj1ubh)}(hhh]j)}(h cec_notifierh]h cec_notifier}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1modnameN classnameNjj)}j]j)}jj1sb#c.cec_notifier_phys_addr_invalidateasbuh1hhj1ubj{)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj1ubj)}(hjh]h*}(hj!2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(hjh]hn}(hj.2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj1ubah}(h]h ]h"]h$]h&]hhuh1jhj1hhhj1hKubeh}(h]h ]h"]h$]h&]hhjuh1jcjjhj1hhhj1hKubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1j]hj1hKhj1hhubj)}(hhh]h)}(h#set the physical address to INVALIDh]h#set the physical address to INVALID}(hjW2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhjT2hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj1hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjo2jjo2jjjuh1jXhhhjG!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)}(hjy2h]h Parameters}(hj{2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw2ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhjs2ubj)}(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&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hKhj2ubah}(h]h ]h"]h$]h&]uh1jhjs2ubh)}(h**Description**h]j)}(hj2h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhjs2ubh)}(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}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh == NULL.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/driver-api/media/cec-core:502: ./include/media/cec-notifier.hhKhjs2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjG!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_handlerjD3error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}(j3j3j%j"j j jpjmjjj&j#jjj6j3jD!jA!j3j3u nametypes}(j3j%j jpjj&jj6jD!j3uh}(j3hj"hj j(jVj_jj jjj9j>jjjmj j j jj jjsj#jjj)j3jjjjjjjjjjA!j9jjjjjjj3jG!jr!jw!j$j$j%&j*&jc)jh)jf+jk+jy-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.