sphinx.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/tty/tty_portmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/driver-api/tty/tty_portmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/driver-api/tty/tty_portmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/driver-api/tty/tty_portmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/driver-api/tty/tty_portmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/driver-api/tty/tty_portmodnameN 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:spacepreserveuh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port.rsthKubhsection)}(hhh](htitle)}(hTTY Porth]hTTY Port}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh](h paragraph)}(hhh]h reference)}(hhh]hTTY Port Functions}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refidtty-port-functionsuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh]hInit & Destroy}(hhhhhNhNubah}(h]id2ah ]h"]h$]h&]refid init-destroyuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hOpen/Close/Hangup Helpers}(hj hhhNhNubah}(h]id3ah ]h"]h$]h&]refidopen-close-hangup-helpersuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hTTY Refcounting}(hjBhhhNhNubah}(h]id4ah ]h"]h$]h&]refidtty-refcountinguh1hhj?ubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h TTY Helpers}(hjdhhhNhNubah}(h]id5ah ]h"]h$]h&]refid tty-helpersuh1hhjaubah}(h]h ]h"]h$]h&]uh1hhj^ubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h Modem Signals}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refid modem-signalsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hTTY Port Reference}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]refidtty-port-referenceuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hTTY Port Operations Reference}(hjhhhNhNubah}(h]id8ah ]h"]h$]h&]refidtty-port-operations-referenceuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhKhhhhubh)}(hX+The TTY drivers are advised to use struct tty_port helpers as much as possible. If the drivers implement :c:member:`tty_port.ops.activate()` and :c:member:`tty_port.ops.shutdown()`, they can use tty_port_open(), tty_port_close(), and tty_port_hangup() in respective :c:member:`tty_struct.ops` hooks.h](hiThe TTY drivers are advised to use struct tty_port helpers as much as possible. If the drivers implement }(hjhhhNhNubh)}(h#:c:member:`tty_port.ops.activate()`h]hliteral)}(hj h]htty_port.ops.activate()}(hjhhhNhNubah}(h]h ](xrefcc-membereh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/tty_port refdomainjreftypemember refexplicitrefwarn reftargettty_port.ops.activate()uh1hhhhK hjubh and }(hjhhhNhNubh)}(h#:c:member:`tty_port.ops.shutdown()`h]j)}(hj5h]htty_port.ops.shutdown()}(hj7hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypemember refexplicitrefwarnj-tty_port.ops.shutdown()uh1hhhhK hjubhV, they can use tty_port_open(), tty_port_close(), and tty_port_hangup() in respective }(hjhhhNhNubh)}(h:c:member:`tty_struct.ops`h]j)}(hjXh]htty_struct.ops}(hjZhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypemember refexplicitrefwarnj-tty_struct.opsuh1hhhhK hjubh hooks.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThe reference and details are contained in the `TTY Port Reference`_ and `TTY Port Operations Reference`_ sections at the bottom.h](h/The reference and details are contained in the }(hjhhhNhNubh)}(h`TTY Port Reference`_h]hTTY Port Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameTTY Port Referencerefidjuh1hhjresolvedKubh and }(hjhhhNhNubh)}(h `TTY Port Operations Reference`_h]hTTY Port Operations Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameTTY Port Operations Referencejjuh1hhjjKubh sections at the bottom.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hTTY Port Functionsh]hTTY Port Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]jhuh1hhjhhhhhKubh)}(hhh](h)}(hInit & Destroyh]hInit & Destroy}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singletty_port_init (C function)c.tty_port_inithNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h*void tty_port_init (struct tty_port *port)h]hdesc_signature_line)}(h)void tty_port_init(struct tty_port *port)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKZubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1j hjhhhj hKZubh desc_name)}(h tty_port_inith]h desc_sig_name)}(h tty_port_inith]h tty_port_init}(hj&hhhNhNubah}(h]h ]nah"]h$]h&]uh1j$hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhj hKZubhdesc_parameterlist)}(h(struct tty_port *port)h]hdesc_parameter)}(hstruct tty_port *porth](hdesc_sig_keyword)}(hstructh]hstruct}(hjKhhhNhNubah}(h]h ]kah"]h$]h&]uh1jIhjEubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubh)}(hhh]j%)}(htty_porth]htty_port}(hjkhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjmmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj(sbc.tty_port_initasbuh1hhjEubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjEubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjEubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj?ubah}(h]h ]h"]h$]h&]hhuh1j=hjhhhj hKZubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhj hKZubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj hKZhjhhubh desc_content)}(hhh]h)}(hinitialize tty_porth]hinitialize tty_port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKRhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hKZubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hXU**Parameters** ``struct tty_port *port`` tty_port to initialize **Description** Initializes the state of struct tty_port. When a port was initialized using this function, one has to destroy the port by tty_port_destroy(). Either indirectly by using :c:type:`tty_port` refcounting (tty_port_put()) or directly if refcounting is not used.h](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKVhj ubhdefinition_list)}(hhh]hdefinition_list_item)}(h1``struct tty_port *port`` tty_port to initialize h](hterm)}(h``struct tty_port *port``h]j)}(hj7h]hstruct tty_port *port}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKShj/ubh definition)}(hhh]h)}(htty_port to initializeh]htty_port to initialize}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhKShjOubah}(h]h ]h"]h$]h&]uh1jMhj/ubeh}(h]h ]h"]h$]h&]uh1j-hjLhKShj*ubah}(h]h ]h"]h$]h&]uh1j(hj ubh)}(h**Description**h]j)}(hjth]h Description}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKUhj ubh)}(hXInitializes the state of struct tty_port. When a port was initialized using this function, one has to destroy the port by tty_port_destroy(). Either indirectly by using :c:type:`tty_port` refcounting (tty_port_put()) or directly if refcounting is not used.h](hInitializes the state of struct tty_port. When a port was initialized using this function, one has to destroy the port by tty_port_destroy(). Either indirectly by using }(hjhhhNhNubh)}(h:c:type:`tty_port`h]j)}(hjh]htty_port}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjj)}j]sbj-tty_portuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chKUhjubhE refcounting (tty_port_put()) or directly if refcounting is not used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKUhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_destroy (C function)c.tty_port_destroyhNtauh1jhjhhhNhNubj)}(hhh](j)}(h-void tty_port_destroy (struct tty_port *port)h]j)}(h,void tty_port_destroy(struct tty_port *port)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhMubj)}(htty_port_destroyh]j%)}(htty_port_destroyh]htty_port_destroy}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjhhhjhMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<modnameN classnameNjj)}j]j)}jjsbc.tty_port_destroyasbuh1hhjubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hjuhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubah}(h]h ]h"]h$]h&]hhuh1j=hjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(hdestroy inited porth]hdestroy inited port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj )}(hX***Parameters** ``struct tty_port *port`` tty port to be destroyed **Description** When a port was initialized using tty_port_init(), one has to destroy the port by this function. Either indirectly by using :c:type:`tty_port` refcounting (tty_port_put()) or directly if refcounting is not used.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMhjubj))}(hhh]j.)}(h3``struct tty_port *port`` tty port to be destroyed h](j4)}(h``struct tty_port *port``h]j)}(hjh]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty port to be destroyedh]htty port to be destroyed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjubah}(h]h ]h"]h$]h&]uh1j(hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMhjubh)}(hWhen a port was initialized using tty_port_init(), one has to destroy the port by this function. Either indirectly by using :c:type:`tty_port` refcounting (tty_port_put()) or directly if refcounting is not used.h](h|When a port was initialized using tty_port_init(), one has to destroy the port by this function. Either indirectly by using }(hj1hhhNhNubh)}(h:c:type:`tty_port`h]j)}(hj;h]htty_port}(hj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj-tty_portuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chMhj1ubhE refcounting (tty_port_put()) or directly if refcounting is not used.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjXhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_put (C function)c.tty_port_puthNtauh1jhjhhhNhNubj)}(hhh](j)}(h)void tty_port_put (struct tty_port *port)h]j)}(h(void tty_port_put(struct tty_port *port)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM4ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhM4ubj)}(h tty_port_puth]j%)}(h tty_port_puth]h tty_port_put}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjhhhjhM4ubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_port_putasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubah}(h]h ]h"]h$]h&]hhuh1j=hjhhhjhM4ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj{hhhjhM4ubah}(h]jvah ](jjeh"]h$]h&]jj)jhuh1jhjhM4hjxhhubj)}(hhh]h)}(hdrop a reference to tty_porth]hdrop a reference to tty_port}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM.hj@hhubah}(h]h ]h"]h$]h&]uh1jhjxhhhjhM4ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj[jj[jjjuh1jhhhjhNhNubj )}(h**Parameters** ``struct tty_port *port`` port to drop a reference of (can be NULL) **Description** The final put will destroy and free up the **port** using **port->ops->destruct\(\)** hook, or using kfree() if not provided.h](h)}(h**Parameters**h]j)}(hjeh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM2hj_ubj))}(hhh]j.)}(hD``struct tty_port *port`` port to drop a reference of (can be NULL) h](j4)}(h``struct tty_port *port``h]j)}(hjh]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM/hj~ubjN)}(hhh]h)}(h)port to drop a reference of (can be NULL)h]h)port to drop a reference of (can be NULL)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM/hjubah}(h]h ]h"]h$]h&]uh1jMhj~ubeh}(h]h ]h"]h$]h&]uh1j-hjhM/hj{ubah}(h]h ]h"]h$]h&]uh1j(hj_ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM1hj_ubh)}(h}The final put will destroy and free up the **port** using **port->ops->destruct\(\)** hook, or using kfree() if not provided.h](h+The final put will destroy and free up the }(hjhhhNhNubj)}(h**port**h]hport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh using }(hjhhhNhNubj)}(h**port->ops->destruct\(\)**h]hport->ops->destruct()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh( hook, or using kfree() if not provided.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:24: ./drivers/tty/tty_port.chM1hj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]j ah ]h"]init & destroyah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hOpen/Close/Hangup Helpersh]hOpen/Close/Hangup Helpers}(hjhhhNhNubah}(h]h ]h"]h$]h&]jj)uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_shutdown (C function)c.tty_port_shutdownhNtauh1jhjhhhNhNubj)}(hhh](j)}(hFvoid tty_port_shutdown (struct tty_port *port, struct tty_struct *tty)h]j)}(hEvoid tty_port_shutdown(struct tty_port *port, struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMkubj)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj<hhhjNhMkubj)}(htty_port_shutdownh]j%)}(htty_port_shutdownh]htty_port_shutdown}(hjahhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj]ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj<hhhjNhMkubj>)}(h/(struct tty_port *port, struct tty_struct *tty)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj}hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjyubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjyubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjcsbc.tty_port_shutdownasbuh1hhjyubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjyubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjyubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjuubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jc.tty_port_shutdownasbuh1hhjubj)}(h h]h }(hj+ hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj9 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(httyh]htty}(hjF hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjuubeh}(h]h ]h"]h$]h&]hhuh1j=hj<hhhjNhMkubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj8hhhjNhMkubah}(h]j3ah ](jjeh"]h$]h&]jj)jhuh1jhjNhMkhj5hhubj)}(hhh]h)}(h&internal helper to shutdown the deviceh]h&internal helper to shutdown the device}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMbhjm hhubah}(h]h ]h"]h$]h&]uh1jhj5hhhjNhMkubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjhNhNubj )}(hXp**Parameters** ``struct tty_port *port`` tty port to be shut down ``struct tty_struct *tty`` the associated tty **Description** It is used by tty_port_hangup() and tty_port_close(). Its task is to shutdown the device if it was initialized (note consoles remain functioning). It lowers DTR/RTS (if **tty** has HUPCL set) and invokes **port->ops->shutdown\(\)**.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMfhj ubj))}(hhh](j.)}(h3``struct tty_port *port`` tty port to be shut down h](j4)}(h``struct tty_port *port``h]j)}(hj h]hstruct tty_port *port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMchj ubjN)}(hhh]h)}(htty port to be shut downh]htty port to be shut down}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMchj ubah}(h]h ]h"]h$]h&]uh1jMhj ubeh}(h]h ]h"]h$]h&]uh1j-hj hMchj ubj.)}(h.``struct tty_struct *tty`` the associated tty h](j4)}(h``struct tty_struct *tty``h]j)}(hj h]hstruct tty_struct *tty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMdhj ubjN)}(hhh]h)}(hthe associated ttyh]hthe associated tty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMdhj ubah}(h]h ]h"]h$]h&]uh1jMhj ubeh}(h]h ]h"]h$]h&]uh1j-hj hMdhj ubeh}(h]h ]h"]h$]h&]uh1j(hj ubh)}(h**Description**h]j)}(hj% h]h Description}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj# ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMfhj ubh)}(hIt is used by tty_port_hangup() and tty_port_close(). Its task is to shutdown the device if it was initialized (note consoles remain functioning). It lowers DTR/RTS (if **tty** has HUPCL set) and invokes **port->ops->shutdown\(\)**.h](hIt is used by tty_port_hangup() and tty_port_close(). Its task is to shutdown the device if it was initialized (note consoles remain functioning). It lowers DTR/RTS (if }(hj; hhhNhNubj)}(h**tty**h]htty}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj; ubh has HUPCL set) and invokes }(hj; hhhNhNubj)}(h**port->ops->shutdown\(\)**h]hport->ops->shutdown()}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj; ubh.}(hj; hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMfhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_hangup (C function)c.tty_port_hanguphNtauh1jhjhhhNhNubj)}(hhh](j)}(h,void tty_port_hangup (struct tty_port *port)h]j)}(h+void tty_port_hangup(struct tty_port *port)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhj hMubj)}(htty_port_hanguph]j%)}(htty_port_hanguph]htty_port_hangup}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj hhhj hMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubh)}(hhh]j%)}(htty_porth]htty_port}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jj sbc.tty_port_hangupasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj%)}(hporth]hport}(hj$ hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj ubah}(h]h ]h"]h$]h&]hhuh1j=hj hhhj hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hMhj hhubj)}(hhh]h)}(h hangup helperh]h hangup helper}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjK hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjf jjf jjjuh1jhhhjhNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port **Description** Perform port level tty hangup flag and count changes. Drop the tty reference. Caller holds tty lock.h](h)}(h**Parameters**h]j)}(hjp h]h Parameters}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjj ubj))}(hhh]j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hj h]hstruct tty_port *port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubjN)}(hhh]h)}(htty porth]htty port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jMhj ubeh}(h]h ]h"]h$]h&]uh1j-hj hMhj ubah}(h]h ]h"]h$]h&]uh1j(hjj ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjj ubh)}(hMPerform port level tty hangup flag and count changes. Drop the tty reference.h]hMPerform port level tty hangup flag and count changes. Drop the tty reference.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjj ubh)}(hCaller holds tty lock.h]hCaller holds tty lock.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%tty_port_block_til_ready (C function)c.tty_port_block_til_readyhNtauh1jhjhhhNhNubj)}(hhh](j)}(h_int tty_port_block_til_ready (struct tty_port *port, struct tty_struct *tty, struct file *filp)h]j)}(h^int tty_port_block_til_ready(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj- hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhj, hMubj)}(htty_port_block_til_readyh]j%)}(htty_port_block_til_readyh]htty_port_block_til_ready}(hj? hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj; ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj hhhj, hMubj>)}(hB(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj[ hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjW ubj)}(h h]h }(hjh hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjW ubh)}(hhh]j%)}(htty_porth]htty_port}(hjy hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjv ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{ modnameN classnameNjj)}j]j)}jjA sbc.tty_port_block_til_readyasbuh1hhjW ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjW ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW ubj%)}(hporth]hport}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjW ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjS ubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hj hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.tty_port_block_til_readyasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj%)}(httyh]htty}(hj$ hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjS ubjD)}(hstruct file *filph](jJ)}(hjMh]hstruct}(hj= hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj9 ubj)}(h h]h }(hjJ hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj9 ubh)}(hhh]j%)}(hfileh]hfile}(hj[ hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjX ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj] modnameN classnameNjj)}j]j c.tty_port_block_til_readyasbuh1hhj9 ubj)}(h h]h }(hjy hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj9 ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9 ubj%)}(hfilph]hfilp}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj9 ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjS ubeh}(h]h ]h"]h$]h&]hhuh1j=hj hhhj, hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj, hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj, hMhj hhubj)}(hhh]h)}(hWaiting logic for tty openh]hWaiting logic for tty open}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj, hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjhNhNubj )}(hXs**Parameters** ``struct tty_port *port`` the tty port being opened ``struct tty_struct *tty`` the tty device being bound ``struct file *filp`` the file pointer of the opener or ``NULL`` **Description** Implement the core POSIX/SuS tty behaviour when opening a tty device. Handles: - hangup (both before and during) - non blocking open - rts/dtr/dcd - signals - port flags and counts The passed **port** must implement the **port->ops->carrier_raised** method if it can do carrier detect and the **port->ops->dtr_rts** method if it supports software management of these lines. Note that the dtr/rts raise is done each iteration as a hangup may have previously dropped them while we wait. Caller holds tty lock. **Note** May drop and reacquire tty lock when blocking, so **tty** and **port** may have changed state (eg., may have been hung up).h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubj))}(hhh](j.)}(h4``struct tty_port *port`` the tty port being opened h](j4)}(h``struct tty_port *port``h]j)}(hj h]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubjN)}(hhh]h)}(hthe tty port being openedh]hthe tty port being opened}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhj ubeh}(h]h ]h"]h$]h&]uh1j-hjhMhj ubj.)}(h6``struct tty_struct *tty`` the tty device being bound h](j4)}(h``struct tty_struct *tty``h]j)}(hj8h]hstruct tty_struct *tty}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj2ubjN)}(hhh]h)}(hthe tty device being boundh]hthe tty device being bound}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjNubah}(h]h ]h"]h$]h&]uh1jMhj2ubeh}(h]h ]h"]h$]h&]uh1j-hjMhMhj ubj.)}(hA``struct file *filp`` the file pointer of the opener or ``NULL`` h](j4)}(h``struct file *filp``h]j)}(hjqh]hstruct file *filp}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjkubjN)}(hhh]h)}(h*the file pointer of the opener or ``NULL``h](h"the file pointer of the opener or }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjkubeh}(h]h ]h"]h$]h&]uh1j-hjhMhj ubeh}(h]h ]h"]h$]h&]uh1j(hj ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubh)}(hNImplement the core POSIX/SuS tty behaviour when opening a tty device. Handles:h]hNImplement the core POSIX/SuS tty behaviour when opening a tty device. Handles:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubh block_quote)}(hf- hangup (both before and during) - non blocking open - rts/dtr/dcd - signals - port flags and counts h]h)}(hhh](h)}(hhangup (both before and during)h]h)}(hjh]hhangup (both before and during)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hnon blocking openh]h)}(hjh]hnon blocking open}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h rts/dtr/dcdh]h)}(hjh]h rts/dtr/dcd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hsignalsh]h)}(hj2h]hsignals}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj0ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hport flags and counts h]h)}(hport flags and countsh]hport flags and counts}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjHubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]bullet-uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhj ubh)}(hX/The passed **port** must implement the **port->ops->carrier_raised** method if it can do carrier detect and the **port->ops->dtr_rts** method if it supports software management of these lines. Note that the dtr/rts raise is done each iteration as a hangup may have previously dropped them while we wait.h](h The passed }(hjohhhNhNubj)}(h**port**h]hport}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh must implement the }(hjohhhNhNubj)}(h**port->ops->carrier_raised**h]hport->ops->carrier_raised}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh, method if it can do carrier detect and the }(hjohhhNhNubj)}(h**port->ops->dtr_rts**h]hport->ops->dtr_rts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh method if it supports software management of these lines. Note that the dtr/rts raise is done each iteration as a hangup may have previously dropped them while we wait.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubh)}(hCaller holds tty lock.h]hCaller holds tty lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubh)}(h**Note**h]j)}(hjh]hNote}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubh)}(h{May drop and reacquire tty lock when blocking, so **tty** and **port** may have changed state (eg., may have been hung up).h](h2May drop and reacquire tty lock when blocking, so }(hjhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h**port**h]hport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5 may have changed state (eg., may have been hung up).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!tty_port_close_start (C function)c.tty_port_close_starthNtauh1jhjhhhNhNubj)}(hhh](j)}(h[int tty_port_close_start (struct tty_port *port, struct tty_struct *tty, struct file *filp)h]j)}(hZint tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](j)}(hinth]hint}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMqubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj*hhhj<hMqubj)}(htty_port_close_starth]j%)}(htty_port_close_starth]htty_port_close_start}(hjOhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjKubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj*hhhj<hMqubj>)}(hB(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjkhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjgubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjgubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjQsbc.tty_port_close_startasbuh1hhjgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjgubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjgubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjcubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_port_close_startasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(httyh]htty}(hj4hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjcubjD)}(hstruct file *filph](jJ)}(hjMh]hstruct}(hjMhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjIubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjIubh)}(hhh]j%)}(hfileh]hfile}(hjkhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmmodnameN classnameNjj)}j]jc.tty_port_close_startasbuh1hhjIubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjIubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubj%)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjIubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjcubeh}(h]h ]h"]h$]h&]hhuh1j=hj*hhhj<hMqubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj&hhhj<hMqubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1jhj<hMqhj#hhubj)}(hhh]h)}(h$helper for tty->ops->close, part 1/2h]h$helper for tty->ops->close, part 1/2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMchjhhubah}(h]h ]h"]h$]h&]uh1jhj#hhhj<hMqubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj )}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_struct *tty`` tty being closed ``struct file *filp`` passed file pointer **Description** Decrements and checks open count. Flushes the port if this is the last close. That means, dropping the data from the outpu buffer on the device and waiting for sending logic to finish. The rest of close handling is performed in tty_port_close_end(). Locking: Caller holds tty lock. **Return** 1 if this is the last close, otherwise 0h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMghjubj))}(hhh](j.)}(h1``struct tty_port *port`` tty_port of the device h](j4)}(h``struct tty_port *port``h]j)}(hjh]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMdhj ubjN)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMdhj%ubah}(h]h ]h"]h$]h&]uh1jMhj ubeh}(h]h ]h"]h$]h&]uh1j-hj$hMdhjubj.)}(h,``struct tty_struct *tty`` tty being closed h](j4)}(h``struct tty_struct *tty``h]j)}(hjHh]hstruct tty_struct *tty}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMehjBubjN)}(hhh]h)}(htty being closedh]htty being closed}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMehj^ubah}(h]h ]h"]h$]h&]uh1jMhjBubeh}(h]h ]h"]h$]h&]uh1j-hj]hMehjubj.)}(h*``struct file *filp`` passed file pointer h](j4)}(h``struct file *filp``h]j)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMfhj{ubjN)}(hhh]h)}(hpassed file pointerh]hpassed file pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubah}(h]h ]h"]h$]h&]uh1jMhj{ubeh}(h]h ]h"]h$]h&]uh1j-hjhMfhjubeh}(h]h ]h"]h$]h&]uh1j(hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhhjubh)}(hDecrements and checks open count. Flushes the port if this is the last close. That means, dropping the data from the outpu buffer on the device and waiting for sending logic to finish. The rest of close handling is performed in tty_port_close_end().h]hDecrements and checks open count. Flushes the port if this is the last close. That means, dropping the data from the outpu buffer on the device and waiting for sending logic to finish. The rest of close handling is performed in tty_port_close_end().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhhjubh)}(hLocking: Caller holds tty lock.h]hLocking: Caller holds tty lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMmhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMohjubh)}(h(1 if this is the last close, otherwise 0h]h(1 if this is the last close, otherwise 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMohjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_close_end (C function)c.tty_port_close_endhNtauh1jhjhhhNhNubj)}(hhh](j)}(hGvoid tty_port_close_end (struct tty_port *port, struct tty_struct *tty)h]j)}(hFvoid tty_port_close_end(struct tty_port *port, struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj3hhhjEhMubj)}(htty_port_close_endh]j%)}(htty_port_close_endh]htty_port_close_end}(hjXhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjTubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj3hhhjEhMubj>)}(h/(struct tty_port *port, struct tty_struct *tty)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjthhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjpubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjZsbc.tty_port_close_endasbuh1hhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjpubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjpubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjlubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_port_close_endasbuh1hhjubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(httyh]htty}(hj=hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjlubeh}(h]h ]h"]h$]h&]hhuh1j=hj3hhhjEhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj/hhhjEhMubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1jhjEhMhj,hhubj)}(hhh]h)}(h$helper for tty->ops->close, part 2/2h]h$helper for tty->ops->close, part 2/2}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjdhhubah}(h]h ]h"]h$]h&]uh1jhj,hhhjEhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj )}(hXv**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_struct *tty`` tty being closed **Description** This is a continuation of the first part: tty_port_close_start(). This should be called after turning off the device. It flushes the data from the line discipline and delays the close by **port->close_delay**. Locking: Caller holds tty lock.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubj))}(hhh](j.)}(h1``struct tty_port *port`` tty_port of the device h](j4)}(h``struct tty_port *port``h]j)}(hjh]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjubj.)}(h,``struct tty_struct *tty`` tty being closed h](j4)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty being closedh]htty being closed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjubeh}(h]h ]h"]h$]h&]uh1j(hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubh)}(hThis is a continuation of the first part: tty_port_close_start(). This should be called after turning off the device. It flushes the data from the line discipline and delays the close by **port->close_delay**.h](hThis is a continuation of the first part: tty_port_close_start(). This should be called after turning off the device. It flushes the data from the line discipline and delays the close by }(hj2hhhNhNubj)}(h**port->close_delay**h]hport->close_delay}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubh)}(hLocking: Caller holds tty lock.h]hLocking: Caller holds tty lock.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_close (C function)c.tty_port_closehNtauh1jhjhhhNhNubj)}(hhh](j)}(hVvoid tty_port_close (struct tty_port *port, struct tty_struct *tty, struct file *filp)h]j)}(hUvoid tty_port_close(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj~hhhjhMubj)}(htty_port_closeh]j%)}(htty_port_closeh]htty_port_close}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj~hhhjhMubj>)}(hB(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_port_closeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hj1hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj-ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj-ubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hjOhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjLubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjQmodnameN classnameNjj)}j]jc.tty_port_closeasbuh1hhj-ubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj-ubj)}(hjh]h*}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj%)}(httyh]htty}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct file *filph](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_port_closeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubeh}(h]h ]h"]h$]h&]hhuh1j=hj~hhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjzhhhjhMubah}(h]juah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjwhhubj)}(hhh]h)}(hgeneric tty->ops->close handlerh]hgeneric tty->ops->close handler}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjwhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj:jj:jjjuh1jhhhjhNhNubj )}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_struct *tty`` tty being closed ``struct file *filp`` passed file pointer **Description** It is a generic helper to be used in driver's **tty->ops->close**. It wraps a sequence of tty_port_close_start(), tty_port_shutdown(), and tty_port_close_end(). The latter two are called only if this is the last close. See the respective functions for the details. Locking: Caller holds tty lockh](h)}(h**Parameters**h]j)}(hjDh]h Parameters}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj>ubj))}(hhh](j.)}(h1``struct tty_port *port`` tty_port of the device h](j4)}(h``struct tty_port *port``h]j)}(hjch]hstruct tty_port *port}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj]ubjN)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMhjyubah}(h]h ]h"]h$]h&]uh1jMhj]ubeh}(h]h ]h"]h$]h&]uh1j-hjxhMhjZubj.)}(h,``struct tty_struct *tty`` tty being closed h](j4)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty being closedh]htty being closed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjZubj.)}(h*``struct file *filp`` passed file pointer h](j4)}(h``struct file *filp``h]j)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(hpassed file pointerh]hpassed file pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjZubeh}(h]h ]h"]h$]h&]uh1j(hj>ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj>ubh)}(hXIt is a generic helper to be used in driver's **tty->ops->close**. It wraps a sequence of tty_port_close_start(), tty_port_shutdown(), and tty_port_close_end(). The latter two are called only if this is the last close. See the respective functions for the details.h](h0It is a generic helper to be used in driver’s }(hj&hhhNhNubj)}(h**tty->ops->close**h]htty->ops->close}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh. It wraps a sequence of tty_port_close_start(), tty_port_shutdown(), and tty_port_close_end(). The latter two are called only if this is the last close. See the respective functions for the details.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj>ubh)}(hLocking: Caller holds tty lockh]hLocking: Caller holds tty lock}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_install (C function)c.tty_port_installhNtauh1jhjhhhNhNubj)}(hhh](j)}(h_int tty_port_install (struct tty_port *port, struct tty_driver *driver, struct tty_struct *tty)h]j)}(h^int tty_port_install(struct tty_port *port, struct tty_driver *driver, struct tty_struct *tty)h](j)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjrhhhjhMubj)}(htty_port_installh]j%)}(htty_port_installh]htty_port_install}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjrhhhjhMubj>)}(hJ(struct tty_port *port, struct tty_driver *driver, struct tty_struct *tty)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_port_installasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct tty_driver *driverh](jJ)}(hjMh]hstruct}(hj%hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj!ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubh)}(hhh]j%)}(h tty_driverh]h tty_driver}(hjChhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjEmodnameN classnameNjj)}j]jc.tty_port_installasbuh1hhj!ubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubj)}(hjh]h*}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj%)}(hdriverh]hdriver}(hj|hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_port_installasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(httyh]htty}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubeh}(h]h ]h"]h$]h&]hhuh1j=hjrhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjnhhhjhMubah}(h]jiah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjkhhubj)}(hhh]h)}(h!generic tty->ops->install handlerh]h!generic tty->ops->install handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjkhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj.jj.jjjuh1jhhhjhNhNubj )}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_driver *driver`` tty_driver for this device ``struct tty_struct *tty`` tty to be installed **Description** It is the same as tty_standard_install() except the provided **port** is linked to a concrete tty specified by **tty**. Use this or tty_port_register_device() (or both). Call tty_port_link_device() as a last resort.h](h)}(h**Parameters**h]j)}(hj8h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj2ubj))}(hhh](j.)}(h1``struct tty_port *port`` tty_port of the device h](j4)}(h``struct tty_port *port``h]j)}(hjWh]hstruct tty_port *port}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjQubjN)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMhjmubah}(h]h ]h"]h$]h&]uh1jMhjQubeh}(h]h ]h"]h$]h&]uh1j-hjlhMhjNubj.)}(h9``struct tty_driver *driver`` tty_driver for this device h](j4)}(h``struct tty_driver *driver``h]j)}(hjh]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty_driver for this deviceh]htty_driver for this device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjNubj.)}(h/``struct tty_struct *tty`` tty to be installed h](j4)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty to be installedh]htty to be installed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjNubeh}(h]h ]h"]h$]h&]uh1j(hj2ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj2ubh)}(hIt is the same as tty_standard_install() except the provided **port** is linked to a concrete tty specified by **tty**. Use this or tty_port_register_device() (or both). Call tty_port_link_device() as a last resort.h](h=It is the same as tty_standard_install() except the provided }(hjhhhNhNubj)}(h**port**h]hport}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* is linked to a concrete tty specified by }(hjhhhNhNubj)}(h**tty**h]htty}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubha. Use this or tty_port_register_device() (or both). Call tty_port_link_device() as a last resort.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_open (C function)c.tty_port_openhNtauh1jhjhhhNhNubj)}(hhh](j)}(hTint tty_port_open (struct tty_port *port, struct tty_struct *tty, struct file *filp)h]j)}(hSint tty_port_open(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](j)}(hinth]hint}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjihhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjihhhj{hMubj)}(h tty_port_openh]j%)}(h tty_port_openh]h tty_port_open}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhjihhhj{hMubj>)}(hB(struct tty_port *port, struct tty_struct *tty, struct file *filp)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_port_openasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<modnameN classnameNjj)}j]jc.tty_port_openasbuh1hhjubj)}(h h]h }(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(httyh]htty}(hjshhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubjD)}(hstruct file *filph](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_port_openasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubeh}(h]h ]h"]h$]h&]hhuh1j=hjihhhj{hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjehhhj{hMubah}(h]j`ah ](jjeh"]h$]h&]jj)jhuh1jhj{hMhjbhhubj)}(hhh]h)}(hgeneric tty->ops->open handlerh]hgeneric tty->ops->open handler}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhjbhhhj{hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj%jj%jjjuh1jhhhjhNhNubj )}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_struct *tty`` tty to be opened ``struct file *filp`` passed file pointer **Description** It is a generic helper to be used in driver's **tty->ops->open**. It activates the devices using **port->ops->activate** if not active already. And waits for the device to be ready using tty_port_block_til_ready() (e.g. raises DTR/CTS and waits for carrier). Note that **port->ops->shutdown** is not called when **port->ops->activate** returns an error (on the contrary, **tty->ops->close** is). Locking: Caller holds tty lock. **Note** may drop and reacquire tty lock (in tty_port_block_til_ready()) so **tty** and **port** may have changed state (eg., may be hung up now).h](h)}(h**Parameters**h]j)}(hj/h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubj))}(hhh](j.)}(h1``struct tty_port *port`` tty_port of the device h](j4)}(h``struct tty_port *port``h]j)}(hjNh]hstruct tty_port *port}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjHubjN)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMhjdubah}(h]h ]h"]h$]h&]uh1jMhjHubeh}(h]h ]h"]h$]h&]uh1j-hjchMhjEubj.)}(h,``struct tty_struct *tty`` tty to be opened h](j4)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(htty to be openedh]htty to be opened}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjEubj.)}(h*``struct file *filp`` passed file pointer h](j4)}(h``struct file *filp``h]j)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhjubjN)}(hhh]h)}(hpassed file pointerh]hpassed file pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jMhjubeh}(h]h ]h"]h$]h&]uh1j-hjhMhjEubeh}(h]h ]h"]h$]h&]uh1j(hj)ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubh)}(hXIt is a generic helper to be used in driver's **tty->ops->open**. It activates the devices using **port->ops->activate** if not active already. And waits for the device to be ready using tty_port_block_til_ready() (e.g. raises DTR/CTS and waits for carrier).h](h0It is a generic helper to be used in driver’s }(hjhhhNhNubj)}(h**tty->ops->open**h]htty->ops->open}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh!. It activates the devices using }(hjhhhNhNubj)}(h**port->ops->activate**h]hport->ops->activate}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if not active already. And waits for the device to be ready using tty_port_block_til_ready() (e.g. raises DTR/CTS and waits for carrier).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubh)}(hNote that **port->ops->shutdown** is not called when **port->ops->activate** returns an error (on the contrary, **tty->ops->close** is).h](h Note that }(hjDhhhNhNubj)}(h**port->ops->shutdown**h]hport->ops->shutdown}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh is not called when }(hjDhhhNhNubj)}(h**port->ops->activate**h]hport->ops->activate}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh$ returns an error (on the contrary, }(hjDhhhNhNubj)}(h**tty->ops->close**h]htty->ops->close}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh is).}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubh)}(hLocking: Caller holds tty lock.h]hLocking: Caller holds tty lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubh)}(h**Note**h]j)}(hjh]hNote}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubh)}(hmay drop and reacquire tty lock (in tty_port_block_til_ready()) so **tty** and **port** may have changed state (eg., may be hung up now).h](hCmay drop and reacquire tty lock (in tty_port_block_til_ready()) so }(hjhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h**port**h]hport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 may have changed state (eg., may be hung up now).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:31: ./drivers/tty/tty_port.chMhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]j/ah ]h"]open/close/hangup helpersah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hTTY Refcountingh]hTTY Refcounting}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjKuh1hhjhhhhhK%ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_tty_get (C function)c.tty_port_tty_gethNtauh1jhjhhhNhNubj)}(hhh](j)}(h)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjhhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j%)}(htty_porth]htty_port}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jVc.tty_port_tty_getasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj%)}(hporth]hport}(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjubah}(h]h ]h"]h$]h&]hhuh1j=hjhhhj(hMBubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhj(hMBubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhj(hMBhjhhubj)}(hhh]h)}(hget a tty referenceh]hget a tty reference}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chM<hj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj(hMBubeh}(h]h ](jfunctioneh"]h$]h&]jjjj. jj. jjjuh1jhhhjhNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port **Description** Return a refcount protected tty instance or ``NULL`` if the port is not associated with a tty (eg due to close or hangup).h](h)}(h**Parameters**h]j)}(hj8 h]h Parameters}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6 ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chM@hj2 ubj))}(hhh]j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hjW h]hstruct tty_port *port}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chM=hjQ ubjN)}(hhh]h)}(htty porth]htty port}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl hM=hjm ubah}(h]h ]h"]h$]h&]uh1jMhjQ ubeh}(h]h ]h"]h$]h&]uh1j-hjl hM=hjN ubah}(h]h ]h"]h$]h&]uh1j(hj2 ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chM?hj2 ubh)}(hzReturn a refcount protected tty instance or ``NULL`` if the port is not associated with a tty (eg due to close or hangup).h](h,Return a refcount protected tty instance or }(hj hhhNhNubj)}(h``NULL``h]hNULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhF if the port is not associated with a tty (eg due to close or hangup).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chM?hj2 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_tty_set (C function)c.tty_port_tty_sethNtauh1jhjhhhNhNubj)}(hhh](j)}(hEvoid tty_port_tty_set (struct tty_port *port, struct tty_struct *tty)h]j)}(hDvoid tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMVubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhj hMVubj)}(htty_port_tty_seth]j%)}(htty_port_tty_seth]htty_port_tty_set}(hj !hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj!ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj hhhj hMVubj>)}(h/(struct tty_port *port, struct tty_struct *tty)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj&!hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj"!ubj)}(h h]h }(hj3!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj"!ubh)}(hhh]j%)}(htty_porth]htty_port}(hjD!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjA!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjF!modnameN classnameNjj)}j]j)}jj !sbc.tty_port_tty_setasbuh1hhj"!ubj)}(h h]h }(hjd!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj"!ubj)}(hjh]h*}(hjr!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"!ubj%)}(hporth]hport}(hj!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj"!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj!ubjD)}(hstruct tty_struct *ttyh](jJ)}(hjMh]hstruct}(hj!hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubh)}(hhh]j%)}(h tty_structh]h tty_struct}(hj!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]j`!c.tty_port_tty_setasbuh1hhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubj)}(hjh]h*}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj%)}(httyh]htty}(hj!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj!ubeh}(h]h ]h"]h$]h&]hhuh1j=hj hhhj hMVubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hMVubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hMVhj hhubj)}(hhh]h)}(hset the tty of a porth]hset the tty of a port}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMOhj"hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMVubeh}(h]h ](jfunctioneh"]h$]h&]jjjj1"jj1"jjjuh1jhhhjhNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port ``struct tty_struct *tty`` the tty **Description** Associate the port and tty pair. Manages any internal refcounts. Pass ``NULL`` to deassociate a port.h](h)}(h**Parameters**h]j)}(hj;"h]h Parameters}(hj="hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9"ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMShj5"ubj))}(hhh](j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hjZ"h]hstruct tty_port *port}(hj\"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX"ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMPhjT"ubjN)}(hhh]h)}(htty porth]htty port}(hjs"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo"hMPhjp"ubah}(h]h ]h"]h$]h&]uh1jMhjT"ubeh}(h]h ]h"]h$]h&]uh1j-hjo"hMPhjQ"ubj.)}(h#``struct tty_struct *tty`` the tty h](j4)}(h``struct tty_struct *tty``h]j)}(hj"h]hstruct tty_struct *tty}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMQhj"ubjN)}(hhh]h)}(hthe ttyh]hthe tty}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMQhj"ubah}(h]h ]h"]h$]h&]uh1jMhj"ubeh}(h]h ]h"]h$]h&]uh1j-hj"hMQhjQ"ubeh}(h]h ]h"]h$]h&]uh1j(hj5"ubh)}(h**Description**h]j)}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMShj5"ubh)}(heAssociate the port and tty pair. Manages any internal refcounts. Pass ``NULL`` to deassociate a port.h](hFAssociate the port and tty pair. Manages any internal refcounts. Pass }(hj"hhhNhNubj)}(h``NULL``h]hNULL}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh to deassociate a port.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:39: ./drivers/tty/tty_port.chMShj5"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]jQah ]h"]tty refcountingah$]h&]uh1hhjhhhhhK%ubh)}(hhh](h)}(h TTY Helpersh]h TTY Helpers}(hj#hhhNhNubah}(h]h ]h"]h$]h&]jjmuh1hhj#hhhhhK+ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j tty_port_tty_hangup (C function)c.tty_port_tty_hanguphNtauh1jhj#hhhNhNubj)}(hhh](j)}(hCvoid tty_port_tty_hangup (struct tty_port *port, bool check_clocal)h]j)}(hBvoid tty_port_tty_hangup(struct tty_port *port, bool check_clocal)h](j)}(hvoidh]hvoid}(hj=#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9#hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMubj)}(h h]h }(hjL#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj9#hhhjK#hMubj)}(htty_port_tty_hanguph]j%)}(htty_port_tty_hanguph]htty_port_tty_hangup}(hj^#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjZ#ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj9#hhhjK#hMubj>)}(h*(struct tty_port *port, bool check_clocal)h](jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjz#hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjv#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjv#ubh)}(hhh]j%)}(htty_porth]htty_port}(hj#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j)}jj`#sbc.tty_port_tty_hangupasbuh1hhjv#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjv#ubj)}(hjh]h*}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv#ubj%)}(hporth]hport}(hj#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjv#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjr#ubjD)}(hbool check_clocalh](j)}(hboolh]hbool}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj#ubj%)}(h check_clocalh]h check_clocal}(hj$hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjr#ubeh}(h]h ]h"]h$]h&]hhuh1j=hj9#hhhjK#hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj5#hhhjK#hMubah}(h]j0#ah ](jjeh"]h$]h&]jj)jhuh1jhjK#hMhj2#hhubj)}(hhh]h)}(hhelper to hang up a ttyh]hhelper to hang up a tty}(hj2$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj/$hhubah}(h]h ]h"]h$]h&]uh1jhj2#hhhjK#hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjJ$jjJ$jjjuh1jhhhj#hNhNubj )}(hs**Parameters** ``struct tty_port *port`` tty port ``bool check_clocal`` hang only ttys with ``CLOCAL`` unset?h](h)}(h**Parameters**h]j)}(hjT$h]h Parameters}(hjV$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR$ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhjN$ubj))}(hhh](j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hjs$h]hstruct tty_port *port}(hju$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjq$ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhjm$ubjN)}(hhh]h)}(htty porth]htty port}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jMhjm$ubeh}(h]h ]h"]h$]h&]uh1j-hj$hMhjj$ubj.)}(h;``bool check_clocal`` hang only ttys with ``CLOCAL`` unset?h](j4)}(h``bool check_clocal``h]j)}(hj$h]hbool check_clocal}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj$ubjN)}(hhh]h)}(h%hang only ttys with ``CLOCAL`` unset?h](hhang only ttys with }(hj$hhhNhNubj)}(h ``CLOCAL``h]hCLOCAL}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh unset?}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj$ubah}(h]h ]h"]h$]h&]uh1jMhj$ubeh}(h]h ]h"]h$]h&]uh1j-hj$hMhjj$ubeh}(h]h ]h"]h$]h&]uh1j(hjN$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j tty_port_tty_wakeup (C function)c.tty_port_tty_wakeuphNtauh1jhj#hhhNhNubj)}(hhh](j)}(h0void tty_port_tty_wakeup (struct tty_port *port)h]j)}(h/void tty_port_tty_wakeup(struct tty_port *port)h](j)}(hvoidh]hvoid}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj'%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj%hhhj&%hMubj)}(htty_port_tty_wakeuph]j%)}(htty_port_tty_wakeuph]htty_port_tty_wakeup}(hj9%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5%ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj%hhhj&%hMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjU%hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjQ%ubj)}(h h]h }(hjb%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjQ%ubh)}(hhh]j%)}(htty_porth]htty_port}(hjs%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjp%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetju%modnameN classnameNjj)}j]j)}jj;%sbc.tty_port_tty_wakeupasbuh1hhjQ%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjQ%ubj)}(hjh]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ%ubj%)}(hporth]hport}(hj%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjQ%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChjM%ubah}(h]h ]h"]h$]h&]hhuh1j=hj%hhhj&%hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj%hhhj&%hMubah}(h]j %ah ](jjeh"]h$]h&]jj)jhuh1jhj&%hMhj %hhubj)}(hhh]h)}(hhelper to wake up a ttyh]hhelper to wake up a tty}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj%hhubah}(h]h ]h"]h$]h&]uh1jhj %hhhj&%hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj%jj%jjjuh1jhhhj#hNhNubj )}(h4**Parameters** ``struct tty_port *port`` tty porth](h)}(h**Parameters**h]j)}(hj%h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj%ubj))}(hhh]j.)}(h"``struct tty_port *port`` tty porth](j4)}(h``struct tty_port *port``h]j)}(hj&h]hstruct tty_port *port}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj&ubjN)}(hhh]h)}(htty porth]htty port}(hj2&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:45: ./drivers/tty/tty_port.chMhj/&ubah}(h]h ]h"]h$]h&]uh1jMhj&ubeh}(h]h ]h"]h$]h&]uh1j-hj.&hMhj&ubah}(h]h ]h"]h$]h&]uh1j(hj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj#hhhNhNubeh}(h]jsah ]h"] tty helpersah$]h&]uh1hhjhhhhhK+ubh)}(hhh](h)}(h Modem Signalsh]h Modem Signals}(hjd&hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhja&hhhhhK2ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$tty_port_carrier_raised (C function)c.tty_port_carrier_raisedhNtauh1jhja&hhhNhNubj)}(hhh](j)}(h4bool tty_port_carrier_raised (struct tty_port *port)h]j)}(h3bool tty_port_carrier_raised(struct tty_port *port)h](j)}(hj#h]hbool}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj&hhhj&hMubj)}(htty_port_carrier_raisedh]j%)}(htty_port_carrier_raisedh]htty_port_carrier_raised}(hj&hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj&ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj&hhhj&hMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj&hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj&ubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj&ubh)}(hhh]j%)}(htty_porth]htty_port}(hj&hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&modnameN classnameNjj)}j]j)}jj&sbc.tty_port_carrier_raisedasbuh1hhj&ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj&ubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj%)}(hporth]hport}(hj 'hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj&ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj&ubah}(h]h ]h"]h$]h&]hhuh1j=hj&hhhj&hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj&hhhj&hMubah}(h]j~&ah ](jjeh"]h$]h&]jj)jhuh1jhj&hMhj&hhubj)}(hhh]h)}(hcarrier raised checkh]hcarrier raised check}(hjJ'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjG'hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj&hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjb'jjb'jjjuh1jhhhja&hNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port **Description** Wrapper for the carrier detect logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h](h)}(h**Parameters**h]j)}(hjl'h]h Parameters}(hjn'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj'ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjf'ubj))}(hhh]j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hj'h]hstruct tty_port *port}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj'ubjN)}(hhh]h)}(htty porth]htty port}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jMhj'ubeh}(h]h ]h"]h$]h&]uh1j-hj'hMhj'ubah}(h]h ]h"]h$]h&]uh1j(hjf'ubh)}(h**Description**h]j)}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjf'ubh)}(hWrapper for the carrier detect logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h]hWrapper for the carrier detect logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjf'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhja&hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#tty_port_raise_dtr_rts (C function)c.tty_port_raise_dtr_rtshNtauh1jhja&hhhNhNubj)}(hhh](j)}(h3void tty_port_raise_dtr_rts (struct tty_port *port)h]j)}(h2void tty_port_raise_dtr_rts(struct tty_port *port)h](j)}(hvoidh]hvoid}(hj (hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj(hhhj(hMubj)}(htty_port_raise_dtr_rtsh]j%)}(htty_port_raise_dtr_rtsh]htty_port_raise_dtr_rts}(hj,(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj((ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj(hhhj(hMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hjH(hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhjD(ubj)}(h h]h }(hjU(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjD(ubh)}(hhh]j%)}(htty_porth]htty_port}(hjf(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjc(ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjh(modnameN classnameNjj)}j]j)}jj.(sbc.tty_port_raise_dtr_rtsasbuh1hhjD(ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjD(ubj)}(hjh]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD(ubj%)}(hporth]hport}(hj(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjD(ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj@(ubah}(h]h ]h"]h$]h&]hhuh1j=hj(hhhj(hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj(hhhj(hMubah}(h]j'ah ](jjeh"]h$]h&]jj)jhuh1jhj(hMhj(hhubj)}(hhh]h)}(h Raise DTR/RTSh]h Raise DTR/RTS}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj(hhubah}(h]h ]h"]h$]h&]uh1jhj(hhhj(hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj(jj(jjjuh1jhhhja&hNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port **Description** Wrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h](h)}(h**Parameters**h]j)}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj(ubj))}(hhh]j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hj )h]hstruct tty_port *port}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj )ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj)ubjN)}(hhh]h)}(htty porth]htty port}(hj%)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!)hMhj")ubah}(h]h ]h"]h$]h&]uh1jMhj)ubeh}(h]h ]h"]h$]h&]uh1j-hj!)hMhj)ubah}(h]h ]h"]h$]h&]uh1j(hj(ubh)}(h**Description**h]j)}(hjG)h]h Description}(hjI)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE)ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj(ubh)}(hWrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h]hWrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.}(hj])hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhja&hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#tty_port_lower_dtr_rts (C function)c.tty_port_lower_dtr_rtshNtauh1jhja&hhhNhNubj)}(hhh](j)}(h3void tty_port_lower_dtr_rts (struct tty_port *port)h]j)}(h2void tty_port_lower_dtr_rts(struct tty_port *port)h](j)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj)hhhj)hMubj)}(htty_port_lower_dtr_rtsh]j%)}(htty_port_lower_dtr_rtsh]htty_port_lower_dtr_rts}(hj)hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj)ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj)hhhj)hMubj>)}(h(struct tty_port *port)h]jD)}(hstruct tty_port *porth](jJ)}(hjMh]hstruct}(hj)hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj)ubh)}(hhh]j%)}(htty_porth]htty_port}(hj)hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj)modnameN classnameNjj)}j]j)}jj)sbc.tty_port_lower_dtr_rtsasbuh1hhj)ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj)ubj)}(hjh]h*}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj%)}(hporth]hport}(hj"*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1jChj)ubah}(h]h ]h"]h$]h&]hhuh1j=hj)hhhj)hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj)hhhj)hMubah}(h]j)ah ](jjeh"]h$]h&]jj)jhuh1jhj)hMhj)hhubj)}(hhh]h)}(h Lower DTR/RTSh]h Lower DTR/RTS}(hjL*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjI*hhubah}(h]h ]h"]h$]h&]uh1jhj)hhhj)hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjd*jjd*jjjuh1jhhhja&hNhNubj )}(h**Parameters** ``struct tty_port *port`` tty port **Description** Wrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h](h)}(h**Parameters**h]j)}(hjn*h]h Parameters}(hjp*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl*ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjh*ubj))}(hhh]j.)}(h#``struct tty_port *port`` tty port h](j4)}(h``struct tty_port *port``h]j)}(hj*h]hstruct tty_port *port}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j3h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhj*ubjN)}(hhh]h)}(htty porth]htty port}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jMhj*ubeh}(h]h ]h"]h$]h&]uh1j-hj*hMhj*ubah}(h]h ]h"]h$]h&]uh1j(hjh*ubh)}(h**Description**h]j)}(hj*h]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjh*ubh)}(hWrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.h]hWrapper for the DTR/RTS raise logic. For the moment this is used to hide some internal details. This will eventually become entirely internal to the tty port.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:52: ./drivers/tty/tty_port.chMhjh*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhja&hhhNhNubeh}(h]jah ]h"] modem signalsah$]h&]uh1hhjhhhhhK2ubeh}(h]hah ]h"]tty port functionsah$]h&]uh1hhhhhhhhKubh transition)}(h----h]h}(h]h ]h"]h$]h&]uh1j+hhhK8hhhhubh)}(hhh](h)}(hTTY Port Referenceh]hTTY Port Reference}(hj+hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhj+hhhhhK;ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port (C struct) c.tty_porthNtauh1jhj+hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhNubj)}(hhh](j)}(htty_porth]j)}(hstruct tty_porth](jJ)}(hjMh]hstruct}(hj9+hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj5+hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKubj)}(h h]h }(hjG+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj5+hhhjF+hKubj)}(htty_porth]j%)}(hj3+h]htty_port}(hjY+hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjU+ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj5+hhhjF+hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj1+hhhjF+hKubah}(h]j++ah ](jjeh"]h$]h&]jj)jhuh1jhjF+hKhj.+hhubj)}(hhh]h)}(hhh]h)}(hport level informationh]h)}(hj+h]hport level information}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK4hj~+ubah}(h]h ]h"]h$]h&]uh1hhj{+hhhj+hNubah}(h]h ]h"]h$]h&]jgjhuh1hhj+hK4hjx+hhubah}(h]h ]h"]h$]h&]uh1jhj.+hhhjF+hKubeh}(h]h ](jstructeh"]h$]h&]jjjj+jj+jjjuh1jhhhj+hj-+hNubj )}(hX **Definition**:: struct tty_port { struct tty_bufhead buf; struct tty_struct *tty; struct tty_struct *itty; const struct tty_port_operations *ops; const struct tty_port_client_operations *client_ops; spinlock_t lock; int blocked_open; int count; wait_queue_head_t open_wait; wait_queue_head_t delta_msr_wait; unsigned long flags; unsigned long iflags; unsigned char console:1; struct mutex mutex; struct mutex buf_mutex; u8 *xmit_buf; u8 *xmit_fifo; unsigned int close_delay; unsigned int closing_wait; int drain_delay; struct kref kref; void *client_data; }; **Members** ``buf`` buffer for this port, locked internally ``tty`` back pointer to :c:type:`struct tty_struct `, valid only if the tty is open. Use tty_port_tty_get() to obtain it (and tty_kref_put() to release). ``itty`` internal back pointer to :c:type:`struct tty_struct `. Avoid this. It should be eliminated in the long term. ``ops`` tty port operations (like activate, shutdown), see :c:type:`struct tty_port_operations ` ``client_ops`` tty port client operations (like receive_buf, write_wakeup). By default, tty_port_default_client_ops is used. ``lock`` lock protecting **tty** ``blocked_open`` # of procs waiting for open in tty_port_block_til_ready() ``count`` usage count ``open_wait`` open waiters queue (waiting e.g. for a carrier) ``delta_msr_wait`` modem status change queue (waiting for MSR changes) ``flags`` user TTY flags (``ASYNC_``) ``iflags`` internal flags (``TTY_PORT_``) ``console`` when set, the port is a console ``mutex`` locking, for open, shutdown and other port operations ``buf_mutex`` **xmit_buf** alloc lock ``xmit_buf`` optional xmit buffer used by some drivers ``xmit_fifo`` optional xmit buffer used by some drivers ``close_delay`` delay in jiffies to wait when closing the port ``closing_wait`` delay in jiffies for output to be sent before closing ``drain_delay`` set to zero if no pure time based drain is needed else set to size of fifo ``kref`` references counter. Reaching zero calls **ops->destruct\(\)** if non-``NULL`` or frees the port otherwise. ``client_data`` pointer to private data, for **client_ops**h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh:}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK8hj+ubh literal_block)}(hXstruct tty_port { struct tty_bufhead buf; struct tty_struct *tty; struct tty_struct *itty; const struct tty_port_operations *ops; const struct tty_port_client_operations *client_ops; spinlock_t lock; int blocked_open; int count; wait_queue_head_t open_wait; wait_queue_head_t delta_msr_wait; unsigned long flags; unsigned long iflags; unsigned char console:1; struct mutex mutex; struct mutex buf_mutex; u8 *xmit_buf; u8 *xmit_fifo; unsigned int close_delay; unsigned int closing_wait; int drain_delay; struct kref kref; void *client_data; };Eh]hXstruct tty_port { struct tty_bufhead buf; struct tty_struct *tty; struct tty_struct *itty; const struct tty_port_operations *ops; const struct tty_port_client_operations *client_ops; spinlock_t lock; int blocked_open; int count; wait_queue_head_t open_wait; wait_queue_head_t delta_msr_wait; unsigned long flags; unsigned long iflags; unsigned char console:1; struct mutex mutex; struct mutex buf_mutex; u8 *xmit_buf; u8 *xmit_fifo; unsigned int close_delay; unsigned int closing_wait; int drain_delay; struct kref kref; void *client_data; };}hj+sbah}(h]h ]h"]h$]h&]hhuh1j+h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK:hj+ubh)}(h **Members**h]j)}(hj+h]hMembers}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKShj+ubj))}(hhh](j.)}(h0``buf`` buffer for this port, locked internally h](j4)}(h``buf``h]j)}(hj+h]hbuf}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK7hj+ubjN)}(hhh]h)}(h'buffer for this port, locked internallyh]h'buffer for this port, locked internally}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hK7hj,ubah}(h]h ]h"]h$]h&]uh1jMhj+ubeh}(h]h ]h"]h$]h&]uh1j-hj,hK7hj+ubj.)}(h``tty`` back pointer to :c:type:`struct tty_struct `, valid only if the tty is open. Use tty_port_tty_get() to obtain it (and tty_kref_put() to release). h](j4)}(h``tty``h]j)}(hj5,h]htty}(hj7,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3,ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK9hj/,ubjN)}(hhh]h)}(hback pointer to :c:type:`struct tty_struct `, valid only if the tty is open. Use tty_port_tty_get() to obtain it (and tty_kref_put() to release).h](hback pointer to }(hjN,hhhNhNubh)}(h(:c:type:`struct tty_struct `h]j)}(hjX,h]hstruct tty_struct}(hjZ,hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjV,ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj- tty_structuh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK8hjN,ubhe, valid only if the tty is open. Use tty_port_tty_get() to obtain it (and tty_kref_put() to release).}(hjN,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhju,hK8hjK,ubah}(h]h ]h"]h$]h&]uh1jMhj/,ubeh}(h]h ]h"]h$]h&]uh1j-hjJ,hK9hj+ubj.)}(h``itty`` internal back pointer to :c:type:`struct tty_struct `. Avoid this. It should be eliminated in the long term. h](j4)}(h``itty``h]j)}(hj,h]hitty}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK;hj,ubjN)}(hhh]h)}(hxinternal back pointer to :c:type:`struct tty_struct `. Avoid this. It should be eliminated in the long term.h](hinternal back pointer to }(hj,hhhNhNubh)}(h(:c:type:`struct tty_struct `h]j)}(hj,h]hstruct tty_struct}(hj,hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj- tty_structuh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK:hj,ubh7. Avoid this. It should be eliminated in the long term.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj,hK:hj,ubah}(h]h ]h"]h$]h&]uh1jMhj,ubeh}(h]h ]h"]h$]h&]uh1j-hj,hK;hj+ubj.)}(hv``ops`` tty port operations (like activate, shutdown), see :c:type:`struct tty_port_operations ` h](j4)}(h``ops``h]j)}(hj,h]hops}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK=hj,ubjN)}(hhh]h)}(hmtty port operations (like activate, shutdown), see :c:type:`struct tty_port_operations `h](h3tty port operations (like activate, shutdown), see }(hj-hhhNhNubh)}(h::c:type:`struct tty_port_operations `h]j)}(hj-h]hstruct tty_port_operations}(hj-hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj-tty_port_operationsuh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKhj^-ubah}(h]h ]h"]h$]h&]uh1jMhjB-ubeh}(h]h ]h"]h$]h&]uh1j-hj]-hK?hj+ubj.)}(h!``lock`` lock protecting **tty** h](j4)}(h``lock``h]j)}(hj-h]hlock}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK@hj|-ubjN)}(hhh]h)}(hlock protecting **tty**h](hlock protecting }(hj-hhhNhNubj)}(h**tty**h]htty}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1hhj-hK@hj-ubah}(h]h ]h"]h$]h&]uh1jMhj|-ubeh}(h]h ]h"]h$]h&]uh1j-hj-hK@hj+ubj.)}(hK``blocked_open`` # of procs waiting for open in tty_port_block_til_ready() h](j4)}(h``blocked_open``h]j)}(hj-h]h blocked_open}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKAhj-ubjN)}(hhh]h)}(h9# of procs waiting for open in tty_port_block_til_ready()h]h9# of procs waiting for open in tty_port_block_til_ready()}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKAhj-ubah}(h]h ]h"]h$]h&]uh1jMhj-ubeh}(h]h ]h"]h$]h&]uh1j-hj-hKAhj+ubj.)}(h``count`` usage count h](j4)}(h ``count``h]j)}(hj.h]hcount}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKBhj-ubjN)}(hhh]h)}(h usage counth]h usage count}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hKBhj.ubah}(h]h ]h"]h$]h&]uh1jMhj-ubeh}(h]h ]h"]h$]h&]uh1j-hj.hKBhj+ubj.)}(h>``open_wait`` open waiters queue (waiting e.g. for a carrier) h](j4)}(h ``open_wait``h]j)}(hj;.h]h open_wait}(hj=.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9.ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKChj5.ubjN)}(hhh]h)}(h/open waiters queue (waiting e.g. for a carrier)h]h/open waiters queue (waiting e.g. for a carrier)}(hjT.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP.hKChjQ.ubah}(h]h ]h"]h$]h&]uh1jMhj5.ubeh}(h]h ]h"]h$]h&]uh1j-hjP.hKChj+ubj.)}(hG``delta_msr_wait`` modem status change queue (waiting for MSR changes) h](j4)}(h``delta_msr_wait``h]j)}(hjt.h]hdelta_msr_wait}(hjv.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr.ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKDhjn.ubjN)}(hhh]h)}(h3modem status change queue (waiting for MSR changes)h]h3modem status change queue (waiting for MSR changes)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hKDhj.ubah}(h]h ]h"]h$]h&]uh1jMhjn.ubeh}(h]h ]h"]h$]h&]uh1j-hj.hKDhj+ubj.)}(h&``flags`` user TTY flags (``ASYNC_``) h](j4)}(h ``flags``h]j)}(hj.h]hflags}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKEhj.ubjN)}(hhh]h)}(huser TTY flags (``ASYNC_``)h](huser TTY flags (}(hj.hhhNhNubj)}(h ``ASYNC_``h]hASYNC_}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh)}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj.hKEhj.ubah}(h]h ]h"]h$]h&]uh1jMhj.ubeh}(h]h ]h"]h$]h&]uh1j-hj.hKEhj+ubj.)}(h*``iflags`` internal flags (``TTY_PORT_``) h](j4)}(h ``iflags``h]j)}(hj.h]hiflags}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKFhj.ubjN)}(hhh]h)}(hinternal flags (``TTY_PORT_``)h](hinternal flags (}(hj/hhhNhNubj)}(h ``TTY_PORT_``h]h TTY_PORT_}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh)}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj /hKFhj/ubah}(h]h ]h"]h$]h&]uh1jMhj.ubeh}(h]h ]h"]h$]h&]uh1j-hj /hKFhj+ubj.)}(h,``console`` when set, the port is a console h](j4)}(h ``console``h]j)}(hjC/h]hconsole}(hjE/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA/ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKGhj=/ubjN)}(hhh]h)}(hwhen set, the port is a consoleh]hwhen set, the port is a console}(hj\/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX/hKGhjY/ubah}(h]h ]h"]h$]h&]uh1jMhj=/ubeh}(h]h ]h"]h$]h&]uh1j-hjX/hKGhj+ubj.)}(h@``mutex`` locking, for open, shutdown and other port operations h](j4)}(h ``mutex``h]j)}(hj|/h]hmutex}(hj~/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz/ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKHhjv/ubjN)}(hhh]h)}(h5locking, for open, shutdown and other port operationsh]h5locking, for open, shutdown and other port operations}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hKHhj/ubah}(h]h ]h"]h$]h&]uh1jMhjv/ubeh}(h]h ]h"]h$]h&]uh1j-hj/hKHhj+ubj.)}(h&``buf_mutex`` **xmit_buf** alloc lock h](j4)}(h ``buf_mutex``h]j)}(hj/h]h buf_mutex}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKIhj/ubjN)}(hhh]h)}(h**xmit_buf** alloc lockh](j)}(h **xmit_buf**h]hxmit_buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh alloc lock}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/hKIhj/ubah}(h]h ]h"]h$]h&]uh1jMhj/ubeh}(h]h ]h"]h$]h&]uh1j-hj/hKIhj+ubj.)}(h7``xmit_buf`` optional xmit buffer used by some drivers h](j4)}(h ``xmit_buf``h]j)}(hj/h]hxmit_buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKJhj/ubjN)}(hhh]h)}(h)optional xmit buffer used by some driversh]h)optional xmit buffer used by some drivers}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hKJhj0ubah}(h]h ]h"]h$]h&]uh1jMhj/ubeh}(h]h ]h"]h$]h&]uh1j-hj0hKJhj+ubj.)}(h8``xmit_fifo`` optional xmit buffer used by some drivers h](j4)}(h ``xmit_fifo``h]j)}(hj50h]h xmit_fifo}(hj70hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj30ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKKhj/0ubjN)}(hhh]h)}(h)optional xmit buffer used by some driversh]h)optional xmit buffer used by some drivers}(hjN0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ0hKKhjK0ubah}(h]h ]h"]h$]h&]uh1jMhj/0ubeh}(h]h ]h"]h$]h&]uh1j-hjJ0hKKhj+ubj.)}(h?``close_delay`` delay in jiffies to wait when closing the port h](j4)}(h``close_delay``h]j)}(hjn0h]h close_delay}(hjp0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl0ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKLhjh0ubjN)}(hhh]h)}(h.delay in jiffies to wait when closing the porth]h.delay in jiffies to wait when closing the port}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hKLhj0ubah}(h]h ]h"]h$]h&]uh1jMhjh0ubeh}(h]h ]h"]h$]h&]uh1j-hj0hKLhj+ubj.)}(hG``closing_wait`` delay in jiffies for output to be sent before closing h](j4)}(h``closing_wait``h]j)}(hj0h]h closing_wait}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKMhj0ubjN)}(hhh]h)}(h5delay in jiffies for output to be sent before closingh]h5delay in jiffies for output to be sent before closing}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hKMhj0ubah}(h]h ]h"]h$]h&]uh1jMhj0ubeh}(h]h ]h"]h$]h&]uh1j-hj0hKMhj+ubj.)}(h[``drain_delay`` set to zero if no pure time based drain is needed else set to size of fifo h](j4)}(h``drain_delay``h]j)}(hj0h]h drain_delay}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKOhj0ubjN)}(hhh]h)}(hJset to zero if no pure time based drain is needed else set to size of fifoh]hJset to zero if no pure time based drain is needed else set to size of fifo}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKNhj0ubah}(h]h ]h"]h$]h&]uh1jMhj0ubeh}(h]h ]h"]h$]h&]uh1j-hj0hKOhj+ubj.)}(ht``kref`` references counter. Reaching zero calls **ops->destruct\(\)** if non-``NULL`` or frees the port otherwise. h](j4)}(h``kref``h]j)}(hj1h]hkref}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKQhj1ubjN)}(hhh]h)}(hjreferences counter. Reaching zero calls **ops->destruct\(\)** if non-``NULL`` or frees the port otherwise.h](h(references counter. Reaching zero calls }(hj31hhhNhNubj)}(h**ops->destruct\(\)**h]hops->destruct()}(hj;1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj31ubh if non-}(hj31hhhNhNubj)}(h``NULL``h]hNULL}(hjM1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj31ubh or frees the port otherwise.}(hj31hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKPhj01ubah}(h]h ]h"]h$]h&]uh1jMhj1ubeh}(h]h ]h"]h$]h&]uh1j-hj/1hKQhj+ubj.)}(h;``client_data`` pointer to private data, for **client_ops**h](j4)}(h``client_data``h]j)}(hjx1h]h client_data}(hjz1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv1ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKQhjr1ubjN)}(hhh]h)}(h+pointer to private data, for **client_ops**h](hpointer to private data, for }(hj1hhhNhNubj)}(h**client_ops**h]h client_ops}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKRhj1ubah}(h]h ]h"]h$]h&]uh1jMhjr1ubeh}(h]h ]h"]h$]h&]uh1j-hj1hKQhj+ubeh}(h]h ]h"]h$]h&]uh1j(hj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj+hhhj-+hNubh)}(h**Description**h]j)}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKUhj+hhubh)}(hEach device keeps its own port level information. :c:type:`struct tty_port ` was introduced as a common structure for such information. As every TTY device shall have a backing tty_port structure, every driver can use these members.h](h2Each device keeps its own port level information. }(hj1hhhNhNubh)}(h$:c:type:`struct tty_port `h]j)}(hj1h]hstruct tty_port}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj-tty_portuh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKShj1ubh was introduced as a common structure for such information. As every TTY device shall have a backing tty_port structure, every driver can use these members.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hKShj+hhubh)}(hXThe tty port has a different lifetime to the tty so must be kept apart. In addition be careful as tty -> port mappings are valid for the life of the tty object but in many cases port -> tty mappings are valid only until a hangup so don't use the wrong path.h]hXThe tty port has a different lifetime to the tty so must be kept apart. In addition be careful as tty -> port mappings are valid for the life of the tty object but in many cases port -> tty mappings are valid only until a hangup so don’t use the wrong path.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhKWhj+hhubh)}(hTty port shall be initialized by tty_port_init() and shut down either by tty_port_destroy() (refcounting not used), or tty_port_put() (refcounting).h]hTty port shall be initialized by tty_port_init() and shut down either by tty_port_destroy() (refcounting not used), or tty_port_put() (refcounting).}(hj 2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK\hj+hhubh)}(hX8There is a lot of helpers around :c:type:`struct tty_port ` too. To name the most significant ones: tty_port_open(), tty_port_close() (or tty_port_close_start() and tty_port_close_end() separately if need be), and tty_port_hangup(). These call **ops->activate\(\)** and **ops->shutdown\(\)** as needed.h](h!There is a lot of helpers around }(hj/2hhhNhNubh)}(h$:c:type:`struct tty_port `h]j)}(hj92h]hstruct tty_port}(hj;2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj72ubah}(h]h ]h"]h$]h&]refdocj' refdomainjreftypetype refexplicitrefwarnjjj-tty_portuh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:61: ./include/linux/tty_port.hhK_hj/2ubh too. To name the most significant ones: tty_port_open(), tty_port_close() (or tty_port_close_start() and tty_port_close_end() separately if need be), and tty_port_hangup(). These call }(hj/2hhhNhNubj)}(h**ops->activate\(\)**h]hops->activate()}(hj[2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/2ubh and }(hj/2hhhNhNubj)}(h**ops->shutdown\(\)**h]hops->shutdown()}(hjm2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/2ubh as needed.}(hj/2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjV2hK_hj+hhubeh}(h]jah ]h"]tty port referenceah$]h&]uh1hhhhhhhhK; referencedKubj+)}(h----h]h}(h]h ]h"]h$]h&]uh1j+hhhK@hhhhubh)}(hhh](h)}(hTTY Port Operations Referenceh]hTTY Port Operations Reference}(hj2hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhj2hhhhhKCubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_port_operations (C struct)c.tty_port_operationshNtauh1jhj2hhhNhNubj)}(hhh](j)}(htty_port_operationsh]j)}(hstruct tty_port_operationsh](jJ)}(hjMh]hstruct}(hj2hhhNhNubah}(h]h ]jVah"]h$]h&]uh1jIhj2hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj2hhhj2hKubj)}(htty_port_operationsh]j%)}(hj2h]htty_port_operations}(hj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2ubah}(h]h ](j8j9eh"]h$]h&]hhuh1jhj2hhhj2hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj2hhhj2hKubah}(h]j2ah ](jjeh"]h$]h&]jj)jhuh1jhj2hKhj2hhubj)}(hhh]h)}(hhh]h)}(hoperations on tty_porth]h)}(hj3h]hoperations on tty_port}(hj 3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj3ubah}(h]h ]h"]h$]h&]uh1hhj3hhhj3hNubah}(h]h ]h"]h$]h&]jgjhuh1hhj3hKhj3hhubah}(h]h ]h"]h$]h&]uh1jhj2hhhj2hKubeh}(h]h ](jstructeh"]h$]h&]jjjj-3jj-3jjjuh1jhhhj2hNhNubj )}(hX#**Definition**:: struct tty_port_operations { bool (*carrier_raised)(struct tty_port *port); void (*dtr_rts)(struct tty_port *port, bool active); void (*shutdown)(struct tty_port *port); int (*activate)(struct tty_port *port, struct tty_struct *tty); void (*destruct)(struct tty_port *port); }; **Members** ``carrier_raised`` return true if the carrier is raised on **port** ``dtr_rts`` raise the DTR line if **active** is true, otherwise lower DTR ``shutdown`` called when the last close completes or a hangup finishes IFF the port was initialized. Do not use to free resources. Turn off the device only. Called under the port mutex to serialize against **activate** and **shutdown**. ``activate`` called under the port mutex from tty_port_open(), serialized using the port mutex. Supposed to turn on the device. FIXME: long term getting the tty argument *out* of this would be good for consoles. ``destruct`` called on the final put of a port. Free resources, possibly incl. the port itself.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj93hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj53ubh:}(hj53hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj13ubj+)}(hX)struct tty_port_operations { bool (*carrier_raised)(struct tty_port *port); void (*dtr_rts)(struct tty_port *port, bool active); void (*shutdown)(struct tty_port *port); int (*activate)(struct tty_port *port, struct tty_struct *tty); void (*destruct)(struct tty_port *port); };h]hX)struct tty_port_operations { bool (*carrier_raised)(struct tty_port *port); void (*dtr_rts)(struct tty_port *port, bool active); void (*shutdown)(struct tty_port *port); int (*activate)(struct tty_port *port, struct tty_struct *tty); void (*destruct)(struct tty_port *port); };}hjR3sbah}(h]h ]h"]h$]h&]hhuh1j+h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj13ubh)}(h **Members**h]j)}(hjc3h]hMembers}(hje3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja3ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj13ubj))}(hhh](j.)}(hD``carrier_raised`` return true if the carrier is raised on **port** h](j4)}(h``carrier_raised``h]j)}(hj3h]hcarrier_raised}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj|3ubjN)}(hhh]h)}(h0return true if the carrier is raised on **port**h](h(return true if the carrier is raised on }(hj3hhhNhNubj)}(h**port**h]hport}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1hhj3hKhj3ubah}(h]h ]h"]h$]h&]uh1jMhj|3ubeh}(h]h ]h"]h$]h&]uh1j-hj3hKhjy3ubj.)}(hJ``dtr_rts`` raise the DTR line if **active** is true, otherwise lower DTR h](j4)}(h ``dtr_rts``h]j)}(hj3h]hdtr_rts}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj3ubjN)}(hhh]h)}(h=raise the DTR line if **active** is true, otherwise lower DTRh](hraise the DTR line if }(hj3hhhNhNubj)}(h **active**h]hactive}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh is true, otherwise lower DTR}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hKhj3ubah}(h]h ]h"]h$]h&]uh1jMhj3ubeh}(h]h ]h"]h$]h&]uh1j-hj3hKhjy3ubj.)}(h``shutdown`` called when the last close completes or a hangup finishes IFF the port was initialized. Do not use to free resources. Turn off the device only. Called under the port mutex to serialize against **activate** and **shutdown**. h](j4)}(h ``shutdown``h]j)}(hj4h]hshutdown}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj4ubjN)}(hhh]h)}(hcalled when the last close completes or a hangup finishes IFF the port was initialized. Do not use to free resources. Turn off the device only. Called under the port mutex to serialize against **activate** and **shutdown**.h](hcalled when the last close completes or a hangup finishes IFF the port was initialized. Do not use to free resources. Turn off the device only. Called under the port mutex to serialize against }(hj-4hhhNhNubj)}(h **activate**h]hactivate}(hj54hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-4ubh and }(hj-4hhhNhNubj)}(h **shutdown**h]hshutdown}(hjG4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-4ubh.}(hj-4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj*4ubah}(h]h ]h"]h$]h&]uh1jMhj4ubeh}(h]h ]h"]h$]h&]uh1j-hj)4hKhjy3ubj.)}(h``activate`` called under the port mutex from tty_port_open(), serialized using the port mutex. Supposed to turn on the device. FIXME: long term getting the tty argument *out* of this would be good for consoles. h](j4)}(h ``activate``h]j)}(hjr4h]hactivate}(hjt4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp4ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhjl4ubjN)}(hhh](h)}(hrcalled under the port mutex from tty_port_open(), serialized using the port mutex. Supposed to turn on the device.h]hrcalled under the port mutex from tty_port_open(), serialized using the port mutex. Supposed to turn on the device.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj4ubh)}(hSFIXME: long term getting the tty argument *out* of this would be good for consoles.h](h*FIXME: long term getting the tty argument }(hj4hhhNhNubhemphasis)}(h*out*h]hout}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j4hj4ubh$ of this would be good for consoles.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj4ubeh}(h]h ]h"]h$]h&]uh1jMhjl4ubeh}(h]h ]h"]h$]h&]uh1j-hj4hKhjy3ubj.)}(h_``destruct`` called on the final put of a port. Free resources, possibly incl. the port itself.h](j4)}(h ``destruct``h]j)}(hj4h]hdestruct}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j3h`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_port:69: ./include/linux/tty_port.hhKhj4ubjN)}(hhh]h)}(hRcalled on the final put of a port. Free resources, possibly incl. the port itself.h]hRcalled on the final put of a port. Free resources, possibly incl. the port itself.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj4ubah}(h]h ]h"]h$]h&]uh1jMhj4ubeh}(h]h ]h"]h$]h&]uh1j-hj4hKhjy3ubeh}(h]h ]h"]h$]h&]uh1j(hj13ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj2hhhNhNubeh}(h]jah ]h"]tty port operations referenceah$]h&]uh1hhhhhhhhKCj2Kubeh}(h]tty-portah ]h"]tty portah$]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_handlerjA5error_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}(tty port reference]jatty port operations reference]jaurefids}nameids}(j5j5jjj*hjj jj/j#jQj^&jsj*jj2jj5ju nametypes}(j5jj*jjj#j^&j*j2j5uh}(j5hjhhjj jjjjjjvj{j/jj3j8j j j j j!j&j*j/jujzjijnj`jejQjjjj j jsj#j0#j5#j %j%jja&j~&j&j'j(j)j)jj+j++j1+jj2j2j2hhjhj)j jKjBjmjdjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jO5KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.