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_drivermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/driver-api/tty/tty_drivermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/driver-api/tty/tty_drivermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/driver-api/tty/tty_drivermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/driver-api/tty/tty_drivermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/driver-api/tty/tty_drivermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver.rsthKubhsection)}(hhh](htitle)}(hTTY Driver and TTY Operationsh]hTTY Driver and TTY Operations}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh](h paragraph)}(hhh]h reference)}(hhh]h Allocation}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refid allocationuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h)}(hhh]hTTY Driver Flags}(hhhhhNhNubah}(h]id2ah ]h"]h$]h&]refidtty-driver-flagsuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh]h Registration}(hj,hhhNhNubah}(h]id3ah ]h"]h$]h&]refid registrationuh1hhj)ubah}(h]h ]h"]h$]h&]uh1hhj&ubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh]hRegistering Devices}(hjKhhhNhNubah}(h]id4ah ]h"]h$]h&]refidregistering-devicesuh1hhjHubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1hhjBubh)}(hhh]h)}(hhh]h)}(hhh]hLinking Devices to Ports}(hjmhhhNhNubah}(h]id5ah ]h"]h$]h&]refidlinking-devices-to-portsuh1hhjjubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]uh1hhjBubeh}(h]h ]h"]h$]h&]uh1hhj&ubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hTTY Driver Reference}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refidtty-driver-referenceuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hTTY Operations Reference}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]refidtty-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)}(hhh](h)}(h Allocationh]h Allocation}(hjhhhNhNubah}(h]h ]h"]h$]h&]refidhuh1hhjhhhhhK ubh)}(hX#The first thing a driver needs to do is to allocate a struct tty_driver. This is done by tty_alloc_driver() (or __tty_alloc_driver()). Next, the newly allocated structure is filled with information. See `TTY Driver Reference`_ at the end of this document on what actually shall be filled in.h](hThe first thing a driver needs to do is to allocate a struct tty_driver. This is done by tty_alloc_driver() (or __tty_alloc_driver()). Next, the newly allocated structure is filled with information. See }(hjhhhNhNubh)}(h`TTY Driver Reference`_h]hTTY Driver Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameTTY Driver Referencejjuh1hhjresolvedKubhA at the end of this document on what actually shall be filled in.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjhhubh)}(hThe allocation routines expect a number of devices the driver can handle at most and flags. Flags are those starting ``TTY_DRIVER_`` listed and described in `TTY Driver Flags`_ below.h](huThe allocation routines expect a number of devices the driver can handle at most and flags. Flags are those starting }(hjhhhNhNubhliteral)}(h``TTY_DRIVER_``h]h TTY_DRIVER_}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubh listed and described in }(hjhhhNhNubh)}(h`TTY Driver Flags`_h]hTTY Driver Flags}(hj:hhhNhNubah}(h]h ]h"]h$]h&]nameTTY Driver Flagsjj uh1hhjjKubh below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hWhen the driver is about to be freed, tty_driver_kref_put() is called on that. It will decrements the reference count and if it reaches zero, the driver is freed.h]hWhen the driver is about to be freed, tty_driver_kref_put() is called on that. It will decrements the reference count and if it reaches zero, the driver is freed.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hWFor reference, both allocation and deallocation functions are explained here in detail:h]hWFor reference, both allocation and deallocation functions are explained here in detail:}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singletty_alloc_driver (C macro)c.tty_alloc_driverhNtauh1jphjhhhNhNubhdesc)}(hhh](hdesc_signature)}(htty_alloc_driverh]hdesc_signature_line)}(htty_alloc_driverh]h desc_name)}(htty_alloc_driverh]h desc_sig_name)}(hjh]htty_alloc_driver}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM>ubah}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhM>ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhM>hjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhM>ubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh)}(h#``tty_alloc_driver (lines, flags)``h]j')}(hjh]htty_alloc_driver (lines, flags)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM@hjhhubh block_quote)}(hallocate tty driver h]h)}(hallocate tty driverh]hallocate tty driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM8hjubah}(h]h ]h"]h$]h&]uh1jhj hM8hjhhubh container)}(h**Parameters** ``lines`` count of lines this driver can handle at most ``flags`` some of enum tty_driver_flag, will be set in driver->flags **Return** struct tty_driver or a PTR-encoded error (use IS_ERR() and friends).h](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM<hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h8``lines`` count of lines this driver can handle at most h](hterm)}(h ``lines``h]j')}(hj@h]hlines}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj>ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM9hj8ubh definition)}(hhh]h)}(h-count of lines this driver can handle at mosth]h-count of lines this driver can handle at most}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhM9hjXubah}(h]h ]h"]h$]h&]uh1jVhj8ubeh}(h]h ]h"]h$]h&]uh1j6hjUhM9hj3ubj7)}(hE``flags`` some of enum tty_driver_flag, will be set in driver->flags h](j=)}(h ``flags``h]j')}(hj{h]hflags}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjyubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM:hjuubjW)}(hhh]h)}(h:some of enum tty_driver_flag, will be set in driver->flagsh]h:some of enum tty_driver_flag, will be set in driver->flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM:hjubah}(h]h ]h"]h$]h&]uh1jVhjuubeh}(h]h ]h"]h$]h&]uh1j6hjhM:hj3ubeh}(h]h ]h"]h$]h&]uh1j1hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM<hjubh)}(hDstruct tty_driver or a PTR-encoded error (use IS_ERR() and friends).h]hDstruct tty_driver or a PTR-encoded error (use IS_ERR() and friends).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:28: ./include/linux/tty_driver.hhM<hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}__tty_alloc_driver (C function)c.__tty_alloc_driverhNtauh1jphjhhhNhNubj)}(hhh](j)}(hfstruct tty_driver * __tty_alloc_driver (unsigned int lines, struct module *owner, unsigned long flags)h]j)}(hdstruct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner, unsigned long flags)h](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1j hjhhhj hM ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj#modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j< ASTIdentifier)}j7__tty_alloc_driversbc.__tty_alloc_driverasbuh1hhjhhhj hM ubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhj hM ubhdesc_sig_punctuation)}(h*h]h*}(hjZhhhNhNubah}(h]h ]pah"]h$]h&]uh1jXhjhhhj hM ubj)}(h__tty_alloc_driverh]j)}(hjGh]h__tty_alloc_driver}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj hM ubhdesc_parameterlist)}(h?(unsigned int lines, struct module *owner, unsigned long flags)h](hdesc_parameter)}(hunsigned int linesh](hdesc_sig_keyword_type)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hlinesh]hlines}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct module *ownerh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(hmoduleh]hmodule}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jEc.__tty_alloc_driverasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hj*hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hownerh]howner}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned long flagsh](j)}(hunsignedh]hunsigned}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjLubj)}(hlongh]hlong}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjLubj)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhj hM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhj hM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhj hM hjhhubj)}(hhh]h)}(hallocate tty driverh]hallocate tty driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj)}(hX**Parameters** ``unsigned int lines`` count of lines this driver can handle at most ``struct module *owner`` module which is responsible for this driver ``unsigned long flags`` some of enum tty_driver_flag, will be set in driver->flags **Description** This should not be called directly, tty_alloc_driver() should be used instead. **Return** struct tty_driver or a PTR-encoded error (use IS_ERR() and friends).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_driver:30: ./drivers/tty/tty_io.chM hjubj2)}(hhh](j7)}(hE``unsigned int lines`` count of lines this driver can handle at most h](j=)}(h``unsigned int lines``h]j')}(hjh]hunsigned int lines}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h-count of lines this driver can handle at mosth]h-count of lines this driver can handle at most}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hj ubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubj7)}(hE``struct module *owner`` module which is responsible for this driver h](j=)}(h``struct module *owner``h]j')}(hj,h]hstruct module *owner}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj*ubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hj&ubjW)}(hhh]h)}(h+module which is responsible for this driverh]h+module which is responsible for this driver}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhM hjBubah}(h]h ]h"]h$]h&]uh1jVhj&ubeh}(h]h ]h"]h$]h&]uh1j6hjAhM hjubj7)}(hS``unsigned long flags`` some of enum tty_driver_flag, will be set in driver->flags h](j=)}(h``unsigned long flags``h]j')}(hjeh]hunsigned long flags}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjcubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hj_ubjW)}(hhh]h)}(h:some of enum tty_driver_flag, will be set in driver->flagsh]h:some of enum tty_driver_flag, will be set in driver->flags}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhM hj{ubah}(h]h ]h"]h$]h&]uh1jVhj_ubeh}(h]h ]h"]h$]h&]uh1j6hjzhM hjubeh}(h]h ]h"]h$]h&]uh1j1hjubh)}(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_driver:30: ./drivers/tty/tty_io.chM hjubh)}(hNThis should not be called directly, tty_alloc_driver() should be used instead.h]hNThis should not be called directly, tty_alloc_driver() should be used instead.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hjubh)}(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_driver:30: ./drivers/tty/tty_io.chM hjubh)}(hDstruct tty_driver or a PTR-encoded error (use IS_ERR() and friends).h]hDstruct tty_driver or a PTR-encoded error (use IS_ERR() and friends).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j} tty_driver_kref_put (C function)c.tty_driver_kref_puthNtauh1jphjhhhNhNubj)}(hhh](j)}(h4void tty_driver_kref_put (struct tty_driver *driver)h]j)}(h3void tty_driver_kref_put(struct tty_driver *driver)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chMe ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhMe ubj)}(htty_driver_kref_puth]j)}(htty_driver_kref_puth]htty_driver_kref_put}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMe ubj)}(h(struct tty_driver *driver)h]j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjimodnameN classnameNj;j>)}jA]jD)}j7j/sbc.tty_driver_kref_putasbuh1hhjEubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjEubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjEubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjAubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMe ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMe ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMe hjhhubj)}(hhh]h)}(h drop a reference to a tty driverh]h drop a reference to a tty driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chM` hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMe ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct tty_driver *driver`` driver of which to drop the reference **Description** The final put will destroy and free up the driver.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_driver:30: ./drivers/tty/tty_io.chMd hjubj2)}(hhh]j7)}(hD``struct tty_driver *driver`` driver of which to drop the reference h](j=)}(h``struct tty_driver *driver``h]j')}(hj h]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chMa hjubjW)}(hhh]h)}(h%driver of which to drop the referenceh]h%driver of which to drop the reference}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMa hj#ubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hj"hMa hjubah}(h]h ]h"]h$]h&]uh1j1hjubh)}(h**Description**h]j)}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chMc hjubh)}(h2The final put will destroy and free up the driver.h]h2The final put will destroy and free up the driver.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:30: ./drivers/tty/tty_io.chMc hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubh)}(hhh](h)}(hTTY Driver Flagsh]hTTY Driver Flags}(hjwhhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhjthhhhhK"ubh)}(h_Here comes the documentation of flags accepted by tty_alloc_driver() (or __tty_alloc_driver()):h]h_Here comes the documentation of flags accepted by tty_alloc_driver() (or __tty_alloc_driver()):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjthhubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}tty_driver_flag (C enum)c.tty_driver_flaghNtauh1jphjthhhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhNubj)}(hhh](j)}(htty_driver_flagh]j)}(henum tty_driver_flagh](j)}(henumh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhKubj)}(htty_driver_flagh]j)}(hjh]htty_driver_flag}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(hhh]h)}(hTTY Driver Flagsh]h)}(hjh]hTTY Driver Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhj hNubah}(h]h ]h"]h$]h&]bullet-uh1hhj hKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jenumeh"]h$]h&]jjjj jj jjjuh1jhhhjthjhNubj)}(hX**Constants** ``TTY_DRIVER_INSTALLED`` Whether this driver was succesfully installed. This is a tty internal flag. Do not touch. ``TTY_DRIVER_RESET_TERMIOS`` Requests the tty layer to reset the termios setting when the last process has closed the device. Used for PTYs, in particular. ``TTY_DRIVER_REAL_RAW`` Indicates that the driver will guarantee not to set any special character handling flags if this is set for the tty: ``(IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || !INPCK)`` That is, if there is no reason for the driver to send notifications of parity and break characters up to the line driver, it won't do so. This allows the line driver to optimize for this case if this flag is set. (Note that there is also a promise, if the above case is true, not to signal overruns, either.) ``TTY_DRIVER_DYNAMIC_DEV`` The individual tty devices need to be registered with a call to tty_register_device() when the device is found in the system and unregistered with a call to tty_unregister_device() so the devices will be show up properly in sysfs. If not set, all :c:type:`tty_driver.num ` entries will be created by the tty core in sysfs when tty_register_driver() is called. This is to be used by drivers that have tty devices that can appear and disappear while the main tty driver is registered with the tty core. ``TTY_DRIVER_DEVPTS_MEM`` Don't use the standard arrays (:c:type:`tty_driver.ttys ` and :c:type:`tty_driver.termios `), instead use dynamic memory keyed through the devpts filesystem. This is only applicable to the PTY driver. ``TTY_DRIVER_HARDWARE_BREAK`` Hardware handles break signals. Pass the requested timeout to the :c:type:`tty_operations.break_ctl ` instead of using a simple on/off interface. ``TTY_DRIVER_DYNAMIC_ALLOC`` Do not allocate structures which are needed per line for this driver (:c:type:`tty_driver.ports `) as it would waste memory. The driver will take care. This is only applicable to the PTY driver. ``TTY_DRIVER_UNNUMBERED_NODE`` Do not create numbered ``/dev`` nodes. For example, create ``/dev/ttyprintk`` and not ``/dev/ttyprintk0``. Applicable only when a driver for a single tty device is being allocated.h](h)}(h **Constants**h]j)}(hj& h]h Constants}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhj ubj2)}(hhh](j7)}(hs``TTY_DRIVER_INSTALLED`` Whether this driver was succesfully installed. This is a tty internal flag. Do not touch. h](j=)}(h``TTY_DRIVER_INSTALLED``h]j')}(hjE h]hTTY_DRIVER_INSTALLED}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjC ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhj? ubjW)}(hhh]h)}(hYWhether this driver was succesfully installed. This is a tty internal flag. Do not touch.h]hYWhether this driver was succesfully installed. This is a tty internal flag. Do not touch.}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhj[ ubah}(h]h ]h"]h$]h&]uh1jVhj? ubeh}(h]h ]h"]h$]h&]uh1j6hjZ hKhj< ubj7)}(h``TTY_DRIVER_RESET_TERMIOS`` Requests the tty layer to reset the termios setting when the last process has closed the device. Used for PTYs, in particular. h](j=)}(h``TTY_DRIVER_RESET_TERMIOS``h]j')}(hj h]hTTY_DRIVER_RESET_TERMIOS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj} ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK hjy ubjW)}(hhh]h)}(h~Requests the tty layer to reset the termios setting when the last process has closed the device. Used for PTYs, in particular.h]h~Requests the tty layer to reset the termios setting when the last process has closed the device. Used for PTYs, in particular.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhj ubah}(h]h ]h"]h$]h&]uh1jVhjy ubeh}(h]h ]h"]h$]h&]uh1j6hj hK hj< ubj7)}(hX``TTY_DRIVER_REAL_RAW`` Indicates that the driver will guarantee not to set any special character handling flags if this is set for the tty: ``(IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || !INPCK)`` That is, if there is no reason for the driver to send notifications of parity and break characters up to the line driver, it won't do so. This allows the line driver to optimize for this case if this flag is set. (Note that there is also a promise, if the above case is true, not to signal overruns, either.) h](j=)}(h``TTY_DRIVER_REAL_RAW``h]j')}(hj h]hTTY_DRIVER_REAL_RAW}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK,hj ubjW)}(hhh](h)}(htIndicates that the driver will guarantee not to set any special character handling flags if this is set for the tty:h]htIndicates that the driver will guarantee not to set any special character handling flags if this is set for the tty:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK#hj ubh)}(h:``(IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || !INPCK)``h]j')}(hj h]h6(IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || !INPCK)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK&hj ubh)}(hX6That is, if there is no reason for the driver to send notifications of parity and break characters up to the line driver, it won't do so. This allows the line driver to optimize for this case if this flag is set. (Note that there is also a promise, if the above case is true, not to signal overruns, either.)h]hX8That is, if there is no reason for the driver to send notifications of parity and break characters up to the line driver, it won’t do so. This allows the line driver to optimize for this case if this flag is set. (Note that there is also a promise, if the above case is true, not to signal overruns, either.)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK(hj ubeh}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hK,hj< ubj7)}(hX``TTY_DRIVER_DYNAMIC_DEV`` The individual tty devices need to be registered with a call to tty_register_device() when the device is found in the system and unregistered with a call to tty_unregister_device() so the devices will be show up properly in sysfs. If not set, all :c:type:`tty_driver.num ` entries will be created by the tty core in sysfs when tty_register_driver() is called. This is to be used by drivers that have tty devices that can appear and disappear while the main tty driver is registered with the tty core. h](j=)}(h``TTY_DRIVER_DYNAMIC_DEV``h]j')}(hj h]hTTY_DRIVER_DYNAMIC_DEV}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK6hj ubjW)}(hhh]h)}(hXThe individual tty devices need to be registered with a call to tty_register_device() when the device is found in the system and unregistered with a call to tty_unregister_device() so the devices will be show up properly in sysfs. If not set, all :c:type:`tty_driver.num ` entries will be created by the tty core in sysfs when tty_register_driver() is called. This is to be used by drivers that have tty devices that can appear and disappear while the main tty driver is registered with the tty core.h](hThe individual tty devices need to be registered with a call to tty_register_device() when the device is found in the system and unregistered with a call to tty_unregister_device() so the devices will be show up properly in sysfs. If not set, all }(hj3 hhhNhNubh)}(h%:c:type:`tty_driver.num `h]j')}(hj= h]htty_driver.num}(hj? hhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1j&hj; ubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/tty_driver refdomainjreftypetype refexplicitrefwarnj;j>)}jA]sb reftarget tty_driveruh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK/hj3 ubh entries will be created by the tty core in sysfs when tty_register_driver() is called. This is to be used by drivers that have tty devices that can appear and disappear while the main tty driver is registered with the tty core.}(hj3 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj` hK/hj0 ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj/ hK6hj< ubj7)}(h``TTY_DRIVER_DEVPTS_MEM`` Don't use the standard arrays (:c:type:`tty_driver.ttys ` and :c:type:`tty_driver.termios `), instead use dynamic memory keyed through the devpts filesystem. This is only applicable to the PTY driver. h](j=)}(h``TTY_DRIVER_DEVPTS_MEM``h]j')}(hj} h]hTTY_DRIVER_DEVPTS_MEM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj{ ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK;hjw ubjW)}(hhh]h)}(hDon't use the standard arrays (:c:type:`tty_driver.ttys ` and :c:type:`tty_driver.termios `), instead use dynamic memory keyed through the devpts filesystem. This is only applicable to the PTY driver.h](h!Don’t use the standard arrays (}(hj hhhNhNubh)}(h&:c:type:`tty_driver.ttys `h]j')}(hj h]htty_driver.ttys}(hj hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_driveruh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK9hj ubh and }(hj hhhNhNubh)}(h):c:type:`tty_driver.termios `h]j')}(hj h]htty_driver.termios}(hj hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_driveruh1hhj hK9hj ubhm), instead use dynamic memory keyed through the devpts filesystem. This is only applicable to the PTY driver.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK9hj ubah}(h]h ]h"]h$]h&]uh1jVhjw ubeh}(h]h ]h"]h$]h&]uh1j6hj hK;hj< ubj7)}(h``TTY_DRIVER_HARDWARE_BREAK`` Hardware handles break signals. Pass the requested timeout to the :c:type:`tty_operations.break_ctl ` instead of using a simple on/off interface. h](j=)}(h``TTY_DRIVER_HARDWARE_BREAK``h]j')}(hj h]hTTY_DRIVER_HARDWARE_BREAK}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK?hj ubjW)}(hhh]h)}(hHardware handles break signals. Pass the requested timeout to the :c:type:`tty_operations.break_ctl ` instead of using a simple on/off interface.h](hBHardware handles break signals. Pass the requested timeout to the }(hj hhhNhNubh)}(h3:c:type:`tty_operations.break_ctl `h]j')}(hj h]htty_operations.break_ctl}(hj" hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_operationsuh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhK>hj ubh, instead of using a simple on/off interface.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj= hK>hj ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hK?hj< ubj7)}(h``TTY_DRIVER_DYNAMIC_ALLOC`` Do not allocate structures which are needed per line for this driver (:c:type:`tty_driver.ports `) as it would waste memory. The driver will take care. This is only applicable to the PTY driver. h](j=)}(h``TTY_DRIVER_DYNAMIC_ALLOC``h]j')}(hjZ h]hTTY_DRIVER_DYNAMIC_ALLOC}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjX ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKDhjT ubjW)}(hhh]h)}(hDo not allocate structures which are needed per line for this driver (:c:type:`tty_driver.ports `) as it would waste memory. The driver will take care. This is only applicable to the PTY driver.h](hFDo not allocate structures which are needed per line for this driver (}(hjs hhhNhNubh)}(h':c:type:`tty_driver.ports `h]j')}(hj} h]htty_driver.ports}(hj hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj{ ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_driveruh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKBhjs ubha) as it would waste memory. The driver will take care. This is only applicable to the PTY driver.}(hjs hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKBhjp ubah}(h]h ]h"]h$]h&]uh1jVhjT ubeh}(h]h ]h"]h$]h&]uh1j6hjo hKDhj< ubj7)}(h``TTY_DRIVER_UNNUMBERED_NODE`` Do not create numbered ``/dev`` nodes. For example, create ``/dev/ttyprintk`` and not ``/dev/ttyprintk0``. Applicable only when a driver for a single tty device is being allocated.h](j=)}(h``TTY_DRIVER_UNNUMBERED_NODE``h]j')}(hj h]hTTY_DRIVER_UNNUMBERED_NODE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<hd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKHhj ubjW)}(hhh]h)}(hDo not create numbered ``/dev`` nodes. For example, create ``/dev/ttyprintk`` and not ``/dev/ttyprintk0``. Applicable only when a driver for a single tty device is being allocated.h](hDo not create numbered }(hj hhhNhNubj')}(h``/dev``h]h/dev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubh nodes. For example, create }(hj hhhNhNubj')}(h``/dev/ttyprintk``h]h/dev/ttyprintk}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubh and not }(hj hhhNhNubj')}(h``/dev/ttyprintk0``h]h/dev/ttyprintk0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubhK. Applicable only when a driver for a single tty device is being allocated.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKGhj ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hKHhj< ubeh}(h]h ]h"]h$]h&]uh1j1hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjthhhjhNubh)}(h**Description**h]j)}(hj0 h]h Description}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj. ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKLhjthhubh)}(h-These are flags passed to tty_alloc_driver().h]h-These are flags passed to tty_alloc_driver().}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:39: ./include/linux/tty_driver.hhKhjthhubeh}(h]j ah ]h"]tty driver flagsah$]h&]uh1hhjhhhhhK" referencedKubeh}(h]hah ]h"] allocationah$]h&]uh1hhhhhhhhK ubh transition)}(h----h]h}(h]h ]h"]h$]h&]uh1jd hhhK*hhhhubh)}(hhh](h)}(h Registrationh]h Registration}(hjs hhhNhNubah}(h]h ]h"]h$]h&]jj5uh1hhjp hhhhhK-ubh)}(hXWhen a struct tty_driver is allocated and filled in, it can be registered using tty_register_driver(). It is recommended to pass ``TTY_DRIVER_DYNAMIC_DEV`` in flags of tty_alloc_driver(). If it is not passed, *all* devices are also registered during tty_register_driver() and the following paragraph of registering devices can be skipped for such drivers. However, the struct tty_port part in `Registering Devices`_ is still relevant there.h](hWhen a struct tty_driver is allocated and filled in, it can be registered using tty_register_driver(). It is recommended to pass }(hj hhhNhNubj')}(h``TTY_DRIVER_DYNAMIC_DEV``h]hTTY_DRIVER_DYNAMIC_DEV}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubh6 in flags of tty_alloc_driver(). If it is not passed, }(hj hhhNhNubhemphasis)}(h*all*h]hall}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh devices are also registered during tty_register_driver() and the following paragraph of registering devices can be skipped for such drivers. However, the struct tty_port part in }(hj hhhNhNubh)}(h`Registering Devices`_h]hRegistering Devices}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameRegistering DevicesjjZuh1hhj jKubh is still relevant there.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjp hhubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j} tty_register_driver (C function)c.tty_register_driverhNtauh1jphjp hhhNhNubj)}(hhh](j)}(h3int tty_register_driver (struct tty_driver *driver)h]j)}(h2int tty_register_driver(struct tty_driver *driver)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chMq ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhj hMq ubj)}(htty_register_driverh]j)}(htty_register_driverh]htty_register_driver}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hMq ubj)}(h(struct tty_driver *driver)h]j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj, hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hj= hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj: ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetj? modnameN classnameNj;j>)}jA]jD)}j7j sbc.tty_register_driverasbuh1hhj ubj)}(h h]h }(hj] hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj ubjY)}(hj\h]h*}(hjk hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubj)}(hdriverh]hdriver}(hjx hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubah}(h]h ]h"]h$]h&]hhuh1jhj hhhj hMq ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hMq ubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hMq hj hhubj)}(hhh]h)}(hregister a tty driverh]hregister a tty driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chMl hj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMq ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjp hNhNubj)}(h**Parameters** ``struct tty_driver *driver`` driver to register **Description** Called by a tty driver to register itself.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_driver:54: ./drivers/tty/tty_io.chMp hj ubj2)}(hhh]j7)}(h1``struct tty_driver *driver`` driver to register h](j=)}(h``struct tty_driver *driver``h]j')}(hj h]hstruct tty_driver *driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chMm hj ubjW)}(hhh]h)}(hdriver to registerh]hdriver to register}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMm hj ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hMm hj ubah}(h]h ]h"]h$]h&]uh1j1hj ubh)}(h**Description**h]j)}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chMo hj ubh)}(h*Called by a tty driver to register itself.h]h*Called by a tty driver to register itself.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chMo hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjp hhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}"tty_unregister_driver (C function)c.tty_unregister_driverhNtauh1jphjp hhhNhNubj)}(hhh](j)}(h6void tty_unregister_driver (struct tty_driver *driver)h]j)}(h5void tty_unregister_driver(struct tty_driver *driver)h](j)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj_hhhjqhM ubj)}(htty_unregister_driverh]j)}(htty_unregister_driverh]htty_unregister_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj_hhhjqhM ubj)}(h(struct tty_driver *driver)h]j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jD)}j7jsbc.tty_unregister_driverasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj_hhhjqhM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj[hhhjqhM ubah}(h]jVah ](jjeh"]h$]h&]jj)jhuh1jhjqhM hjXhhubj)}(hhh]h)}(hunregister a tty driverh]hunregister a tty driver}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chM hj hhubah}(h]h ]h"]h$]h&]uh1jhjXhhhjqhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj;jj;jjjuh1jhhhjp hNhNubj)}(h**Parameters** ``struct tty_driver *driver`` driver to unregister **Description** Called by a tty driver to unregister itself.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_driver:54: ./drivers/tty/tty_io.chM hj?ubj2)}(hhh]j7)}(h3``struct tty_driver *driver`` driver to unregister h](j=)}(h``struct tty_driver *driver``h]j')}(hjdh]hstruct tty_driver *driver}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjbubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chM hj^ubjW)}(hhh]h)}(hdriver to unregisterh]hdriver to unregister}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhM hjzubah}(h]h ]h"]h$]h&]uh1jVhj^ubeh}(h]h ]h"]h$]h&]uh1j6hjyhM hj[ubah}(h]h ]h"]h$]h&]uh1j1hj?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_driver:54: ./drivers/tty/tty_io.chM hj?ubh)}(h,Called by a tty driver to unregister itself.h]h,Called by a tty driver to unregister itself.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:54: ./drivers/tty/tty_io.chM hj?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjp hhhNhNubh)}(hhh](h)}(hRegistering Devicesh]hRegistering Devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjTuh1hhjhhhhhK:ubh)}(hXEvery TTY device shall be backed by a struct tty_port. Usually, TTY drivers embed tty_port into device's private structures. Further details about handling tty_port can be found in :doc:`tty_port`. The driver is also recommended to use tty_port's reference counting by tty_port_get() and tty_port_put(). The final put is supposed to free the tty_port including the device's private struct.h](hEvery TTY device shall be backed by a struct tty_port. Usually, TTY drivers embed tty_port into device’s private structures. Further details about handling tty_port can be found in }(hjhhhNhNubh)}(h:doc:`tty_port`h]hinline)}(hjh]htty_port}(hjhhhNhNubah}(h]h ](jI stdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypedoc refexplicitrefwarnj^ tty_portuh1hhhhK)}jA]jD)}j7tty_register_devicesbc.tty_register_deviceasbuh1hhjhhhjhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhM ubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhhhjhM ubj)}(htty_register_deviceh]j)}(hjh]htty_register_device}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubj)}(hB(struct tty_driver *driver, unsigned index, struct device *device)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj8ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetj\modnameN classnameNj;j>)}jA]jc.tty_register_deviceasbuh1hhj8ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj8ubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj8ubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hindexh]hindex}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubj)}(hstruct device *deviceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jc.tty_register_deviceasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hj+hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdeviceh]hdevice}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(hregister a tty deviceh]hregister a tty device}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chMu hj_hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjzjjzjjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct tty_driver *driver`` the tty driver that describes the tty device ``unsigned index`` the index in the tty driver for this tty device ``struct device *device`` a struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to NULL safely. **Description** This call is required to be made to register an individual tty device if the tty driver's flags have the ``TTY_DRIVER_DYNAMIC_DEV`` bit set. If that bit is not set, this function should not be called by a tty driver. Locking: ?? **Return** A pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).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_driver:82: ./drivers/tty/tty_io.chMy hj~ubj2)}(hhh](j7)}(hK``struct tty_driver *driver`` the tty driver that describes the tty device h](j=)}(h``struct tty_driver *driver``h]j')}(hjh]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chMv hjubjW)}(hhh]h)}(h,the tty driver that describes the tty deviceh]h,the tty driver that describes the tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMv hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhMv hjubj7)}(hC``unsigned index`` the index in the tty driver for this tty device h](j=)}(h``unsigned index``h]j')}(hjh]hunsigned index}(hjhhhNhNuba.h}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chMw hjubjW)}(hhh]h)}(h/the index in the tty driver for this tty deviceh]h/the index in the tty driver for this tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMw hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhMw hjubj7)}(h``struct device *device`` a struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to NULL safely. h](j=)}(h``struct device *device``h]j')}(hjh]hstruct device *device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chMz hjubjW)}(hhh]h)}(ha struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to NULL safely.h]ha struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to NULL safely.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chMx hj+ubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hj*hMz hjubeh}(h]h ]h"]h$]h&]uh1j1hj~ubh)}(h**Description**h]j)}(hjQh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM| hj~ubh)}(hThis call is required to be made to register an individual tty device if the tty driver's flags have the ``TTY_DRIVER_DYNAMIC_DEV`` bit set. If that bit is not set, this function should not be called by a tty driver.h](hkThis call is required to be made to register an individual tty device if the tty driver’s flags have the }(hjghhhNhNubj')}(h``TTY_DRIVER_DYNAMIC_DEV``h]hTTY_DRIVER_DYNAMIC_DEV}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjgubhV bit set. If that bit is not set, this function should not be called by a tty driver.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM| hj~ubh)}(h Locking: ??h]h Locking: ??}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hj~ubh)}(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_driver:82: ./drivers/tty/tty_io.chM hj~ubh)}(hPA pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).h]hPA pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hj~ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}%tty_register_device_attr (C function)c.tty_register_device_attrhNtauh1jphjhhhNhNubj)}(hhh](j)}(hstruct device * tty_register_device_attr (struct tty_driver *driver, unsigned index, struct device *device, void *drvdata, const struct attribute_group **attr_grp)h]j)}(hstruct device *tty_register_device_attr(struct tty_driver *driver, unsigned index, struct device *device, void *drvdata, const struct attribute_group **attr_grp)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhM ubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jD)}j7tty_register_device_attrsbc.tty_register_device_attrasbuh1hhjhhhjhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhM ubjY)}(hj\h]h*}(hj,hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhhhjhM ubj)}(htty_register_device_attrh]j)}(hjh]htty_register_device_attr}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubj)}(hz(struct tty_driver *driver, unsigned index, struct device *device, void *drvdata, const struct attribute_group **attr_grp)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjTubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjxmodnameN classnameNj;j>)}jA]jc.tty_register_device_attrasbuh1hhjTubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjTubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjTubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hindexh]hindex}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubj)}(hstruct device *deviceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jc.tty_register_device_attrasbuh1hhjubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjGhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdeviceh]hdevice}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubj)}(h void *drvdatah](j)}(hvoidh]hvoid}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjiubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjiubj)}(hdrvdatah]hdrvdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubj)}(h'const struct attribute_group **attr_grph](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(hattribute_grouph]hattribute_group}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jc.tty_register_device_attrasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubjY)}(hj\h]h*}(hj"hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hattr_grph]hattr_grp}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(hregister a tty deviceh]hregister a tty device}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjVhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjqjjqjjjuh1jhhhjhNhNubj)}(hXM**Parameters** ``struct tty_driver *driver`` the tty driver that describes the tty device ``unsigned index`` the index in the tty driver for this tty device ``struct device *device`` a struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to ``NULL`` safely. ``void *drvdata`` Driver data to be set to device. ``const struct attribute_group **attr_grp`` Attribute group to be set on device. **Description** This call is required to be made to register an individual tty device if the tty driver's flags have the ``TTY_DRIVER_DYNAMIC_DEV`` bit set. If that bit is not set, this function should not be called by a tty driver. Locking: ?? **Return** A pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).h](h)}(h**Parameters**h]j)}(hj{h]h Parameters}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjuubj2)}(hhh](j7)}(hK``struct tty_driver *driver`` the tty driver that describes the tty device h](j=)}(h``struct tty_driver *driver``h]j')}(hjh]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h,the tty driver that describes the tty deviceh]h,the tty driver that describes the tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubj7)}(hC``unsigned index`` the index in the tty driver for this tty device h](j=)}(h``unsigned index``h]j')}(hjh]hunsigned index}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h/the index in the tty driver for this tty deviceh]h/the index in the tty driver for this tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubj7)}(h``struct device *device`` a struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to ``NULL`` safely. h](j=)}(h``struct device *device``h]j')}(hj h]hstruct device *device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(ha struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to ``NULL`` safely.h](ha struct device that is associated with this tty device. This field is optional, if there is no known struct device for this tty device it can be set to }(hj%hhhNhNubj')}(h``NULL``h]hNULL}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj%ubh safely.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hj"ubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hj!hM hjubj7)}(h3``void *drvdata`` Driver data to be set to device. h](j=)}(h``void *drvdata``h]j')}(hjXh]h void *drvdata}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjVubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjRubjW)}(hhh]h)}(h Driver data to be set to device.h]h Driver data to be set to device.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhM hjnubah}(h]h ]h"]h$]h&]uh1jVhjRubeh}(h]h ]h"]h$]h&]uh1j6hjmhM hjubj7)}(hQ``const struct attribute_group **attr_grp`` Attribute group to be set on device. h](j=)}(h+``const struct attribute_group **attr_grp``h]j')}(hjh]h'const struct attribute_group **attr_grp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h$Attribute group to be set on device.h]h$Attribute group to be set on device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubeh}(h]h ]h"]h$]h&]uh1j1hjuubh)}(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_driver:82: ./drivers/tty/tty_io.chM hjuubh)}(hThis call is required to be made to register an individual tty device if the tty driver's flags have the ``TTY_DRIVER_DYNAMIC_DEV`` bit set. If that bit is not set, this function should not be called by a tty driver.h](hkThis call is required to be made to register an individual tty device if the tty driver’s flags have the }(hjhhhNhNubj')}(h``TTY_DRIVER_DYNAMIC_DEV``h]hTTY_DRIVER_DYNAMIC_DEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubhU bit set. If that bit is not set, this function should not be called by a tty driver.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjuubh)}(h Locking: ??h]h Locking: ??}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjuubh)}(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_driver:82: ./drivers/tty/tty_io.chM hjuubh)}(hPA pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).h]hPA pointer to the struct device for this tty device (or ERR_PTR(-EFOO) on error).}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjuubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}"tty_unregister_device (C function)c.tty_unregister_devicehNtauh1jphjhhhNhNubj)}(hhh](j)}(hFvoid tty_unregister_device (struct tty_driver *driver, unsigned index)h]j)}(hEvoid tty_unregister_device(struct tty_driver *driver, unsigned index)h](j)}(hvoidh]hvoid}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjUhhhjghM ubj)}(htty_unregister_deviceh]j)}(htty_unregister_deviceh]htty_unregister_device}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubah}(h]h ](jjeh"]h$]h&]hhuh1jhjUhhhjghM ubj)}(h+(struct tty_driver *driver, unsigned index)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jD)}j7j|sbc.tty_unregister_deviceasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hindexh]hindex}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjUhhhjghM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjQhhhjghM ubah}(h]jLah ](jjeh"]h$]h&]jj)jhuh1jhjghM hjNhhubj)}(hhh]h)}(hunregister a tty deviceh]hunregister a tty device}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjKhhubah}(h]h ]h"]h$]h&]uh1jhjNhhhjghM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjfjjfjjjuh1jhhhjhNhNubj)}(hXC**Parameters** ``struct tty_driver *driver`` the tty driver that describes the tty device ``unsigned index`` the index in the tty driver for this tty device **Description** If a tty device is registered with a call to tty_register_device() then this function must be called when the tty device is gone. Locking: ??h](h)}(h**Parameters**h]j)}(hjph]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjjubj2)}(hhh](j7)}(hK``struct tty_driver *driver`` the tty driver that describes the tty device h](j=)}(h``struct tty_driver *driver``h]j')}(hjh]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h,the tty driver that describes the tty deviceh]h,the tty driver that describes the tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubj7)}(hC``unsigned index`` the index in the tty driver for this tty device h](j=)}(h``unsigned index``h]j')}(hjh]hunsigned index}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<h^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjubjW)}(hhh]h)}(h/the index in the tty driver for this tty deviceh]h/the index in the tty driver for this tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhM hjubeh}(h]h ]h"]h$]h&]uh1j1hjjubh)}(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_driver:82: ./drivers/tty/tty_io.chM hjjubh)}(hIf a tty device is registered with a call to tty_register_device() then this function must be called when the tty device is gone.h]hIf a tty device is registered with a call to tty_register_device() then this function must be called when the tty device is gone.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjjubh)}(h Locking: ??h]h Locking: ??}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:82: ./drivers/tty/tty_io.chM hjjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]jZah ]h"]registering devicesah$]h&]uh1hhjp hhhhhK:j\ Kubje )}(h----h]h}(h]h ]h"]h$]h&]uh1jd hhhKVhjp hhubh)}(hhh](h)}(hLinking Devices to Portsh]hLinking Devices to Ports}(hjRhhhNhNubah}(h]h ]h"]h$]h&]jjvuh1hhjOhhhhhKYubh)}(hXAs stated earlier, every TTY device shall have a struct tty_port assigned to it. It must be known to the TTY layer at :c:member:`tty_driver.ops.install()` at latest. There are few helpers to *link* the two. Ideally, the driver uses tty_port_register_device() or tty_port_register_device_attr() instead of tty_register_device() and tty_register_device_attr() at the registration time. This way, the driver needs not care about linking later on.h](hvAs stated earlier, every TTY device shall have a struct tty_port assigned to it. It must be known to the TTY layer at }(hj`hhhNhNubh)}(h$:c:member:`tty_driver.ops.install()`h]j')}(hjjh]htty_driver.ops.install()}(hjlhhhNhNubah}(h]h ](jI jc-membereh"]h$]h&]uh1j&hjhubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypemember refexplicitrefwarnj;j[ j^ tty_driver.ops.install()uh1hhhhKZhj`ubh& at latest. There are few helpers to }(hj`hhhNhNubj )}(h*link*h]hlink}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj`ubh the two. Ideally, the driver uses tty_port_register_device() or tty_port_register_device_attr() instead of tty_register_device() and tty_register_device_attr() at the registration time. This way, the driver needs not care about linking later on.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhjOhhubh)}(hXtIf that is not possible, the driver still can link the tty_port to a specific index *before* the actual registration by tty_port_link_device(). If it still does not fit, tty_port_install() can be used from the :c:member:`tty_driver.ops.install` hook as a last resort. The last one is dedicated mostly for in-memory devices like PTY where tty_ports are allocated on demand.h](hTIf that is not possible, the driver still can link the tty_port to a specific index }(hjhhhNhNubj )}(h*before*h]hbefore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhv the actual registration by tty_port_link_device(). If it still does not fit, tty_port_install() can be used from the }(hjhhhNhNubh)}(h":c:member:`tty_driver.ops.install`h]j')}(hjh]htty_driver.ops.install}(hjhhhNhNubah}(h]h ](jI jc-membereh"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypemember refexplicitrefwarnj;j[ j^ tty_driver.ops.installuh1hhhhKahjubh hook as a last resort. The last one is dedicated mostly for in-memory devices like PTY where tty_ports are allocated on demand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKahjOhhubh)}(h)The linking routines are documented here:h]h)The linking routines are documented here:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjOhhubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}!tty_port_link_device (C function)c.tty_port_link_devicehNtauh1jphjOhhhNhNubj)}(hhh](j)}(h\void tty_port_link_device (struct tty_port *port, struct tty_driver *driver, unsigned index)h]j)}(h[void tty_port_link_device(struct tty_port *port, struct tty_driver *driver, unsigned index)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKuubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj hhhjhKuubj)}(htty_port_link_deviceh]j)}(htty_port_link_deviceh]htty_port_link_device}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhjhKuubj)}(hB(struct tty_port *port, struct tty_driver *driver, unsigned index)h](j)}(hstruct tty_port *porth](j)}(hjh]hstruct}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjFubh)}(hhh]j)}(htty_porth]htty_port}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjjmodnameN classnameNj;j>)}jA]jD)}j7j0sbc.tty_port_link_deviceasbuh1hhjFubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjFubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjFubj)}(hporth]hport}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubj)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jc.tty_port_link_deviceasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdriverh]hdriver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj(ubj)}(hindexh]hindex}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhjhKuubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKuubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKuhjhhubj)}(hhh]h)}(hlink tty and tty_porth]hlink tty and tty_port}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKkhjohhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKuubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjOhNhNubj)}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_driver *driver`` tty_driver for this device ``unsigned index`` index of the tty **Description** Provide the tty layer with a link from a tty (specified by **index**) to a tty_port (**port**). Use this only if neither tty_port_register_device() nor tty_port_install() is used in the driver. If used, this has to be called before tty_register_driver().h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKohjubj2)}(hhh](j7)}(h1``struct tty_port *port`` tty_port of the device h](j=)}(h``struct tty_port *port``h]j')}(hjh]hstruct tty_port *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKlhjubjW)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKlhjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhKlhjubj7)}(h9``struct tty_driver *driver`` tty_driver for this device h](j=)}(h``struct tty_driver *driver``h]j')}(hjh]hstruct tty_driver *driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKmhjubjW)}(hhh]h)}(htty_driver for this deviceh]htty_driver for this device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKmhjubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hjhKmhjubj7)}(h$``unsigned index`` index of the tty h](j=)}(h``unsigned index``h]j')}(hj%h]hunsigned index}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj#ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKnhjubjW)}(hhh]h)}(hindex of the ttyh]hindex of the tty}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKnhj;ubah}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]uh1j6hj:hKnhjubeh}(h]h ]h"]h$]h&]uh1j1hjubh)}(h**Description**h]j)}(hj`h]h Description}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKphjubh)}(hProvide the tty layer with a link from a tty (specified by **index**) to a tty_port (**port**). Use this only if neither tty_port_register_device() nor tty_port_install() is used in the driver. If used, this has to be called before tty_register_driver().h](h;Provide the tty layer with a link from a tty (specified by }(hjvhhhNhNubj)}(h **index**h]hindex}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh) to a tty_port (}(hjvhhhNhNubj)}(h**port**h]hport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh). Use this only if neither tty_port_register_device() nor tty_port_install() is used in the driver. If used, this has to be called before tty_register_driver().}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKphjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjOhhhNhNubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}%tty_port_register_device (C function)c.tty_port_register_devicehNtauh1jphjOhhhNhNubj)}(hhh](j)}(hstruct device * tty_port_register_device (struct tty_port *port, struct tty_driver *driver, unsigned index, struct device *device)h]j)}(hstruct device *tty_port_register_device(struct tty_port *port, struct tty_driver *driver, unsigned index, struct device *device)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhKubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jD)}j7tty_port_register_devicesbc.tty_port_register_deviceasbuh1hhjhhhjhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjhhhjhKubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhhhjhKubj)}(htty_port_register_deviceh]j)}(hjh]htty_port_register_device}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(hY(struct tty_port *port, struct tty_driver *driver, unsigned index, struct device *device)h](j)}(hstruct tty_port *porth](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj?ubh)}(hhh]j)}(htty_porth]htty_port}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjcmodnameN classnameNj;j>)}jA]jc.tty_port_register_deviceasbuh1hhj?ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj?ubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj?ubj)}(hporth]hport}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubj)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjmodnameN classnameNj;j>)}jA]jc.tty_port_register_deviceasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubj)}(hdriverh]hdriver}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubj)}(hindexh]hindex}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubj)}(hstruct device *deviceh](j)}(hjh]hstruct}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjTubh)}(hhh]j)}(hdeviceh]hdevice}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjxmodnameN classnameNj;j>)}jA]jc.tty_port_register_deviceasbuh1hhjTubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjTubjY)}(hj\h]h*}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjTubj)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(hregister tty deviceh]hregister tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjOhNhNubj)}(hX**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_driver *driver`` tty_driver for this device ``unsigned index`` index of the tty ``struct device *device`` parent if exists, otherwise NULL **Description** It is the same as tty_register_device() except the provided **port** is linked to a concrete tty specified by **index**. Use this or tty_port_install() (or both). Call tty_port_link_device() as a last resort.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjubj2)}(hhh](j7)}(h1``struct tty_port *port`` tty_port of the device h](j=)}(h``struct tty_port *port``h]j')}(hj h]hstruct tty_port *port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj ubjW)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ hKhj0 ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj/ hKhj ubj7)}(h9``struct tty_driver *driver`` tty_driver for this device h](j=)}(h``struct tty_driver *driver``h]j')}(hjS h]hstruct tty_driver *driver}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjQ ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjM ubjW)}(hhh]h)}(htty_driver for this deviceh]htty_driver for this device}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh hKhji ubah}(h]h ]h"]h$]h&]uh1jVhjM ubeh}(h]h ]h"]h$]h&]uh1j6hjh hKhj ubj7)}(h$``unsigned index`` index of the tty h](j=)}(h``unsigned index``h]j')}(hj h]hunsigned index}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj ubjW)}(hhh]h)}(hindex of the ttyh]hindex of the tty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hKhj ubj7)}(h;``struct device *device`` parent if exists, otherwise NULL h](j=)}(h``struct device *device``h]j')}(hj h]hstruct device *device}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj ubjW)}(hhh]h)}(h parent if exists, otherwise NULLh]h parent if exists, otherwise NULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jVhj ubeh}(h]h ]h"]h$]h&]uh1j6hj hKhj ubeh}(h]h ]h"]h$]h&]uh1j1hjubh)}(h**Description**h]j)}(hj!h]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjubh)}(hIt is the same as tty_register_device() except the provided **port** is linked to a concrete tty specified by **index**. Use this or tty_port_install() (or both). Call tty_port_link_device() as a last resort.h](h)}jA]jD)}j7tty_port_register_device_attrsbc.tty_port_register_device_attrasbuh1hhje!hhhjv!hKubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hje!hhhjv!hKubjY)}(hj\h]h*}(hj!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhje!hhhjv!hKubj)}(htty_port_register_device_attrh]j)}(hj!h]htty_port_register_device_attr}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhje!hhhjv!hKubj)}(h(struct tty_port *port, struct tty_driver *driver, unsigned index, struct device *device, void *drvdata, const struct attribute_group **attr_grp)h](j)}(hstruct tty_port *porth](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubh)}(hhh]j)}(htty_porth]htty_port}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetj"modnameN classnameNj;j>)}jA]j!c.tty_port_register_device_attrasbuh1hhj!ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj!ubjY)}(hj\h]h*}(hj-"hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj!ubj)}(hporth]hport}(hj:"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hjS"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO"ubj)}(h h]h }(hj`"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjO"ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjq"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn"ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetjs"modnameN classnameNj;j>)}jA]j!c.tty_port_register_device_attrasbuh1hhjO"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjO"ubjY)}(hj\h]h*}(hj"hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjO"ubj)}(hdriverh]hdriver}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(hunsigned indexh](j)}(hunsignedh]hunsigned}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj"ubj)}(hindexh]hindex}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(hstruct device *deviceh](j)}(hjh]hstruct}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj"ubh)}(hhh]j)}(hdeviceh]hdevice}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetj#modnameN classnameNj;j>)}jA]j!c.tty_port_register_device_attrasbuh1hhj"ubj)}(h h]h }(hj4#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj"ubjY)}(hj\h]h*}(hjB#hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj"ubj)}(hdeviceh]hdevice}(hjO#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(h void *drvdatah](j)}(hvoidh]hvoid}(hjh#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd#ubj)}(h h]h }(hjv#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjd#ubjY)}(hj\h]h*}(hj#hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjd#ubj)}(hdrvdatah]hdrvdata}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(h'const struct attribute_group **attr_grph](j)}(hjh]hconst}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj#ubj)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj#ubh)}(hhh]j)}(hattribute_grouph]hattribute_group}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej7 reftargetj#modnameN classnameNj;j>)}jA]j!c.tty_port_register_device_attrasbuh1hhj#ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj#ubjY)}(hj\h]h*}(hj$hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj#ubjY)}(hj\h]h*}(hj$hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj#ubj)}(hattr_grph]hattr_grp}(hj)$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubeh}(h]h ]h"]h$]h&]hhuh1jhje!hhhjv!hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhja!hhhjv!hKubah}(h]j\!ah ](jjeh"]h$]h&]jj)jhuh1jhjv!hKhj^!hhubj)}(hhh]h)}(hregister tty deviceh]hregister tty device}(hjS$hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjP$hhubah}(h]h ]h"]h$]h&]uh1jhj^!hhhjv!hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjk$jjk$jjjuh1jhhhjOhNhNubj)}(hXU**Parameters** ``struct tty_port *port`` tty_port of the device ``struct tty_driver *driver`` tty_driver for this device ``unsigned index`` index of the tty ``struct device *device`` parent if exists, otherwise NULL ``void *drvdata`` Driver data to be set to device. ``const struct attribute_group **attr_grp`` Attribute group to be set on device. **Description** It is the same as tty_register_device_attr() except the provided **port** is linked to a concrete tty specified by **index**. Use this or tty_port_install() (or both). Call tty_port_link_device() as a last resort.h](h)}(h**Parameters**h]j)}(hju$h]h Parameters}(hjw$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs$ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjo$ubj2)}(hhh](j7)}(h1``struct tty_port *port`` tty_port of the device h](j=)}(h``struct tty_port *port``h]j')}(hj$h]hstruct tty_port *port}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj$ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj$ubjW)}(hhh]h)}(htty_port of the deviceh]htty_port of the device}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj$ubah}(h]h ]h"]h$]h&]uh1jVhj$ubeh}(h]h ]h"]h$]h&]uh1j6hj$hKhj$ubj7)}(h9``struct tty_driver *driver`` tty_driver for this device h](j=)}(h``struct tty_driver *driver``h]j')}(hj$h]hstruct tty_driver *driver}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj$ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj$ubjW)}(hhh]h)}(htty_driver for this deviceh]htty_driver for this device}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj$ubah}(h]h ]h"]h$]h&]uh1jVhj$ubeh}(h]h ]h"]h$]h&]uh1j6hj$hKhj$ubj7)}(h$``unsigned index`` index of the tty h](j=)}(h``unsigned index``h]j')}(hj%h]hunsigned index}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj%ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj%ubjW)}(hhh]h)}(hindex of the ttyh]hindex of the tty}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj%ubah}(h]h ]h"]h$]h&]uh1jVhj%ubeh}(h]h ]h"]h$]h&]uh1j6hj%hKhj$ubj7)}(h;``struct device *device`` parent if exists, otherwise NULL h](j=)}(h``struct device *device``h]j')}(hj?%h]hstruct device *device}(hjA%hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj=%ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj9%ubjW)}(hhh]h)}(h parent if exists, otherwise NULLh]h parent if exists, otherwise NULL}(hjX%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT%hKhjU%ubah}(h]h ]h"]h$]h&]uh1jVhj9%ubeh}(h]h ]h"]h$]h&]uh1j6hjT%hKhj$ubj7)}(h3``void *drvdata`` Driver data to be set to device. h](j=)}(h``void *drvdata``h]j')}(hjx%h]h void *drvdata}(hjz%hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjv%ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjr%ubjW)}(hhh]h)}(h Driver data to be set to device.h]h Driver data to be set to device.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj%ubah}(h]h ]h"]h$]h&]uh1jVhjr%ubeh}(h]h ]h"]h$]h&]uh1j6hj%hKhj$ubj7)}(hQ``const struct attribute_group **attr_grp`` Attribute group to be set on device. h](j=)}(h+``const struct attribute_group **attr_grp``h]j')}(hj%h]h'const struct attribute_group **attr_grp}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj%ubah}(h]h ]h"]h$]h&]uh1j<ha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhj%ubjW)}(hhh]h)}(h$Attribute group to be set on device.h]h$Attribute group to be set on device.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj%ubah}(h]h ]h"]h$]h&]uh1jVhj%ubeh}(h]h ]h"]h$]h&]uh1j6hj%hKhj$ubeh}(h]h ]h"]h$]h&]uh1j1hjo$ubh)}(h**Description**h]j)}(hj%h]h Description}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjo$ubh)}(hIt is the same as tty_register_device_attr() except the provided **port** is linked to a concrete tty specified by **index**. Use this or tty_port_install() (or both). Call tty_port_link_device() as a last resort.h](hAIt is the same as tty_register_device_attr() except the provided }(hj&hhhNhNubj)}(h**port**h]hport}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh* is linked to a concrete tty specified by }(hj&hhhNhNubj)}(h **index**h]hindex}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubhY. Use this or tty_port_install() (or both). Call tty_port_link_device() as a last resort.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:106: ./drivers/tty/tty_port.chKhjo$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjOhhhNhNubeh}(h]j|ah ]h"]linking devices to portsah$]h&]uh1hhjp hhhhhKYj\ Kubeh}(h]j;ah ]h"] registrationah$]h&]uh1hhhhhhhhK-ubje )}(h----h]h}(h]h ]h"]h$]h&]uh1jd hhhKnhhhhubh)}(hhh](h)}(hTTY Driver Referenceh]hTTY Driver Reference}(hjW&hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhjT&hhhhhKqubh)}(hAll members of struct tty_driver are documented here. The required members are noted at the end. struct tty_operations are documented next.h]hAll members of struct tty_driver are documented here. The required members are noted at the end. struct tty_operations are documented next.}(hje&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjT&hhubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}tty_driver (C struct) c.tty_driverhNtauh1jphjT&hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhNubj)}(hhh](j)}(h tty_driverh]j)}(hstruct tty_driverh](j)}(hjh]hstruct}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhKubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj&hhhj&hKubj)}(h tty_driverh]j)}(hj&h]h tty_driver}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj&hhhj&hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj&hhhj&hKubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jhj&hKhj&hhubj)}(hhh]h)}(hhh]h)}(hdriver for TTY devicesh]h)}(hj&h]hdriver for TTY devices}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj&ubah}(h]h ]h"]h$]h&]uh1hhj&hhhj&hNubah}(h]h ]h"]h$]h&]j j uh1hhj&hMhj&hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj&hKubeh}(h]h ](jstructeh"]h$]h&]jjjj&jj&jjjuh1jhhhjT&hj&hNubj)}(hX**Definition**:: struct tty_driver { struct kref kref; struct cdev **cdevs; struct module *owner; const char *driver_name; const char *name; int name_base; int major; int minor_start; unsigned int num; enum tty_driver_type type; enum tty_driver_subtype subtype; struct ktermios init_termios; unsigned long flags; struct proc_dir_entry *proc_entry; struct tty_driver *other; struct tty_struct **ttys; struct tty_port **ports; struct ktermios **termios; void *driver_state; const struct tty_operations *ops; struct list_head tty_drivers; }; **Members** ``kref`` reference counting. Reaching zero frees all the internals and the driver. ``cdevs`` allocated/registered character /dev devices ``owner`` modules owning this driver. Used drivers cannot be rmmod'ed. Automatically set by tty_alloc_driver(). ``driver_name`` name of the driver used in /proc/tty ``name`` used for constructing /dev node name ``name_base`` used as a number base for constructing /dev node name ``major`` major /dev device number (zero for autoassignment) ``minor_start`` the first minor /dev device number ``num`` number of devices allocated ``type`` type of tty driver (enum tty_driver_type) ``subtype`` subtype of tty driver (enum tty_driver_subtype) ``init_termios`` termios to set to each tty initially (e.g. ``tty_std_termios``) ``flags`` tty driver flags (``TTY_DRIVER_``) ``proc_entry`` proc fs entry, used internally ``other`` driver of the linked tty; only used for the PTY driver ``ttys`` array of active :c:type:`struct tty_struct `, set by tty_standard_install() ``ports`` array of :c:type:`struct tty_port `; can be set during initialization by tty_port_link_device() and similar ``termios`` storage for termios at each TTY close for the next open ``driver_state`` pointer to driver's arbitrary data ``ops`` driver hooks for TTYs. Set them using tty_set_operations(). Use :c:type:`struct tty_port ` helpers in them as much as possible. ``tty_drivers`` used internally to link tty_drivers togetherh](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&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj&ubh literal_block)}(hXnstruct tty_driver { struct kref kref; struct cdev **cdevs; struct module *owner; const char *driver_name; const char *name; int name_base; int major; int minor_start; unsigned int num; enum tty_driver_type type; enum tty_driver_subtype subtype; struct ktermios init_termios; unsigned long flags; struct proc_dir_entry *proc_entry; struct tty_driver *other; struct tty_struct **ttys; struct tty_port **ports; struct ktermios **termios; void *driver_state; const struct tty_operations *ops; struct list_head tty_drivers; };h]hXnstruct tty_driver { struct kref kref; struct cdev **cdevs; struct module *owner; const char *driver_name; const char *name; int name_base; int major; int minor_start; unsigned int num; enum tty_driver_type type; enum tty_driver_subtype subtype; struct ktermios init_termios; unsigned long flags; struct proc_dir_entry *proc_entry; struct tty_driver *other; struct tty_struct **ttys; struct tty_port **ports; struct ktermios **termios; void *driver_state; const struct tty_operations *ops; struct list_head tty_drivers; };}hj 'sbah}(h]h ]h"]h$]h&]hhuh1j'he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj&ubh)}(h **Members**h]j)}(hj1'h]hMembers}(hj3'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/'ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj&ubj2)}(hhh](j7)}(hS``kref`` reference counting. Reaching zero frees all the internals and the driver. h](j=)}(h``kref``h]j')}(hjP'h]hkref}(hjR'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjN'ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjJ'ubjW)}(hhh]h)}(hIreference counting. Reaching zero frees all the internals and the driver.h]hIreference counting. Reaching zero frees all the internals and the driver.}(hji'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjf'ubah}(h]h ]h"]h$]h&]uh1jVhjJ'ubeh}(h]h ]h"]h$]h&]uh1j6hje'hMhjG'ubj7)}(h6``cdevs`` allocated/registered character /dev devices h](j=)}(h ``cdevs``h]j')}(hj'h]hcdevs}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj'ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj'ubjW)}(hhh]h)}(h+allocated/registered character /dev devicesh]h+allocated/registered character /dev devices}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1jVhj'ubeh}(h]h ]h"]h$]h&]uh1j6hj'hMhjG'ubj7)}(hp``owner`` modules owning this driver. Used drivers cannot be rmmod'ed. Automatically set by tty_alloc_driver(). h](j=)}(h ``owner``h]j')}(hj'h]howner}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj'ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj'ubjW)}(hhh]h)}(hemodules owning this driver. Used drivers cannot be rmmod'ed. Automatically set by tty_alloc_driver().h]hgmodules owning this driver. Used drivers cannot be rmmod’ed. Automatically set by tty_alloc_driver().}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj'ubah}(h]h ]h"]h$]h&]uh1jVhj'ubeh}(h]h ]h"]h$]h&]uh1j6hj'hMhjG'ubj7)}(h5``driver_name`` name of the driver used in /proc/tty h](j=)}(h``driver_name``h]j')}(hj'h]h driver_name}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj'ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj'ubjW)}(hhh]h)}(h$name of the driver used in /proc/ttyh]h$name of the driver used in /proc/tty}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jVhj'ubeh}(h]h ]h"]h$]h&]uh1j6hj(hMhjG'ubj7)}(h.``name`` used for constructing /dev node name h](j=)}(h``name``h]j')}(hj6(h]hname}(hj8(hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj4(ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj0(ubjW)}(hhh]h)}(h$used for constructing /dev node nameh]h$used for constructing /dev node name}(hjO(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK(hMhjL(ubah}(h]h ]h"]h$]h&]uh1jVhj0(ubeh}(h]h ]h"]h$]h&]uh1j6hjK(hMhjG'ubj7)}(hD``name_base`` used as a number base for constructing /dev node name h](j=)}(h ``name_base``h]j')}(hjo(h]h name_base}(hjq(hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjm(ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhji(ubjW)}(hhh]h)}(h5used as a number base for constructing /dev node nameh]h5used as a number base for constructing /dev node name}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jVhji(ubeh}(h]h ]h"]h$]h&]uh1j6hj(hMhjG'ubj7)}(h=``major`` major /dev device number (zero for autoassignment) h](j=)}(h ``major``h]j')}(hj(h]hmajor}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj(ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj(ubjW)}(hhh]h)}(h2major /dev device number (zero for autoassignment)h]h2major /dev device number (zero for autoassignment)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jVhj(ubeh}(h]h ]h"]h$]h&]uh1j6hj(hMhjG'ubj7)}(h3``minor_start`` the first minor /dev device number h](j=)}(h``minor_start``h]j')}(hj(h]h minor_start}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj(ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj(ubjW)}(hhh]h)}(h"the first minor /dev device numberh]h"the first minor /dev device number}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jVhj(ubeh}(h]h ]h"]h$]h&]uh1j6hj(hMhjG'ubj7)}(h$``num`` number of devices allocated h](j=)}(h``num``h]j')}(hj)h]hnum}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj)ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj)ubjW)}(hhh]h)}(hnumber of devices allocatedh]hnumber of devices allocated}(hj3)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/)hMhj0)ubah}(h]h ]h"]h$]h&]uh1jVhj)ubeh}(h]h ]h"]h$]h&]uh1j6hj/)hMhjG'ubj7)}(h3``type`` type of tty driver (enum tty_driver_type) h](j=)}(h``type``h]j')}(hjS)h]htype}(hjU)hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjQ)ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjM)ubjW)}(hhh]h)}(h)type of tty driver (enum tty_driver_type)h]h)type of tty driver (enum tty_driver_type)}(hjl)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh)hMhji)ubah}(h]h ]h"]h$]h&]uh1jVhjM)ubeh}(h]h ]h"]h$]h&]uh1j6hjh)hMhjG'ubj7)}(h<``subtype`` subtype of tty driver (enum tty_driver_subtype) h](j=)}(h ``subtype``h]j')}(hj)h]hsubtype}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj)ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj)ubjW)}(hhh]h)}(h/subtype of tty driver (enum tty_driver_subtype)h]h/subtype of tty driver (enum tty_driver_subtype)}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hMhj)ubah}(h]h ]h"]h$]h&]uh1jVhj)ubeh}(h]h ]h"]h$]h&]uh1j6hj)hMhjG'ubj7)}(hQ``init_termios`` termios to set to each tty initially (e.g. ``tty_std_termios``) h](j=)}(h``init_termios``h]j')}(hj)h]h init_termios}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj)ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj)ubjW)}(hhh]h)}(h?termios to set to each tty initially (e.g. ``tty_std_termios``)h](h+termios to set to each tty initially (e.g. }(hj)hhhNhNubj')}(h``tty_std_termios``h]htty_std_termios}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj)ubh)}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj)hMhj)ubah}(h]h ]h"]h$]h&]uh1jVhj)ubeh}(h]h ]h"]h$]h&]uh1j6hj)hMhjG'ubj7)}(h-``flags`` tty driver flags (``TTY_DRIVER_``) h](j=)}(h ``flags``h]j')}(hj*h]hflags}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj*ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj *ubjW)}(hhh]h)}(h"tty driver flags (``TTY_DRIVER_``)h](htty driver flags (}(hj)*hhhNhNubj')}(h``TTY_DRIVER_``h]h TTY_DRIVER_}(hj1*hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj)*ubh)}(hj)*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj%*hMhj&*ubah}(h]h ]h"]h$]h&]uh1jVhj *ubeh}(h]h ]h"]h$]h&]uh1j6hj%*hMhjG'ubj7)}(h.``proc_entry`` proc fs entry, used internally h](j=)}(h``proc_entry``h]j')}(hj[*h]h proc_entry}(hj]*hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjY*ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjU*ubjW)}(hhh]h)}(hproc fs entry, used internallyh]hproc fs entry, used internally}(hjt*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp*hMhjq*ubah}(h]h ]h"]h$]h&]uh1jVhjU*ubeh}(h]h ]h"]h$]h&]uh1j6hjp*hMhjG'ubj7)}(hA``other`` driver of the linked tty; only used for the PTY driver h](j=)}(h ``other``h]j')}(hj*h]hother}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj*ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj*ubjW)}(hhh]h)}(h6driver of the linked tty; only used for the PTY driverh]h6driver of the linked tty; only used for the PTY driver}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jVhj*ubeh}(h]h ]h"]h$]h&]uh1j6hj*hMhjG'ubj7)}(ha``ttys`` array of active :c:type:`struct tty_struct `, set by tty_standard_install() h](j=)}(h``ttys``h]j')}(hj*h]httys}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj*ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj*ubjW)}(hhh]h)}(hWarray of active :c:type:`struct tty_struct `, set by tty_standard_install()h](harray of active }(hj*hhhNhNubh)}(h(:c:type:`struct tty_struct `h]j')}(hj*h]hstruct tty_struct}(hj*hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj*ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_structuh1hhj*hMhj*ubh, set by tty_standard_install()}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jVhj*ubeh}(h]h ]h"]h$]h&]uh1j6hj*hMhjG'ubj7)}(h``ports`` array of :c:type:`struct tty_port `; can be set during initialization by tty_port_link_device() and similar h](j=)}(h ``ports``h]j')}(hj)+h]hports}(hj++hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj'+ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj#+ubjW)}(hhh]h)}(huarray of :c:type:`struct tty_port `; can be set during initialization by tty_port_link_device() and similarh](h array of }(hjB+hhhNhNubh)}(h$:c:type:`struct tty_port `h]j')}(hjL+h]hstruct tty_port}(hjN+hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hjJ+ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_portuh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjB+ubhH; can be set during initialization by tty_port_link_device() and similar}(hjB+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhji+hMhj?+ubah}(h]h ]h"]h$]h&]uh1jVhj#+ubeh}(h]h ]h"]h$]h&]uh1j6hj>+hMhjG'ubj7)}(hD``termios`` storage for termios at each TTY close for the next open h](j=)}(h ``termios``h]j')}(hj+h]htermios}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj+ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj+ubjW)}(hhh]h)}(h7storage for termios at each TTY close for the next openh]h7storage for termios at each TTY close for the next open}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jVhj+ubeh}(h]h ]h"]h$]h&]uh1j6hj+hMhjG'ubj7)}(h4``driver_state`` pointer to driver's arbitrary data h](j=)}(h``driver_state``h]j')}(hj+h]h driver_state}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj+ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj+ubjW)}(hhh]h)}(h"pointer to driver's arbitrary datah]h$pointer to driver’s arbitrary data}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jVhj+ubeh}(h]h ]h"]h$]h&]uh1j6hj+hMhjG'ubj7)}(h``ops`` driver hooks for TTYs. Set them using tty_set_operations(). Use :c:type:`struct tty_port ` helpers in them as much as possible. h](j=)}(h``ops``h]j')}(hj+h]hops}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj+ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj+ubjW)}(hhh]h)}(hdriver hooks for TTYs. Set them using tty_set_operations(). Use :c:type:`struct tty_port ` helpers in them as much as possible.h](h@driver hooks for TTYs. Set them using tty_set_operations(). Use }(hj,hhhNhNubh)}(h$:c:type:`struct tty_port `h]j')}(hj,h]hstruct tty_port}(hj,hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj,ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_portuh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj,ubh% helpers in them as much as possible.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8,hMhj,ubah}(h]h ]h"]h$]h&]uh1jVhj+ubeh}(h]h ]h"]h$]h&]uh1j6hj ,hMhjG'ubj7)}(h<``tty_drivers`` used internally to link tty_drivers togetherh](j=)}(h``tty_drivers``h]j')}(hjU,h]h tty_drivers}(hjW,hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjS,ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjO,ubjW)}(hhh]h)}(h,used internally to link tty_drivers togetherh]h,used internally to link tty_drivers together}(hjn,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjk,ubah}(h]h ]h"]h$]h&]uh1jVhjO,ubeh}(h]h ]h"]h$]h&]uh1j6hjj,hMhjG'ubeh}(h]h ]h"]h$]h&]uh1j1hj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjT&hhhj&hNubh)}(h**Description**h]j)}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhjT&hhubh)}(hXThe usual handling of :c:type:`struct tty_driver ` is to allocate it by tty_alloc_driver(), set up all the necessary members, and register it by tty_register_driver(). At last, the driver is torn down by calling tty_unregister_driver() followed by tty_driver_kref_put().h](hThe usual handling of }(hj,hhhNhNubh)}(h(:c:type:`struct tty_driver `h]j')}(hj,h]hstruct tty_driver}(hj,hhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj,ubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_driveruh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhMhj,ubh is to allocate it by tty_alloc_driver(), set up all the necessary members, and register it by tty_register_driver(). At last, the driver is torn down by calling tty_unregister_driver() followed by tty_driver_kref_put().}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj,hMhjT&hhubh)}(hThe fields required to be set before calling tty_register_driver() include **driver_name**, **name**, **type**, **subtype**, **init_termios**, and **ops**.h](hKThe fields required to be set before calling tty_register_driver() include }(hj,hhhNhNubj)}(h**driver_name**h]h driver_name}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh, }(hj,hhhNhNubj)}(h**name**h]hname}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh, }hj,sbj)}(h**type**h]htype}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh, }hj,sbj)}(h **subtype**h]hsubtype}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh, }hj,sbj)}(h**init_termios**h]h init_termios}(hj0-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh, and }(hj,hhhNhNubj)}(h**ops**h]hops}(hjB-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:118: ./include/linux/tty_driver.hhM hjT&hhubeh}(h]jah ]h"]tty driver referenceah$]h&]uh1hhhhhhhhKqj\ Kubje )}(h----h]h}(h]h ]h"]h$]h&]uh1jd hhhKyhhhhubh)}(hhh](h)}(hTTY Operations Referenceh]hTTY Operations Reference}(hjo-hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhjl-hhhhhK|ubh)}(hMWhen a TTY is registered, these driver hooks can be invoked by the TTY layer:h]hMWhen a TTY is registered, these driver hooks can be invoked by the TTY layer:}(hj}-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjl-hhubjq)}(hhh]h}(h]h ]h"]h$]h&]entries](j}tty_operations (C struct)c.tty_operationshNtauh1jphjl-hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhNubj)}(hhh](j)}(htty_operationsh]j)}(hstruct tty_operationsh](j)}(hjh]hstruct}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj-hhhj-hKubj)}(htty_operationsh]j)}(hj-h]htty_operations}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj-hhhj-hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj-hhhj-hKubah}(h]j-ah ](jjeh"]h$]h&]jj)jhuh1jhj-hKhj-hhubj)}(hhh]h)}(hhh]h)}(h interface between driver and ttyh]h)}(hj-h]h interface between driver and tty}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKjhj-ubah}(h]h ]h"]h$]h&]uh1hhj-hhhj-hNubah}(h]h ]h"]h$]h&]j j uh1hhj-hKjhj-hhubah}(h]h ]h"]h$]h&]uh1jhj-hhhj-hKubeh}(h]h ](jstructeh"]h$]h&]jjjj.jj.jjjuh1jhhhjl-hj-hNubj)}(hX;**Definition**:: struct tty_operations { struct tty_struct * (*lookup)(struct tty_driver *driver, struct file *filp, int idx); int (*install)(struct tty_driver *driver, struct tty_struct *tty); void (*remove)(struct tty_driver *driver, struct tty_struct *tty); int (*open)(struct tty_struct * tty, struct file * filp); void (*close)(struct tty_struct * tty, struct file * filp); void (*shutdown)(struct tty_struct *tty); void (*cleanup)(struct tty_struct *tty); ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count); int (*put_char)(struct tty_struct *tty, u8 ch); void (*flush_chars)(struct tty_struct *tty); unsigned int (*write_room)(struct tty_struct *tty); unsigned int (*chars_in_buffer)(struct tty_struct *tty); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); long (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); void (*throttle)(struct tty_struct * tty); void (*unthrottle)(struct tty_struct * tty); void (*stop)(struct tty_struct *tty); void (*start)(struct tty_struct *tty); void (*hangup)(struct tty_struct *tty); int (*break_ctl)(struct tty_struct *tty, int state); void (*flush_buffer)(struct tty_struct *tty); int (*ldisc_ok)(struct tty_struct *tty, int ldisc); void (*set_ldisc)(struct tty_struct *tty); void (*wait_until_sent)(struct tty_struct *tty, int timeout); void (*send_xchar)(struct tty_struct *tty, u8 ch); int (*tiocmget)(struct tty_struct *tty); int (*tiocmset)(struct tty_struct *tty, unsigned int set, unsigned int clear); int (*resize)(struct tty_struct *tty, struct winsize *ws); int (*get_icount)(struct tty_struct *tty, struct serial_icounter_struct *icount); int (*get_serial)(struct tty_struct *tty, struct serial_struct *p); int (*set_serial)(struct tty_struct *tty, struct serial_struct *p); void (*show_fdinfo)(struct tty_struct *tty, struct seq_file *m); #ifdef CONFIG_CONSOLE_POLL; int (*poll_init)(struct tty_driver *driver, int line, char *options); int (*poll_get_char)(struct tty_driver *driver, int line); void (*poll_put_char)(struct tty_driver *driver, int line, char ch); #endif; int (*proc_show)(struct seq_file *m, void *driver); }; **Members** ``lookup`` ``struct tty_struct *()(struct tty_driver *self, struct file *, int idx)`` Return the tty device corresponding to **idx**, ``NULL`` if there is not one currently in use and an ``ERR_PTR`` value on error. Called under ``tty_mutex`` (for now!) Optional method. Default behaviour is to use the **self->ttys** array. ``install`` ``int ()(struct tty_driver *self, struct tty_struct *tty)`` Install a new **tty** into the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods. Optional method. Default behaviour is to use the **self->ttys** array. ``remove`` ``void ()(struct tty_driver *self, struct tty_struct *tty)`` Remove a closed **tty** from the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods. Optional method. Default behaviour is to use the **self->ttys** array. ``open`` ``int ()(struct tty_struct *tty, struct file *)`` This routine is called when a particular **tty** device is opened. This routine is mandatory; if this routine is not filled in, the attempted open will fail with ``ENODEV``. Required method. Called with tty lock held. May sleep. ``close`` ``void ()(struct tty_struct *tty, struct file *)`` This routine is called when a particular **tty** device is closed. At the point of return from this call the driver must make no further ldisc calls of any kind. Remark: called even if the corresponding **open\(\)** failed. Required method. Called with tty lock held. May sleep. ``shutdown`` ``void ()(struct tty_struct *tty)`` This routine is called under the tty lock when a particular **tty** device is closed for the last time. It executes before the **tty** resources are freed so may execute while another function holds a **tty** kref. ``cleanup`` ``void ()(struct tty_struct *tty)`` This routine is called asynchronously when a particular **tty** device is closed for the last time freeing up the resources. This is actually the second part of shutdown for routines that might sleep. ``write`` ``ssize_t ()(struct tty_struct *tty, const u8 *buf, size_t count)`` This routine is called by the kernel to write a series (**count**) of characters (**buf**) to the **tty** device. The characters may come from user space or kernel space. This routine will return the number of characters actually accepted for writing. May occur in parallel in special cases. Because this includes panic paths drivers generally shouldn't try and do clever locking here. Optional: Required for writable devices. May not sleep. ``put_char`` ``int ()(struct tty_struct *tty, u8 ch)`` This routine is called by the kernel to write a single character **ch** to the **tty** device. If the kernel uses this routine, it must call the **flush_chars\(\)** routine (if defined) when it is done stuffing characters into the driver. If there is no room in the queue, the character is ignored. Optional: Kernel will use the **write** method if not provided. Do not call this function directly, call tty_put_char(). ``flush_chars`` ``void ()(struct tty_struct *tty)`` This routine is called by the kernel after it has written a series of characters to the tty device using **put_char\(\)**. Optional. Do not call this function directly, call tty_driver_flush_chars(). ``write_room`` ``unsigned int ()(struct tty_struct *tty)`` This routine returns the numbers of characters the **tty** driver will accept for queuing to be written. This number is subject to change as output buffers get emptied, or if the output flow control is acted. The ldisc is responsible for being intelligent about multi-threading of write_room/write calls Required if **write** method is provided else not needed. Do not call this function directly, call tty_write_room() ``chars_in_buffer`` ``unsigned int ()(struct tty_struct *tty)`` This routine returns the number of characters in the device private output queue. Used in tty_wait_until_sent() and for poll() implementation. Optional: if not provided, it is assumed there is no queue on the device. Do not call this function directly, call tty_chars_in_buffer(). ``ioctl`` ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` This routine allows the **tty** driver to implement device-specific ioctls. If the ioctl number passed in **cmd** is not recognized by the driver, it should return ``ENOIOCTLCMD``. Optional. ``compat_ioctl`` ``long ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` Implement ioctl processing for 32 bit process on 64 bit system. Optional. ``set_termios`` ``void ()(struct tty_struct *tty, const struct ktermios *old)`` This routine allows the **tty** driver to be notified when device's termios settings have changed. New settings are in **tty->termios**. Previous settings are passed in the **old** argument. The API is defined such that the driver should return the actual modes selected. This means that the driver is responsible for modifying any bits in **tty->termios** it cannot fulfill to indicate the actual modes being used. Optional. Called under the **tty->termios_rwsem**. May sleep. ``throttle`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be sent to the **tty**. Serialization including with **unthrottle\(\)** is the job of the ldisc layer. Optional: Always invoke via tty_throttle_safe(). Called under the **tty->termios_rwsem**. ``unthrottle`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should signal that characters can now be sent to the **tty** without fear of overrunning the input buffers of the line disciplines. Optional. Always invoke via tty_unthrottle(). Called under the **tty->termios_rwsem**. ``stop`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should stop outputting characters to the tty device. Called with **tty->flow.lock** held. Serialized with **start\(\)** method. Optional. Always invoke via stop_tty(). ``start`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it resumed sending characters to the **tty** device. Called with **tty->flow.lock** held. Serialized with stop() method. Optional. Always invoke via start_tty(). ``hangup`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should hang up the **tty** device. Optional. Called with tty lock held. ``break_ctl`` ``int ()(struct tty_struct *tty, int state)`` This optional routine requests the **tty** driver to turn on or off BREAK status on the RS-232 port. If **state** is -1, then the BREAK status should be turned on; if **state** is 0, then BREAK should be turned off. If this routine is implemented, the high-level tty driver will handle the following ioctls: ``TCSBRK``, ``TCSBRKP``, ``TIOCSBRK``, ``TIOCCBRK``. If the driver sets ``TTY_DRIVER_HARDWARE_BREAK`` in tty_alloc_driver(), then the interface will also be called with actual times and the hardware is expected to do the delay work itself. 0 and -1 are still used for on/off. Optional: Required for ``TCSBRK``/``BRKP``/etc. handling. May sleep. ``flush_buffer`` ``void ()(struct tty_struct *tty)`` This routine discards device private output buffer. Invoked on close, hangup, to implement ``TCOFLUSH`` ioctl and similar. Optional: if not provided, it is assumed there is no queue on the device. Do not call this function directly, call tty_driver_flush_buffer(). ``ldisc_ok`` ``int ()(struct tty_struct *tty, int ldisc)`` This routine allows the **tty** driver to decide if it can deal with a particular **ldisc**. Optional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**. ``set_ldisc`` ``void ()(struct tty_struct *tty)`` This routine allows the **tty** driver to be notified when the device's line discipline is being changed. At the point this is done the discipline is not yet usable. Optional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**. ``wait_until_sent`` ``void ()(struct tty_struct *tty, int timeout)`` This routine waits until the device has written out all of the characters in its transmitter FIFO. Or until **timeout** (in jiffies) is reached. Optional: If not provided, the device is assumed to have no FIFO. Usually correct to invoke via tty_wait_until_sent(). May sleep. ``send_xchar`` ``void ()(struct tty_struct *tty, u8 ch)`` This routine is used to send a high-priority XON/XOFF character (**ch**) to the **tty** device. Optional: If not provided, then the **write** method is called under the **tty->atomic_write_lock** to keep it serialized with the ldisc. ``tiocmget`` ``int ()(struct tty_struct *tty)`` This routine is used to obtain the modem status bits from the **tty** driver. Optional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMGET`` ioctl. Do not call this function directly, call tty_tiocmget(). ``tiocmset`` ``int ()(struct tty_struct *tty, unsigned int set, unsigned int clear)`` This routine is used to set the modem status bits to the **tty** driver. First, **clear** bits should be cleared, then **set** bits set. Optional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMSET`` ioctl. Do not call this function directly, call tty_tiocmset(). ``resize`` ``int ()(struct tty_struct *tty, struct winsize *ws)`` Called when a termios request is issued which changes the requested terminal geometry to **ws**. Optional: the default action is to update the termios structure without error. This is usually the correct behaviour. Drivers should not force errors here if they are not resizable objects (e.g. a serial line). See tty_do_resize() if you need to wrap the standard method in your own logic -- the usual case. ``get_icount`` ``int ()(struct tty_struct *tty, struct serial_icounter *icount)`` Called when the **tty** device receives a ``TIOCGICOUNT`` ioctl. Passed a kernel structure **icount** to complete. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. ``get_serial`` ``int ()(struct tty_struct *tty, struct serial_struct *p)`` Called when the **tty** device receives a ``TIOCGSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to complete. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocgserial(). ``set_serial`` ``int ()(struct tty_struct *tty, struct serial_struct *p)`` Called when the **tty** device receives a ``TIOCSSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to set the values from. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocsserial(). ``show_fdinfo`` ``void ()(struct tty_struct *tty, struct seq_file *m)`` Called when the **tty** device file descriptor receives a fdinfo request from VFS (to show in /proc//fdinfo/). **m** should be filled with information. Optional: called only if provided, otherwise nothing is written to **m**. Do not call this function directly, call tty_show_fdinfo(). ``poll_init`` ``int ()(struct tty_driver *driver, int line, char *options)`` kgdboc support (Documentation/process/debugging/kgdb.rst). This routine is called to initialize the HW for later use by calling **poll_get_char** or **poll_put_char**. Optional: called only if provided, otherwise skipped as a non-polling driver. ``poll_get_char`` ``int ()(struct tty_driver *driver, int line)`` kgdboc support (see **poll_init**). **driver** should read a character from a tty identified by **line** and return it. Optional: called only if **poll_init** provided. ``poll_put_char`` ``void ()(struct tty_driver *driver, int line, char ch)`` kgdboc support (see **poll_init**). **driver** should write character **ch** to a tty identified by **line**. Optional: called only if **poll_init** provided. ``proc_show`` ``int ()(struct seq_file *m, void *driver)`` Driver **driver** (cast to :c:type:`struct tty_driver `) can show additional info in /proc/tty/driver/. It is enough to fill in the information into **m**. Optional: called only if provided, otherwise no /proc entry created.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&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKnhj.ubj')}(hX7 struct tty_operations { struct tty_struct * (*lookup)(struct tty_driver *driver, struct file *filp, int idx); int (*install)(struct tty_driver *driver, struct tty_struct *tty); void (*remove)(struct tty_driver *driver, struct tty_struct *tty); int (*open)(struct tty_struct * tty, struct file * filp); void (*close)(struct tty_struct * tty, struct file * filp); void (*shutdown)(struct tty_struct *tty); void (*cleanup)(struct tty_struct *tty); ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count); int (*put_char)(struct tty_struct *tty, u8 ch); void (*flush_chars)(struct tty_struct *tty); unsigned int (*write_room)(struct tty_struct *tty); unsigned int (*chars_in_buffer)(struct tty_struct *tty); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); long (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); void (*throttle)(struct tty_struct * tty); void (*unthrottle)(struct tty_struct * tty); void (*stop)(struct tty_struct *tty); void (*start)(struct tty_struct *tty); void (*hangup)(struct tty_struct *tty); int (*break_ctl)(struct tty_struct *tty, int state); void (*flush_buffer)(struct tty_struct *tty); int (*ldisc_ok)(struct tty_struct *tty, int ldisc); void (*set_ldisc)(struct tty_struct *tty); void (*wait_until_sent)(struct tty_struct *tty, int timeout); void (*send_xchar)(struct tty_struct *tty, u8 ch); int (*tiocmget)(struct tty_struct *tty); int (*tiocmset)(struct tty_struct *tty, unsigned int set, unsigned int clear); int (*resize)(struct tty_struct *tty, struct winsize *ws); int (*get_icount)(struct tty_struct *tty, struct serial_icounter_struct *icount); int (*get_serial)(struct tty_struct *tty, struct serial_struct *p); int (*set_serial)(struct tty_struct *tty, struct serial_struct *p); void (*show_fdinfo)(struct tty_struct *tty, struct seq_file *m); #ifdef CONFIG_CONSOLE_POLL; int (*poll_init)(struct tty_driver *driver, int line, char *options); int (*poll_get_char)(struct tty_driver *driver, int line); void (*poll_put_char)(struct tty_driver *driver, int line, char ch); #endif; int (*proc_show)(struct seq_file *m, void *driver); };h]hX7 struct tty_operations { struct tty_struct * (*lookup)(struct tty_driver *driver, struct file *filp, int idx); int (*install)(struct tty_driver *driver, struct tty_struct *tty); void (*remove)(struct tty_driver *driver, struct tty_struct *tty); int (*open)(struct tty_struct * tty, struct file * filp); void (*close)(struct tty_struct * tty, struct file * filp); void (*shutdown)(struct tty_struct *tty); void (*cleanup)(struct tty_struct *tty); ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count); int (*put_char)(struct tty_struct *tty, u8 ch); void (*flush_chars)(struct tty_struct *tty); unsigned int (*write_room)(struct tty_struct *tty); unsigned int (*chars_in_buffer)(struct tty_struct *tty); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); long (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); void (*throttle)(struct tty_struct * tty); void (*unthrottle)(struct tty_struct * tty); void (*stop)(struct tty_struct *tty); void (*start)(struct tty_struct *tty); void (*hangup)(struct tty_struct *tty); int (*break_ctl)(struct tty_struct *tty, int state); void (*flush_buffer)(struct tty_struct *tty); int (*ldisc_ok)(struct tty_struct *tty, int ldisc); void (*set_ldisc)(struct tty_struct *tty); void (*wait_until_sent)(struct tty_struct *tty, int timeout); void (*send_xchar)(struct tty_struct *tty, u8 ch); int (*tiocmget)(struct tty_struct *tty); int (*tiocmset)(struct tty_struct *tty, unsigned int set, unsigned int clear); int (*resize)(struct tty_struct *tty, struct winsize *ws); int (*get_icount)(struct tty_struct *tty, struct serial_icounter_struct *icount); int (*get_serial)(struct tty_struct *tty, struct serial_struct *p); int (*set_serial)(struct tty_struct *tty, struct serial_struct *p); void (*show_fdinfo)(struct tty_struct *tty, struct seq_file *m); #ifdef CONFIG_CONSOLE_POLL; int (*poll_init)(struct tty_driver *driver, int line, char *options); int (*poll_get_char)(struct tty_driver *driver, int line); void (*poll_put_char)(struct tty_driver *driver, int line, char ch); #endif; int (*proc_show)(struct seq_file *m, void *driver); };}hj6.sbah}(h]h ]h"]h$]h&]hhuh1j'he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKphj.ubh)}(h **Members**h]j)}(hjG.h]hMembers}(hjI.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE.ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj.ubj2)}(hhh](j7)}(hXZ``lookup`` ``struct tty_struct *()(struct tty_driver *self, struct file *, int idx)`` Return the tty device corresponding to **idx**, ``NULL`` if there is not one currently in use and an ``ERR_PTR`` value on error. Called under ``tty_mutex`` (for now!) Optional method. Default behaviour is to use the **self->ttys** array. h](j=)}(h ``lookup``h]j')}(hjf.h]hlookup}(hjh.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjd.ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKthj`.ubjW)}(hhh](h)}(hJ``struct tty_struct *()(struct tty_driver *self, struct file *, int idx)``h]j')}(hj.h]hFstruct tty_struct *()(struct tty_driver *self, struct file *, int idx)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj.ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKmhj|.ubj)}(hReturn the tty device corresponding to **idx**, ``NULL`` if there is not one currently in use and an ``ERR_PTR`` value on error. Called under ``tty_mutex`` (for now!) Optional method. Default behaviour is to use the **self->ttys** array. h](h)}(hReturn the tty device corresponding to **idx**, ``NULL`` if there is not one currently in use and an ``ERR_PTR`` value on error. Called under ``tty_mutex`` (for now!)h](h'Return the tty device corresponding to }(hj.hhhNhNubj)}(h**idx**h]hidx}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh, }(hj.hhhNhNubj')}(h``NULL``h]hNULL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj.ubh- if there is not one currently in use and an }(hj.hhhNhNubj')}(h ``ERR_PTR``h]hERR_PTR}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj.ubh value on error. Called under }(hj.hhhNhNubj')}(h ``tty_mutex``h]h tty_mutex}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj.ubh (for now!)}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKphj.ubh)}(hFOptional method. Default behaviour is to use the **self->ttys** array.h](h1Optional method. Default behaviour is to use the }(hj.hhhNhNubj)}(h**self->ttys**h]h self->ttys}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh array.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj{.hKthj.ubeh}(h]h ]h"]h$]h&]uh1jhj.hKphj|.ubeh}(h]h ]h"]h$]h&]uh1jVhj`.ubeh}(h]h ]h"]h$]h&]uh1j6hj{.hKthj].ubj7)}(hX``install`` ``int ()(struct tty_driver *self, struct tty_struct *tty)`` Install a new **tty** into the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods. Optional method. Default behaviour is to use the **self->ttys** array. h](j=)}(h ``install``h]j')}(hj*/h]hinstall}(hj,/hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj(/ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhK{hj$/ubjW)}(hhh](h)}(h;``int ()(struct tty_driver *self, struct tty_struct *tty)``h]j')}(hjE/h]h7int ()(struct tty_driver *self, struct tty_struct *tty)}(hjG/hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjC/ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKvhj@/ubh)}(hvInstall a new **tty** into the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods.h](hInstall a new }(hj[/hhhNhNubj)}(h**tty**h]htty}(hjc/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[/ubh into the }(hj[/hhhNhNubj)}(h**self**h]hself}(hju/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[/ubh/’s internal tables. Used in conjunction with }(hj[/hhhNhNubj)}(h **lookup**h]hlookup}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[/ubh and }(hj[/hhhNhNubj)}(h **remove**h]hremove}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[/ubh methods.}(hj[/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKxhj@/ubh)}(hFOptional method. Default behaviour is to use the **self->ttys** array.h](h1Optional method. Default behaviour is to use the }(hj/hhhNhNubj)}(h**self->ttys**h]h self->ttys}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh array.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj?/hK{hj@/ubeh}(h]h ]h"]h$]h&]uh1jVhj$/ubeh}(h]h ]h"]h$]h&]uh1j6hj?/hK{hj].ubj7)}(hX ``remove`` ``void ()(struct tty_driver *self, struct tty_struct *tty)`` Remove a closed **tty** from the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods. Optional method. Default behaviour is to use the **self->ttys** array. h](j=)}(h ``remove``h]j')}(hj/h]hremove}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj/ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj/ubjW)}(hhh](h)}(h<``void ()(struct tty_driver *self, struct tty_struct *tty)``h]j')}(hj/h]h8void ()(struct tty_driver *self, struct tty_struct *tty)}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj/ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhK}hj/ubh)}(hxRemove a closed **tty** from the **self**'s internal tables. Used in conjunction with **lookup** and **remove** methods.h](hRemove a closed }(hj0hhhNhNubj)}(h**tty**h]htty}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh from the }(hj0hhhNhNubj)}(h**self**h]hself}(hj/0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh/’s internal tables. Used in conjunction with }(hj0hhhNhNubj)}(h **lookup**h]hlookup}(hjA0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh and }(hj0hhhNhNubj)}(h **remove**h]hremove}(hjS0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh methods.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj/ubh)}(hFOptional method. Default behaviour is to use the **self->ttys** array.h](h1Optional method. Default behaviour is to use the }(hjl0hhhNhNubj)}(h**self->ttys**h]h self->ttys}(hjt0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl0ubh array.}(hjl0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/hKhj/ubeh}(h]h ]h"]h$]h&]uh1jVhj/ubeh}(h]h ]h"]h$]h&]uh1j6hj/hKhj].ubj7)}(hX"``open`` ``int ()(struct tty_struct *tty, struct file *)`` This routine is called when a particular **tty** device is opened. This routine is mandatory; if this routine is not filled in, the attempted open will fail with ``ENODEV``. Required method. Called with tty lock held. May sleep. h](j=)}(h``open``h]j')}(hj0h]hopen}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj0ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj0ubjW)}(hhh](h)}(h1``int ()(struct tty_struct *tty, struct file *)``h]j')}(hj0h]h-int ()(struct tty_struct *tty, struct file *)}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj0ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj0ubh)}(hThis routine is called when a particular **tty** device is opened. This routine is mandatory; if this routine is not filled in, the attempted open will fail with ``ENODEV``.h](h)This routine is called when a particular }(hj0hhhNhNubj)}(h**tty**h]htty}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubhr device is opened. This routine is mandatory; if this routine is not filled in, the attempted open will fail with }(hj0hhhNhNubj')}(h ``ENODEV``h]hENODEV}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj0ubh.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj0ubh)}(h6Required method. Called with tty lock held. May sleep.h]h6Required method. Called with tty lock held. May sleep.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hKhj0ubeh}(h]h ]h"]h$]h&]uh1jVhj0ubeh}(h]h ]h"]h$]h&]uh1j6hj0hKhj].ubj7)}(hXW``close`` ``void ()(struct tty_struct *tty, struct file *)`` This routine is called when a particular **tty** device is closed. At the point of return from this call the driver must make no further ldisc calls of any kind. Remark: called even if the corresponding **open\(\)** failed. Required method. Called with tty lock held. May sleep. h](j=)}(h ``close``h]j')}(hj"1h]hclose}(hj$1hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj 1ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj1ubjW)}(hhh](h)}(h2``void ()(struct tty_struct *tty, struct file *)``h]j')}(hj=1h]h.void ()(struct tty_struct *tty, struct file *)}(hj?1hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj;1ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj81ubh)}(hThis routine is called when a particular **tty** device is closed. At the point of return from this call the driver must make no further ldisc calls of any kind.h](h)This routine is called when a particular }(hjS1hhhNhNubj)}(h**tty**h]htty}(hj[1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS1ubhq device is closed. At the point of return from this call the driver must make no further ldisc calls of any kind.}(hjS1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj81ubh)}(h=Remark: called even if the corresponding **open\(\)** failed.h](h)Remark: called even if the corresponding }(hjt1hhhNhNubj)}(h **open\(\)**h]hopen()}(hj|1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt1ubh failed.}(hjt1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj81ubh)}(h6Required method. Called with tty lock held. May sleep.h]h6Required method. Called with tty lock held. May sleep.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj71hKhj81ubeh}(h]h ]h"]h$]h&]uh1jVhj1ubeh}(h]h ]h"]h$]h&]uh1j6hj71hKhj].ubj7)}(hX ``shutdown`` ``void ()(struct tty_struct *tty)`` This routine is called under the tty lock when a particular **tty** device is closed for the last time. It executes before the **tty** resources are freed so may execute while another function holds a **tty** kref. h](j=)}(h ``shutdown``h]j')}(hj1h]hshutdown}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj1ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj1ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj1h]hvoid ()(struct tty_struct *tty)}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj1ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj1ubh)}(hThis routine is called under the tty lock when a particular **tty** device is closed for the last time. It executes before the **tty** resources are freed so may execute while another function holds a **tty** kref.h](htermios**. Previous settings are passed in the **old** argument. The API is defined such that the driver should return the actual modes selected. This means that the driver is responsible for modifying any bits in **tty->termios** it cannot fulfill to indicate the actual modes being used. Optional. Called under the **tty->termios_rwsem**. May sleep. h](j=)}(h``set_termios``h]j')}(hja6h]h set_termios}(hjc6hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj_6ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj[6ubjW)}(hhh](h)}(h?``void ()(struct tty_struct *tty, const struct ktermios *old)``h]j')}(hj|6h]h;void ()(struct tty_struct *tty, const struct ktermios *old)}(hj~6hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjz6ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhjw6ubh)}(hThis routine allows the **tty** driver to be notified when device's termios settings have changed. New settings are in **tty->termios**. Previous settings are passed in the **old** argument.h](hThis routine allows the }(hj6hhhNhNubj)}(h**tty**h]htty}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubhZ driver to be notified when device’s termios settings have changed. New settings are in }(hj6hhhNhNubj)}(h**tty->termios**h]h tty->termios}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh&. Previous settings are passed in the }(hj6hhhNhNubj)}(h**old**h]hold}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh argument.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhjw6ubh)}(hThe API is defined such that the driver should return the actual modes selected. This means that the driver is responsible for modifying any bits in **tty->termios** it cannot fulfill to indicate the actual modes being used.h](hThe API is defined such that the driver should return the actual modes selected. This means that the driver is responsible for modifying any bits in }(hj6hhhNhNubj)}(h**tty->termios**h]h tty->termios}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh; it cannot fulfill to indicate the actual modes being used.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhjw6ubh)}(h=Optional. Called under the **tty->termios_rwsem**. May sleep.h](hOptional. Called under the }(hj6hhhNhNubj)}(h**tty->termios_rwsem**h]htty->termios_rwsem}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh . May sleep.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjv6hKhjw6ubeh}(h]h ]h"]h$]h&]uh1jVhj[6ubeh}(h]h ]h"]h$]h&]uh1j6hjv6hKhj].ubj7)}(hX``throttle`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be sent to the **tty**. Serialization including with **unthrottle\(\)** is the job of the ldisc layer. Optional: Always invoke via tty_throttle_safe(). Called under the **tty->termios_rwsem**. h](j=)}(h ``throttle``h]j')}(hj*7h]hthrottle}(hj,7hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj(7ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM hj$7ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hjE7h]hvoid ()(struct tty_struct *tty)}(hjG7hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjC7ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@7ubh)}(hThis routine notifies the **tty** driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be sent to the **tty**.h](hThis routine notifies the }(hj[7hhhNhNubj)}(h**tty**h]htty}(hjc7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[7ubh driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be sent to the }(hj[7hhhNhNubj)}(h**tty**h]htty}(hju7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[7ubh.}(hj[7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@7ubh)}(hNSerialization including with **unthrottle\(\)** is the job of the ldisc layer.h](hSerialization including with }(hj7hhhNhNubj)}(h**unthrottle\(\)**h]hunthrottle()}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh is the job of the ldisc layer.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM hj@7ubh)}(hYOptional: Always invoke via tty_throttle_safe(). Called under the **tty->termios_rwsem**.h](hBOptional: Always invoke via tty_throttle_safe(). Called under the }(hj7hhhNhNubj)}(h**tty->termios_rwsem**h]htty->termios_rwsem}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM hj@7ubeh}(h]h ]h"]h$]h&]uh1jVhj$7ubeh}(h]h ]h"]h$]h&]uh1j6hj?7hM hj].ubj7)}(hXA``unthrottle`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should signal that characters can now be sent to the **tty** without fear of overrunning the input buffers of the line disciplines. Optional. Always invoke via tty_unthrottle(). Called under the **tty->termios_rwsem**. h](j=)}(h``unthrottle``h]j')}(hj7h]h unthrottle}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj7ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj7ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj7h]hvoid ()(struct tty_struct *tty)}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj7ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj7ubh)}(hThis routine notifies the **tty** driver that it should signal that characters can now be sent to the **tty** without fear of overrunning the input buffers of the line disciplines.h](hThis routine notifies the }(hj8hhhNhNubj)}(h**tty**h]htty}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubhE driver that it should signal that characters can now be sent to the }(hj8hhhNhNubj)}(h**tty**h]htty}(hj-8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubhG without fear of overrunning the input buffers of the line disciplines.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj7ubh)}(hVOptional. Always invoke via tty_unthrottle(). Called under the **tty->termios_rwsem**.h](h?Optional. Always invoke via tty_unthrottle(). Called under the }(hjF8hhhNhNubj)}(h**tty->termios_rwsem**h]htty->termios_rwsem}(hjN8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF8ubh.}(hjF8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj7ubeh}(h]h ]h"]h$]h&]uh1jVhj7ubeh}(h]h ]h"]h$]h&]uh1j6hj7hMhj].ubj7)}(hX ``stop`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should stop outputting characters to the tty device. Called with **tty->flow.lock** held. Serialized with **start\(\)** method. Optional. Always invoke via stop_tty(). h](j=)}(h``stop``h]j')}(hjy8h]hstop}(hj{8hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjw8ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjs8ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj8h]hvoid ()(struct tty_struct *tty)}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj8ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj8ubh)}(heThis routine notifies the **tty** driver that it should stop outputting characters to the tty device.h](hThis routine notifies the }(hj8hhhNhNubj)}(h**tty**h]htty}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubhD driver that it should stop outputting characters to the tty device.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj8ubh)}(hJCalled with **tty->flow.lock** held. Serialized with **start\(\)** method.h](h Called with }(hj8hhhNhNubj)}(h**tty->flow.lock**h]htty->flow.lock}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh held. Serialized with }(hj8hhhNhNubj)}(h **start\(\)**h]h start()}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh method.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj8ubh)}(h'Optional. Always invoke via stop_tty().h]h'Optional. Always invoke via stop_tty().}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubeh}(h]h ]h"]h$]h&]uh1jVhjs8ubeh}(h]h ]h"]h$]h&]uh1j6hj8hMhj].ubj7)}(hX``start`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it resumed sending characters to the **tty** device. Called with **tty->flow.lock** held. Serialized with stop() method. Optional. Always invoke via start_tty(). h](j=)}(h ``start``h]j')}(hj9h]hstart}(hj 9hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj9ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM(hj9ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj99h]hvoid ()(struct tty_struct *tty)}(hj;9hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj79ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM!hj49ubh)}(hbThis routine notifies the **tty** driver that it resumed sending characters to the **tty** device.h](hThis routine notifies the }(hjO9hhhNhNubj)}(h**tty**h]htty}(hjW9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO9ubh2 driver that it resumed sending characters to the }(hjO9hhhNhNubj)}(h**tty**h]htty}(hji9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO9ubh device.}(hjO9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM#hj49ubh)}(hCCalled with **tty->flow.lock** held. Serialized with stop() method.h](h Called with }(hj9hhhNhNubj)}(h**tty->flow.lock**h]htty->flow.lock}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh% held. Serialized with stop() method.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM&hj49ubh)}(h(Optional. Always invoke via start_tty().h]h(Optional. Always invoke via start_tty().}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj39hM(hj49ubeh}(h]h ]h"]h$]h&]uh1jVhj9ubeh}(h]h ]h"]h$]h&]uh1j6hj39hM(hj].ubj7)}(h``hangup`` ``void ()(struct tty_struct *tty)`` This routine notifies the **tty** driver that it should hang up the **tty** device. Optional. Called with tty lock held. h](j=)}(h ``hangup``h]j')}(hj9h]hhangup}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj9ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM/hj9ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj9h]hvoid ()(struct tty_struct *tty)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj9ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM*hj9ubh)}(hSThis routine notifies the **tty** driver that it should hang up the **tty** device.h](hThis routine notifies the }(hj9hhhNhNubj)}(h**tty**h]htty}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh# driver that it should hang up the }(hj9hhhNhNubj)}(h**tty**h]htty}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh device.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM,hj9ubh)}(h$Optional. Called with tty lock held.h]h$Optional. Called with tty lock held.}(hj':hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hM/hj9ubeh}(h]h ]h"]h$]h&]uh1jVhj9ubeh}(h]h ]h"]h$]h&]uh1j6hj9hM/hj].ubj7)}(hX``break_ctl`` ``int ()(struct tty_struct *tty, int state)`` This optional routine requests the **tty** driver to turn on or off BREAK status on the RS-232 port. If **state** is -1, then the BREAK status should be turned on; if **state** is 0, then BREAK should be turned off. If this routine is implemented, the high-level tty driver will handle the following ioctls: ``TCSBRK``, ``TCSBRKP``, ``TIOCSBRK``, ``TIOCCBRK``. If the driver sets ``TTY_DRIVER_HARDWARE_BREAK`` in tty_alloc_driver(), then the interface will also be called with actual times and the hardware is expected to do the delay work itself. 0 and -1 are still used for on/off. Optional: Required for ``TCSBRK``/``BRKP``/etc. handling. May sleep. h](j=)}(h ``break_ctl``h]j')}(hjG:h]h break_ctl}(hjI:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjE:ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM?hjA:ubjW)}(hhh](h)}(h-``int ()(struct tty_struct *tty, int state)``h]j')}(hjb:h]h)int ()(struct tty_struct *tty, int state)}(hjd:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj`:ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM1hj]:ubh)}(hThis optional routine requests the **tty** driver to turn on or off BREAK status on the RS-232 port. If **state** is -1, then the BREAK status should be turned on; if **state** is 0, then BREAK should be turned off.h](h#This optional routine requests the }(hjx:hhhNhNubj)}(h**tty**h]htty}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx:ubh> driver to turn on or off BREAK status on the RS-232 port. If }(hjx:hhhNhNubj)}(h **state**h]hstate}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx:ubh6 is -1, then the BREAK status should be turned on; if }(hjx:hhhNhNubj)}(h **state**h]hstate}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx:ubh' is 0, then BREAK should be turned off.}(hjx:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM3hj]:ubh)}(hIf this routine is implemented, the high-level tty driver will handle the following ioctls: ``TCSBRK``, ``TCSBRKP``, ``TIOCSBRK``, ``TIOCCBRK``.h](h\If this routine is implemented, the high-level tty driver will handle the following ioctls: }(hj:hhhNhNubj')}(h ``TCSBRK``h]hTCSBRK}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj:ubh, }(hj:hhhNhNubj')}(h ``TCSBRKP``h]hTCSBRKP}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj:ubh, }hj:sbj')}(h ``TIOCSBRK``h]hTIOCSBRK}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj:ubh, }hj:sbj')}(h ``TIOCCBRK``h]hTIOCCBRK}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj:ubh.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM7hj]:ubh)}(hIf the driver sets ``TTY_DRIVER_HARDWARE_BREAK`` in tty_alloc_driver(), then the interface will also be called with actual times and the hardware is expected to do the delay work itself. 0 and -1 are still used for on/off.h](hIf the driver sets }(hj;hhhNhNubj')}(h``TTY_DRIVER_HARDWARE_BREAK``h]hTTY_DRIVER_HARDWARE_BREAK}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj;ubh in tty_alloc_driver(), then the interface will also be called with actual times and the hardware is expected to do the delay work itself. 0 and -1 are still used for on/off.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM:hj]:ubh)}(hDOptional: Required for ``TCSBRK``/``BRKP``/etc. handling. May sleep.h](hOptional: Required for }(hj5;hhhNhNubj')}(h ``TCSBRK``h]hTCSBRK}(hj=;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj5;ubh/}(hj5;hhhNhNubj')}(h``BRKP``h]hBRKP}(hjO;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj5;ubh/etc. handling. May sleep.}(hj5;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj\:hM?hj]:ubeh}(h]h ]h"]h$]h&]uh1jVhjA:ubeh}(h]h ]h"]h$]h&]uh1j6hj\:hM?hj].ubj7)}(hX@``flush_buffer`` ``void ()(struct tty_struct *tty)`` This routine discards device private output buffer. Invoked on close, hangup, to implement ``TCOFLUSH`` ioctl and similar. Optional: if not provided, it is assumed there is no queue on the device. Do not call this function directly, call tty_driver_flush_buffer(). h](j=)}(h``flush_buffer``h]j')}(hjy;h]h flush_buffer}(hj{;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjw;ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMHhjs;ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj;h]hvoid ()(struct tty_struct *tty)}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj;ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMAhj;ubh)}(hzThis routine discards device private output buffer. Invoked on close, hangup, to implement ``TCOFLUSH`` ioctl and similar.h](h[This routine discards device private output buffer. Invoked on close, hangup, to implement }(hj;hhhNhNubj')}(h ``TCOFLUSH``h]hTCOFLUSH}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj;ubh ioctl and similar.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMChj;ubh)}(hOptional: if not provided, it is assumed there is no queue on the device. Do not call this function directly, call tty_driver_flush_buffer().h]hOptional: if not provided, it is assumed there is no queue on the device. Do not call this function directly, call tty_driver_flush_buffer().}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMFhj;ubeh}(h]h ]h"]h$]h&]uh1jVhjs;ubeh}(h]h ]h"]h$]h&]uh1j6hj;hMHhj].ubj7)}(h``ldisc_ok`` ``int ()(struct tty_struct *tty, int ldisc)`` This routine allows the **tty** driver to decide if it can deal with a particular **ldisc**. Optional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**. h](j=)}(h ``ldisc_ok``h]j')}(hj;h]hldisc_ok}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj;ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj;ubjW)}(hhh](h)}(h-``int ()(struct tty_struct *tty, int ldisc)``h]j')}(hj<h]h)int ()(struct tty_struct *tty, int ldisc)}(hj <hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj<ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj<ubh)}(h\This routine allows the **tty** driver to decide if it can deal with a particular **ldisc**.h](hThis routine allows the }(hj<hhhNhNubj)}(h**tty**h]htty}(hj%<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh3 driver to decide if it can deal with a particular }(hj<hhhNhNubj)}(h **ldisc**h]hldisc}(hj7<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj<ubh)}(hIOptional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**.h](hOptional. Called under the }(hjP<hhhNhNubj)}(h**tty->ldisc_sem**h]htty->ldisc_sem}(hjX<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP<ubh and }(hjP<hhhNhNubj)}(h**tty->termios_rwsem**h]htty->termios_rwsem}(hjj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP<ubh.}(hjP<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj<hKhj<ubeh}(h]h ]h"]h$]h&]uh1jVhj;ubeh}(h]h ]h"]h$]h&]uh1j6hj<hKhj].ubj7)}(hX$``set_ldisc`` ``void ()(struct tty_struct *tty)`` This routine allows the **tty** driver to be notified when the device's line discipline is being changed. At the point this is done the discipline is not yet usable. Optional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**. h](j=)}(h ``set_ldisc``h]j')}(hj<h]h set_ldisc}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj<ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj<ubjW)}(hhh](h)}(h#``void ()(struct tty_struct *tty)``h]j')}(hj<h]hvoid ()(struct tty_struct *tty)}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj<ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj<ubh)}(hThis routine allows the **tty** driver to be notified when the device's line discipline is being changed. At the point this is done the discipline is not yet usable.h](hThis routine allows the }(hj<hhhNhNubj)}(h**tty**h]htty}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh driver to be notified when the device’s line discipline is being changed. At the point this is done the discipline is not yet usable.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhKhj<ubh)}(hIOptional. Called under the **tty->ldisc_sem** and **tty->termios_rwsem**.h](hOptional. Called under the }(hj<hhhNhNubj)}(h**tty->ldisc_sem**h]htty->ldisc_sem}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh and }(hj<hhhNhNubj)}(h**tty->termios_rwsem**h]htty->termios_rwsem}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj<hMhj<ubeh}(h]h ]h"]h$]h&]uh1jVhj<ubeh}(h]h ]h"]h$]h&]uh1j6hj<hMhj].ubj7)}(hXZ``wait_until_sent`` ``void ()(struct tty_struct *tty, int timeout)`` This routine waits until the device has written out all of the characters in its transmitter FIFO. Or until **timeout** (in jiffies) is reached. Optional: If not provided, the device is assumed to have no FIFO. Usually correct to invoke via tty_wait_until_sent(). May sleep. h](j=)}(h``wait_until_sent``h]j')}(hj*=h]hwait_until_sent}(hj,=hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj(=ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMQhj$=ubjW)}(hhh](h)}(h0``void ()(struct tty_struct *tty, int timeout)``h]j')}(hjE=h]h,void ()(struct tty_struct *tty, int timeout)}(hjG=hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjC=ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMJhj@=ubh)}(hThis routine waits until the device has written out all of the characters in its transmitter FIFO. Or until **timeout** (in jiffies) is reached.h](hlThis routine waits until the device has written out all of the characters in its transmitter FIFO. Or until }(hj[=hhhNhNubj)}(h **timeout**h]htimeout}(hjc=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[=ubh (in jiffies) is reached.}(hj[=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMLhj@=ubh)}(hOptional: If not provided, the device is assumed to have no FIFO. Usually correct to invoke via tty_wait_until_sent(). May sleep.h]hOptional: If not provided, the device is assumed to have no FIFO. Usually correct to invoke via tty_wait_until_sent(). May sleep.}(hj|=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMPhj@=ubeh}(h]h ]h"]h$]h&]uh1jVhj$=ubeh}(h]h ]h"]h$]h&]uh1j6hj?=hMQhj].ubj7)}(hX&``send_xchar`` ``void ()(struct tty_struct *tty, u8 ch)`` This routine is used to send a high-priority XON/XOFF character (**ch**) to the **tty** device. Optional: If not provided, then the **write** method is called under the **tty->atomic_write_lock** to keep it serialized with the ldisc. h](j=)}(h``send_xchar``h]j')}(hj=h]h send_xchar}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj=ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMYhj=ubjW)}(hhh](h)}(h*``void ()(struct tty_struct *tty, u8 ch)``h]j')}(hj=h]h&void ()(struct tty_struct *tty, u8 ch)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj=ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMShj=ubh)}(h_This routine is used to send a high-priority XON/XOFF character (**ch**) to the **tty** device.h](hAThis routine is used to send a high-priority XON/XOFF character (}(hj=hhhNhNubj)}(h**ch**h]hch}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh ) to the }(hj=hhhNhNubj)}(h**tty**h]htty}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh device.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMUhj=ubh)}(hOptional: If not provided, then the **write** method is called under the **tty->atomic_write_lock** to keep it serialized with the ldisc.h](h$Optional: If not provided, then the }(hj>hhhNhNubj)}(h **write**h]hwrite}(hj >hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh method is called under the }(hj>hhhNhNubj)}(h**tty->atomic_write_lock**h]htty->atomic_write_lock}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh& to keep it serialized with the ldisc.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMXhj=ubeh}(h]h ]h"]h$]h&]uh1jVhj=ubeh}(h]h ]h"]h$]h&]uh1j6hj=hMYhj].ubj7)}(hX ``tiocmget`` ``int ()(struct tty_struct *tty)`` This routine is used to obtain the modem status bits from the **tty** driver. Optional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMGET`` ioctl. Do not call this function directly, call tty_tiocmget(). h](j=)}(h ``tiocmget``h]j')}(hjF>h]htiocmget}(hjH>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjD>ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMahj@>ubjW)}(hhh](h)}(h"``int ()(struct tty_struct *tty)``h]j')}(hja>h]hint ()(struct tty_struct *tty)}(hjc>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj_>ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM[hj\>ubh)}(hMThis routine is used to obtain the modem status bits from the **tty** driver.h](h>This routine is used to obtain the modem status bits from the }(hjw>hhhNhNubj)}(h**tty**h]htty}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw>ubh driver.}(hjw>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM]hj\>ubh)}(hOptional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMGET`` ioctl. Do not call this function directly, call tty_tiocmget().h](h Optional: If not provided, then }(hj>hhhNhNubj')}(h ``ENOTTY``h]hENOTTY}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj>ubh is returned from the }(hj>hhhNhNubj')}(h ``TIOCMGET``h]hTIOCMGET}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj>ubh@ ioctl. Do not call this function directly, call tty_tiocmget().}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM`hj\>ubeh}(h]h ]h"]h$]h&]uh1jVhj@>ubeh}(h]h ]h"]h$]h&]uh1j6hj[>hMahj].ubj7)}(hX``tiocmset`` ``int ()(struct tty_struct *tty, unsigned int set, unsigned int clear)`` This routine is used to set the modem status bits to the **tty** driver. First, **clear** bits should be cleared, then **set** bits set. Optional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMSET`` ioctl. Do not call this function directly, call tty_tiocmset(). h](j=)}(h ``tiocmset``h]j')}(hj>h]htiocmset}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj>ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMjhj>ubjW)}(hhh](h)}(hH``int ()(struct tty_struct *tty, unsigned int set, unsigned int clear)``h]j')}(hj>h]hDint ()(struct tty_struct *tty, unsigned int set, unsigned int clear)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj>ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMchj>ubj)}(hXThis routine is used to set the modem status bits to the **tty** driver. First, **clear** bits should be cleared, then **set** bits set. Optional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMSET`` ioctl. Do not call this function directly, call tty_tiocmset(). h](h)}(hThis routine is used to set the modem status bits to the **tty** driver. First, **clear** bits should be cleared, then **set** bits set.h](h9This routine is used to set the modem status bits to the }(hj?hhhNhNubj)}(h**tty**h]htty}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh driver. First, }(hj?hhhNhNubj)}(h **clear**h]hclear}(hj,?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh bits should be cleared, then }(hj?hhhNhNubj)}(h**set**h]hset}(hj>?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh bits set.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMfhj?ubh)}(hOptional: If not provided, then ``ENOTTY`` is returned from the ``TIOCMSET`` ioctl. Do not call this function directly, call tty_tiocmset().h](h Optional: If not provided, then }(hjW?hhhNhNubj')}(h ``ENOTTY``h]hENOTTY}(hj_?hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjW?ubh is returned from the }(hjW?hhhNhNubj')}(h ``TIOCMSET``h]hTIOCMSET}(hjq?hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjW?ubh@ ioctl. Do not call this function directly, call tty_tiocmset().}(hjW?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMihj?ubeh}(h]h ]h"]h$]h&]uh1jhjV?hMfhj>ubeh}(h]h ]h"]h$]h&]uh1jVhj>ubeh}(h]h ]h"]h$]h&]uh1j6hj>hMjhj].ubj7)}(hX``resize`` ``int ()(struct tty_struct *tty, struct winsize *ws)`` Called when a termios request is issued which changes the requested terminal geometry to **ws**. Optional: the default action is to update the termios structure without error. This is usually the correct behaviour. Drivers should not force errors here if they are not resizable objects (e.g. a serial line). See tty_do_resize() if you need to wrap the standard method in your own logic -- the usual case. h](j=)}(h ``resize``h]j')}(hj?h]hresize}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj?ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMuhj?ubjW)}(hhh](h)}(h6``int ()(struct tty_struct *tty, struct winsize *ws)``h]j')}(hj?h]h2int ()(struct tty_struct *tty, struct winsize *ws)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj?ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMlhj?ubh)}(h`Called when a termios request is issued which changes the requested terminal geometry to **ws**.h](hYCalled when a termios request is issued which changes the requested terminal geometry to }(hj?hhhNhNubj)}(h**ws**h]hws}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMnhj?ubh)}(hX3Optional: the default action is to update the termios structure without error. This is usually the correct behaviour. Drivers should not force errors here if they are not resizable objects (e.g. a serial line). See tty_do_resize() if you need to wrap the standard method in your own logic -- the usual case.h]hX3Optional: the default action is to update the termios structure without error. This is usually the correct behaviour. Drivers should not force errors here if they are not resizable objects (e.g. a serial line). See tty_do_resize() if you need to wrap the standard method in your own logic -- the usual case.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMqhj?ubeh}(h]h ]h"]h$]h&]uh1jVhj?ubeh}(h]h ]h"]h$]h&]uh1j6hj?hMuhj].ubj7)}(hX ``get_icount`` ``int ()(struct tty_struct *tty, struct serial_icounter *icount)`` Called when the **tty** device receives a ``TIOCGICOUNT`` ioctl. Passed a kernel structure **icount** to complete. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. h](j=)}(h``get_icount``h]j')}(hj@h]h get_icount}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj@ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhM}hj@ubjW)}(hhh](h)}(hB``int ()(struct tty_struct *tty, struct serial_icounter *icount)``h]j')}(hj0@h]h>int ()(struct tty_struct *tty, struct serial_icounter *icount)}(hj2@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj.@ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMwhj+@ubj)}(hCalled when the **tty** device receives a ``TIOCGICOUNT`` ioctl. Passed a kernel structure **icount** to complete. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. h](h)}(hrCalled when the **tty** device receives a ``TIOCGICOUNT`` ioctl. Passed a kernel structure **icount** to complete.h](hCalled when the }(hjJ@hhhNhNubj)}(h**tty**h]htty}(hjR@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ@ubh device receives a }(hjJ@hhhNhNubj')}(h``TIOCGICOUNT``h]h TIOCGICOUNT}(hjd@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjJ@ubh" ioctl. Passed a kernel structure }(hjJ@hhhNhNubj)}(h **icount**h]hicount}(hjv@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ@ubh to complete.}(hjJ@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMzhjF@ubh)}(hIOptional: called only if provided, otherwise ``ENOTTY`` will be returned.h](h-Optional: called only if provided, otherwise }(hj@hhhNhNubj')}(h ``ENOTTY``h]hENOTTY}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj@ubh will be returned.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*@hM}hjF@ubeh}(h]h ]h"]h$]h&]uh1jhj@hMzhj+@ubeh}(h]h ]h"]h$]h&]uh1jVhj@ubeh}(h]h ]h"]h$]h&]uh1j6hj*@hM}hj].ubj7)}(hXr``get_serial`` ``int ()(struct tty_struct *tty, struct serial_struct *p)`` Called when the **tty** device receives a ``TIOCGSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to complete. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocgserial(). h](j=)}(h``get_serial``h]j')}(hj@h]h get_serial}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj@ubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@ubjW)}(hhh](h)}(h;``int ()(struct tty_struct *tty, struct serial_struct *p)``h]j')}(hj@h]h7int ()(struct tty_struct *tty, struct serial_struct *p)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj@ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@ubh)}(hCalled when the **tty** device receives a ``TIOCGSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to complete.h](hCalled when the }(hj@hhhNhNubj)}(h**tty**h]htty}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh device receives a }(hj@hhhNhNubj')}(h``TIOCGSERIAL``h]h TIOCGSERIAL}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj@ubh" ioctl. Passed a kernel structure }(hj@hhhNhNubj)}(h**p**h]hp}(hj$AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh (}(hj@hhhNhNubh)}(h.:c:type:`struct serial_struct `h]j')}(hj8Ah]hstruct serial_struct}(hj:AhhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj6Aubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ serial_structuh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@ubh) to complete.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUAhMhj@ubh)}(hOptional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocgserial().h](h-Optional: called only if provided, otherwise }(hj`AhhhNhNubj')}(h ``ENOTTY``h]hENOTTY}(hjhAhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj`AubhN will be returned. Do not call this function directly, call tty_tiocgserial().}(hj`AhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj@ubeh}(h]h ]h"]h$]h&]uh1jVhj@ubeh}(h]h ]h"]h$]h&]uh1j6hj@hMhj].ubj7)}(hX}``set_serial`` ``int ()(struct tty_struct *tty, struct serial_struct *p)`` Called when the **tty** device receives a ``TIOCSSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to set the values from. Optional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocsserial(). h](j=)}(h``set_serial``h]j')}(hjAh]h set_serial}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjAubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjAubjW)}(hhh](h)}(h;``int ()(struct tty_struct *tty, struct serial_struct *p)``h]j')}(hjAh]h7int ()(struct tty_struct *tty, struct serial_struct *p)}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjAubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjAubh)}(hCalled when the **tty** device receives a ``TIOCSSERIAL`` ioctl. Passed a kernel structure **p** (:c:type:`struct serial_struct `) to set the values from.h](hCalled when the }(hjAhhhNhNubj)}(h**tty**h]htty}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh device receives a }(hjAhhhNhNubj')}(h``TIOCSSERIAL``h]h TIOCSSERIAL}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjAubh" ioctl. Passed a kernel structure }(hjAhhhNhNubj)}(h**p**h]hp}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh (}(hjAhhhNhNubh)}(h.:c:type:`struct serial_struct `h]j')}(hjBh]hstruct serial_struct}(hjBhhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hjBubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ serial_structuh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjAubh) to set the values from.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj!BhMhjAubh)}(hOptional: called only if provided, otherwise ``ENOTTY`` will be returned. Do not call this function directly, call tty_tiocsserial().h](h-Optional: called only if provided, otherwise }(hj,BhhhNhNubj')}(h ``ENOTTY``h]hENOTTY}(hj4BhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj,BubhN will be returned. Do not call this function directly, call tty_tiocsserial().}(hj,BhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjAubeh}(h]h ]h"]h$]h&]uh1jVhjAubeh}(h]h ]h"]h$]h&]uh1j6hjAhMhj].ubj7)}(hXm``show_fdinfo`` ``void ()(struct tty_struct *tty, struct seq_file *m)`` Called when the **tty** device file descriptor receives a fdinfo request from VFS (to show in /proc//fdinfo/). **m** should be filled with information. Optional: called only if provided, otherwise nothing is written to **m**. Do not call this function directly, call tty_show_fdinfo(). h](j=)}(h``show_fdinfo``h]j')}(hj_Bh]h show_fdinfo}(hjaBhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj]Bubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjYBubjW)}(hhh](h)}(h7``void ()(struct tty_struct *tty, struct seq_file *m)``h]j')}(hjzBh]h3void ()(struct tty_struct *tty, struct seq_file *m)}(hj|BhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjxBubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjuBubh)}(hCalled when the **tty** device file descriptor receives a fdinfo request from VFS (to show in /proc//fdinfo/). **m** should be filled with information.h](hCalled when the }(hjBhhhNhNubj)}(h**tty**h]htty}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh] device file descriptor receives a fdinfo request from VFS (to show in /proc//fdinfo/). }(hjBhhhNhNubj)}(h**m**h]hm}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh# should be filled with information.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjuBubh)}(hOptional: called only if provided, otherwise nothing is written to **m**. Do not call this function directly, call tty_show_fdinfo().h](hCOptional: called only if provided, otherwise nothing is written to }(hjBhhhNhNubj)}(h**m**h]hm}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh=. Do not call this function directly, call tty_show_fdinfo().}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjuBubeh}(h]h ]h"]h$]h&]uh1jVhjYBubeh}(h]h ]h"]h$]h&]uh1j6hjtBhMhj].ubj7)}(hXE``poll_init`` ``int ()(struct tty_driver *driver, int line, char *options)`` kgdboc support (Documentation/process/debugging/kgdb.rst). This routine is called to initialize the HW for later use by calling **poll_get_char** or **poll_put_char**. Optional: called only if provided, otherwise skipped as a non-polling driver. h](j=)}(h ``poll_init``h]j')}(hjBh]h poll_init}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjBubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjBubjW)}(hhh](h)}(h>``int ()(struct tty_driver *driver, int line, char *options)``h]j')}(hjCh]h:int ()(struct tty_driver *driver, int line, char *options)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjCubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj Cubh)}(hkgdboc support (Documentation/process/debugging/kgdb.rst). This routine is called to initialize the HW for later use by calling **poll_get_char** or **poll_put_char**.h](hkgdboc support (Documentation/process/debugging/kgdb.rst). This routine is called to initialize the HW for later use by calling }(hj'ChhhNhNubj)}(h**poll_get_char**h]h poll_get_char}(hj/ChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'Cubh or }(hj'ChhhNhNubj)}(h**poll_put_char**h]h poll_put_char}(hjAChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'Cubh.}(hj'ChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj Cubh)}(hMOptional: called only if provided, otherwise skipped as a non-polling driver.h]hMOptional: called only if provided, otherwise skipped as a non-polling driver.}(hjZChhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhj Cubeh}(h]h ]h"]h$]h&]uh1jVhjBubeh}(h]h ]h"]h$]h&]uh1j6hj ChMhj].ubj7)}(h``poll_get_char`` ``int ()(struct tty_driver *driver, int line)`` kgdboc support (see **poll_init**). **driver** should read a character from a tty identified by **line** and return it. Optional: called only if **poll_init** provided. h](j=)}(h``poll_get_char``h]j')}(hj{Ch]h poll_get_char}(hj}ChhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjyCubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjuCubjW)}(hhh](h)}(h/``int ()(struct tty_driver *driver, int line)``h]j')}(hjCh]h+int ()(struct tty_driver *driver, int line)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjCubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjCubh)}(hwkgdboc support (see **poll_init**). **driver** should read a character from a tty identified by **line** and return it.h](hkgdboc support (see }(hjChhhNhNubj)}(h **poll_init**h]h poll_init}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh). }(hjChhhNhNubj)}(h **driver**h]hdriver}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh2 should read a character from a tty identified by }(hjChhhNhNubj)}(h**line**h]hline}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh and return it.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjCubh)}(h0Optional: called only if **poll_init** provided.h](hOptional: called only if #}(hjChhhNhNubj)}(h **poll_init**h]h poll_init}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh provided.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjChMhjCubeh}(h]h ]h"]h$]h&]uh1jVhjuCubeh}(h]h ]h"]h$]h&]uh1j6hjChMhj].ubj7)}(h``poll_put_char`` ``void ()(struct tty_driver *driver, int line, char ch)`` kgdboc support (see **poll_init**). **driver** should write character **ch** to a tty identified by **line**. Optional: called only if **poll_init** provided. h](j=)}(h``poll_put_char``h]j')}(hj#Dh]h poll_put_char}(hj%DhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj!Dubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjDubjW)}(hhh](h)}(h9``void ()(struct tty_driver *driver, int line, char ch)``h]j')}(hj>Dh]h5void ()(struct tty_driver *driver, int line, char ch)}(hj@DhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj`) can show additional info in /proc/tty/driver/. It is enough to fill in the information into **m**. Optional: called only if provided, otherwise no /proc entry created.h](j=)}(h ``proc_show``h]j')}(hjDh]h proc_show}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjDubah}(h]h ]h"]h$]h&]uh1j<he/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjDubjW)}(hhh](h)}(h,``int ()(struct seq_file *m, void *driver)``h]j')}(hjDh]h(int ()(struct seq_file *m, void *driver)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjDubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjDubh)}(hDriver **driver** (cast to :c:type:`struct tty_driver `) can show additional info in /proc/tty/driver/. It is enough to fill in the information into **m**.h](hDriver }(hjEhhhNhNubj)}(h **driver**h]hdriver}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh (cast to }(hjEhhhNhNubh)}(h(:c:type:`struct tty_driver `h]j')}(hj*Eh]hstruct tty_driver}(hj,EhhhNhNubah}(h]h ](jI jc-typeeh"]h$]h&]uh1j&hj(Eubah}(h]h ]h"]h$]h&]refdocjU refdomainjreftypetype refexplicitrefwarnj;j[ j^ tty_driveruh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjEubhk) can show additional info in /proc/tty/driver/. It is enough to fill in the information into }(hjEhhhNhNubj)}(h**m**h]hm}(hjLEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGEhMhjDubh)}(hDOptional: called only if provided, otherwise no /proc entry created.h]hDOptional: called only if provided, otherwise no /proc entry created.}(hjdEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjDubeh}(h]h ]h"]h$]h&]uh1jVhjDubeh}(h]h ]h"]h$]h&]uh1j6hjDhMhj].ubeh}(h]h ]h"]h$]h&]uh1j1hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjl-hhhj-hNubh)}(h**Description**h]j)}(hjEh]h Description}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjl-hhubh)}(hThis structure defines the interface between the low-level tty driver and the tty routines. These routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a ``NULL`` pointer.h](hThis structure defines the interface between the low-level tty driver and the tty routines. These routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a }(hjEhhhNhNubj')}(h``NULL``h]hNULL}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjEubh pointer.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_driver:128: ./include/linux/tty_driver.hhMhjl-hhubeh}(h]jah ]h"]tty operations referenceah$]h&]uh1hhhhhhhhK|j\ Kubeh}(h]tty-driver-and-tty-operationsah ]h"]tty driver and tty operationsah$]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_handlerjEerror_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 driver reference]jatty driver flags]j:aregistering devices]j alinking devices to ports]j<atty operations reference]jaurefids}nameids}(jEjEjjja hjY j jG&j;jBjZj@&j|j_-jjEju nametypes}(jEjja jY jG&jBj@&j_-jEuh}(jEhjhhjjjjjjjj jtjjj;jp j j jVj[jZjjjjjjLjQj|jOjjjjj\!ja!jjT&j&j&jjl-j-j-hhjhj5j,jTjKjvjmjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jFKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.