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/miscellaneousmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/driver-api/miscellaneousmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/driver-api/miscellaneousmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/driver-api/miscellaneousmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/driver-api/miscellaneousmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/driver-api/miscellaneousmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hParallel Port Devicesh]hParallel Port Devices}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous.rsthKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single!parport_register_driver (C macro)c.parport_register_driverhNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hparport_register_driverh]hdesc_signature_line)}(hparport_register_driverh]h desc_name)}(hparport_register_driverh]h desc_sig_name)}(hhh]hparport_register_driver}(hhhhhNhNubah}(h]h ]nah"]h$]h&]uh1hhhubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1hhhhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM&ubah}(h]h ]h"]h$]h&]hh add_permalinkuh1hӌsphinx_line_type declaratorhhhhhhhM&ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhhhM&hhhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhhhhhhhM&ubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1hhhhhhNhNubh paragraph)}(h$``parport_register_driver (driver)``h]hliteral)}(hj+h]h parport_register_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/miscellaneous:4: ./include/linux/parport.hhM(hhhhubh block_quote)}(h'register a parallel port device driver h]j()}(h®ister a parallel port device driverh]h®ister a parallel port device driver}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM&hjEubah}(h]h ]h"]h$]h&]uh1jChjWhM&hhhhubh container)}(hXj**Parameters** ``driver`` structure describing the driver **Description** This can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available. The **driver** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver(). If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you. The driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Returns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h](j()}(h**Parameters**h]hstrong)}(hjfh]h Parameters}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM*hj`ubhdefinition_list)}(hhh]hdefinition_list_item)}(h+``driver`` structure describing the driver h](hterm)}(h ``driver``h]j.)}(hjh]hdriver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM'hjubh definition)}(hhh]j()}(hstructure describing the driverh]hstructure describing the driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhM'hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM'hjubah}(h]h ]h"]h$]h&]uh1j~hj`ubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM)hj`ubjD)}(hXThis can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available. The **driver** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver(). If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you. The driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Returns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h](j()}(hThis can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available.h]hThis can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM(hjubj()}(hThe **driver** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver().h](hThe }(hjhhhNhNubji)}(h **driver**h]hdriver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubhr structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM,hjubj()}(hX?If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you.h]hXAIf using the non device model: The driver’s attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM/hjubj()}(hThe driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so.h]hThe driver’s detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM6hjubj()}(hReturns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h]hReturns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhM<hjubeh}(h]h ]h"]h$]h&]uh1jChjhM(hj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČmodule_parport_driver (C macro)c.module_parport_driverhNtauh1hhhhhhNhNubh)}(hhh](h)}(hmodule_parport_driverh]h)}(hmodule_parport_driverh]h)}(hmodule_parport_driverh]h)}(hjah]hmodule_parport_driver}(hjkhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjgubah}(h]h ](hheh"]h$]h&]hhuh1hhjchhh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMGubah}(h]h ]h"]h$]h&]hhjuh1hjjhj_hhhj~hMGubah}(h]jZah ](jjeh"]h$]h&]j j )j huh1hhj~hMGhj\hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj\hhhj~hMGubeh}(h]h ](jmacroeh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj()}(h,``module_parport_driver (__parport_driver)``h]j.)}(hjh]h(module_parport_driver (__parport_driver)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMIhhhhubjD)}(h6Helper macro for registering a modular parport driver h]j()}(h5Helper macro for registering a modular parport driverh]h5Helper macro for registering a modular parport driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMGhjubah}(h]h ]h"]h$]h&]uh1jChjhMGhhhhubj_)}(hX=**Parameters** ``__parport_driver`` struct parport_driver to be used **Description** Helper macro for parport drivers which do not do anything special in module init and exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit().h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMKhjubj)}(hhh]j)}(h6``__parport_driver`` struct parport_driver to be used h](j)}(h``__parport_driver``h]j.)}(hjh]h__parport_driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMHhjubj)}(hhh]j()}(h struct parport_driver to be usedh]h struct parport_driver to be used}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMHhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMHhjubah}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hj,h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj*ubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMJhjubj()}(hHelper macro for parport drivers which do not do anything special in module init and exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit().h]hHelper macro for parport drivers which do not do anything special in module init and exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit().}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMIhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_yield (C function)c.parport_yieldhNtauh1hhhhhhNhNubh)}(hhh](h)}(h)int parport_yield (struct pardevice *dev)h]h)}(h(int parport_yield(struct pardevice *dev)h](hdesc_sig_keyword_type)}(hinth]hint}(hjshhhNhNubah}(h]h ]ktah"]h$]h&]uh1jqhjmhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjmhhhjhMubh)}(h parport_yieldh]h)}(h parport_yieldh]h parport_yield}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ](hheh"]h$]h&]hhuh1hhjmhhhjhMubhdesc_parameterlist)}(h(struct pardevice *dev)h]hdesc_parameter)}(hstruct pardevice *devh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]h)}(h pardeviceh]h pardevice}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjsbc.parport_yieldasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubh)}(hdevh]hdev}(hj!hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjmhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjihhhjhMubah}(h]jdah ](jjeh"]h$]h&]j j )j huh1hhjhMhjfhhubj)}(hhh]j()}(h&relinquish a parallel port temporarilyh]h&relinquish a parallel port temporarily}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjHhhubah}(h]h ]h"]h$]h&]uh1jhjfhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jcj#jcj$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct pardevice *dev`` a device on the parallel port **Description** This function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim(), and the return value is the same as for parport_claim(). If it fails, the port is left unclaimed and it is the driver's responsibility to reclaim the port. The parport_yield() and parport_yield_blocking() functions are for marking points in the driver at which other drivers may claim the port and use their devices. Yielding the port is similar to releasing it and reclaiming it, but is more efficient because no action is taken if there are no other devices needing the port. In fact, nothing is done even if there are other devices waiting but the current device is still within its "timeslice". The default timeslice is half a second, but it can be adjusted via the /proc interface.h](j()}(h**Parameters**h]ji)}(hjmh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjgubj)}(hhh]j)}(h8``struct pardevice *dev`` a device on the parallel port h](j)}(h``struct pardevice *dev``h]j.)}(hjh]hstruct pardevice *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjubj)}(hhh]j()}(ha device on the parallel porth]ha device on the parallel port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1j~hjgubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjgubj()}(hX2This function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim(), and the return value is the same as for parport_claim(). If it fails, the port is left unclaimed and it is the driver's responsibility to reclaim the port.h]hX4This function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim(), and the return value is the same as for parport_claim(). If it fails, the port is left unclaimed and it is the driver’s responsibility to reclaim the port.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjgubj()}(hXThe parport_yield() and parport_yield_blocking() functions are for marking points in the driver at which other drivers may claim the port and use their devices. Yielding the port is similar to releasing it and reclaiming it, but is more efficient because no action is taken if there are no other devices needing the port. In fact, nothing is done even if there are other devices waiting but the current device is still within its "timeslice". The default timeslice is half a second, but it can be adjusted via the /proc interface.h]hXThe parport_yield() and parport_yield_blocking() functions are for marking points in the driver at which other drivers may claim the port and use their devices. Yielding the port is similar to releasing it and reclaiming it, but is more efficient because no action is taken if there are no other devices needing the port. In fact, nothing is done even if there are other devices waiting but the current device is still within its “timeslice”. The default timeslice is half a second, but it can be adjusted via the /proc interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjgubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ#parport_yield_blocking (C function)c.parport_yield_blockinghNtauh1hhhhhhNhNubh)}(hhh](h)}(h2int parport_yield_blocking (struct pardevice *dev)h]h)}(h1int parport_yield_blocking(struct pardevice *dev)h](jr)}(hinth]hint}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj)hMubh)}(hparport_yield_blockingh]h)}(hparport_yield_blockingh]hparport_yield_blocking}(hj<hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj8ubah}(h]h ](hheh"]h$]h&]hhuh1hhjhhhj)hMubj)}(h(struct pardevice *dev)h]j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubh)}(hhh]h)}(h pardeviceh]h pardevice}(hjvhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjxmodnameN classnameNjj)}j]j)}jj>sbc.parport_yield_blockingasbuh1hhjTubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubh)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjTubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjPubah}(h]h ]h"]h$]h&]hhuh1jhjhhhj)hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhj)hMubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhj)hMhjhhubj)}(hhh]j()}(h&relinquish a parallel port temporarilyh]h&relinquish a parallel port temporarily}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj)hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX<**Parameters** ``struct pardevice *dev`` a device on the parallel port **Description** This function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim_or_block(), and the return value is the same as for parport_claim_or_block().h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjubj)}(hhh]j)}(h8``struct pardevice *dev`` a device on the parallel port h](j)}(h``struct pardevice *dev``h]j.)}(hjh]hstruct pardevice *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjubj)}(hhh]j()}(ha device on the parallel porth]ha device on the parallel port}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj1hMhj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj1hMhjubah}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjWh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjUubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjubj()}(hThis function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim_or_block(), and the return value is the same as for parport_claim_or_block().h]hThis function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using parport_claim_or_block(), and the return value is the same as for parport_claim_or_block().}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h_/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:4: ./include/linux/parport.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_wait_event (C function)c.parport_wait_eventhNtauh1hhhhhhNhNubh)}(hhh](h)}(hBint parport_wait_event (struct parport *port, signed long timeout)h]h)}(hAint parport_wait_event(struct parport *port, signed long timeout)h](jr)}(hinth]hint}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK1ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK1ubh)}(hparport_wait_eventh]h)}(hparport_wait_eventh]hparport_wait_event}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ](hheh"]h$]h&]hhuh1hhjhhhjhK1ubj)}(h+(struct parport *port, signed long timeout)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]h)}(hparporth]hparport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.parport_wait_eventasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hporth]hport}(hj2hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hsigned long timeouth](jr)}(hsignedh]hsigned}(hjKhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjGubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubjr)}(hlongh]hlong}(hjghhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjGubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubh)}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjGubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhK1ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhjhK1ubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhjhK1hjhhubj)}(hhh]j()}(h$wait for an event on a parallel porth]h$wait for an event on a parallel port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK1hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK1ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hXb**Parameters** ``struct parport *port`` port to wait on ``signed long timeout`` time to wait (in jiffies) **Description** This function waits for up to **timeout** jiffies for an interrupt to occur on a parallel port. If the port timeout is set to zero, it returns immediately. If an interrupt occurs before the timeout period elapses, this function returns zero immediately. If it times out, it returns one. An error code less than zero indicates an error (most likely a pending signal), and the calling code should finish what it's doing as soon as it can.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK5hjubj)}(hhh](j)}(h)``struct parport *port`` port to wait on h](j)}(h``struct parport *port``h]j.)}(hjh]hstruct parport *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK2hjubj)}(hhh]j()}(hport to wait onh]hport to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK2hjubj)}(h2``signed long timeout`` time to wait (in jiffies) h](j)}(h``signed long timeout``h]j.)}(hj'h]hsigned long timeout}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj%ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK3hj!ubj)}(hhh]j()}(htime to wait (in jiffies)h]htime to wait (in jiffies)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj<hK3hj=ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj<hK3hjubeh}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjbh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK5hjubjD)}(hXThis function waits for up to **timeout** jiffies for an interrupt to occur on a parallel port. If the port timeout is set to zero, it returns immediately. If an interrupt occurs before the timeout period elapses, this function returns zero immediately. If it times out, it returns one. An error code less than zero indicates an error (most likely a pending signal), and the calling code should finish what it's doing as soon as it can.h](j()}(hThis function waits for up to **timeout** jiffies for an interrupt to occur on a parallel port. If the port timeout is set to zero, it returns immediately.h](hThis function waits for up to }(hj|hhhNhNubji)}(h **timeout**h]htimeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|ubhs jiffies for an interrupt to occur on a parallel port. If the port timeout is set to zero, it returns immediately.}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK4hjxubj()}(hXIf an interrupt occurs before the timeout period elapses, this function returns zero immediately. If it times out, it returns one. An error code less than zero indicates an error (most likely a pending signal), and the calling code should finish what it's doing as soon as it can.h]hXIf an interrupt occurs before the timeout period elapses, this function returns zero immediately. If it times out, it returns one. An error code less than zero indicates an error (most likely a pending signal), and the calling code should finish what it’s doing as soon as it can.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chK8hjxubeh}(h]h ]h"]h$]h&]uh1jChjhK4hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ$parport_wait_peripheral (C function)c.parport_wait_peripheralhNtauh1hhhhhhNhNubh)}(hhh](h)}(h\int parport_wait_peripheral (struct parport *port, unsigned char mask, unsigned char result)h]h)}(h[int parport_wait_peripheral(struct parport *port, unsigned char mask, unsigned char result)h](jr)}(hinth]hint}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hparport_wait_peripheralh]h)}(hparport_wait_peripheralh]hparport_wait_peripheral}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ](hheh"]h$]h&]hhuh1hhjhhhjhKubj)}(h@(struct parport *port, unsigned char mask, unsigned char result)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]h)}(hparporth]hparport}(hj- hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj* ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj/ modnameN classnameNjj)}j]j)}jjsbc.parport_wait_peripheralasbuh1hhj ubj)}(h h]h }(hjM hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hj[ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hporth]hport}(hjh hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned char maskh](jr)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj} ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj} ubjr)}(hcharh]hchar}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj} ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj} ubh)}(hmaskh]hmask}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj} ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hunsigned char resulth](jr)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjr)}(hcharh]hchar}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hresulth]hresult}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhjhKhjhhubj)}(hhh]j()}(h'wait for status lines to change in 35msh]h'wait for status lines to change in 35ms}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj1 hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jL j#jL j$j%j&uh1hhhhhhNhNubj_)}(hX0**Parameters** ``struct parport *port`` port to watch ``unsigned char mask`` status lines to watch ``unsigned char result`` desired values of chosen status lines **Description** This function waits until the masked status lines have the desired values, or until 35ms have elapsed (see IEEE 1284-1994 page 24 to 25 for why this value in particular is hardcoded). The **mask** and **result** parameters are bitmasks, with the bits defined by the constants in parport.h: ``PARPORT_STATUS_BUSY``, and so on. The port is polled quickly to start off with, in anticipation of a fast response from the peripheral. This fast polling time is configurable (using /proc), and defaults to 500usec. If the timeout for this port (see parport_set_timeout()) is zero, the fast polling time is 35ms, and this function does not call schedule(). If the timeout for this port is non-zero, after the fast polling fails it uses parport_wait_event() to wait for up to 10ms, waking up if an interrupt occurs.h](j()}(h**Parameters**h]ji)}(hjV h]h Parameters}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjT ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhjP ubj)}(hhh](j)}(h'``struct parport *port`` port to watch h](j)}(h``struct parport *port``h]j.)}(hju h]hstruct parport *port}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjs ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhjo ubj)}(hhh]j()}(h port to watchh]h port to watch}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjo ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjl ubj)}(h-``unsigned char mask`` status lines to watch h](j)}(h``unsigned char mask``h]j.)}(hj h]hunsigned char mask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj ubj)}(hhh]j()}(hstatus lines to watchh]hstatus lines to watch}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjl ubj)}(h?``unsigned char result`` desired values of chosen status lines h](j)}(h``unsigned char result``h]j.)}(hj h]hunsigned char result}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj ubj)}(hhh]j()}(h%desired values of chosen status linesh]h%desired values of chosen status lines}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjl ubeh}(h]h ]h"]h$]h&]uh1j~hjP ubj()}(h**Description**h]ji)}(hj" h]h Description}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhjP ubjD)}(hX(This function waits until the masked status lines have the desired values, or until 35ms have elapsed (see IEEE 1284-1994 page 24 to 25 for why this value in particular is hardcoded). The **mask** and **result** parameters are bitmasks, with the bits defined by the constants in parport.h: ``PARPORT_STATUS_BUSY``, and so on. The port is polled quickly to start off with, in anticipation of a fast response from the peripheral. This fast polling time is configurable (using /proc), and defaults to 500usec. If the timeout for this port (see parport_set_timeout()) is zero, the fast polling time is 35ms, and this function does not call schedule(). If the timeout for this port is non-zero, after the fast polling fails it uses parport_wait_event() to wait for up to 10ms, waking up if an interrupt occurs.h](j()}(hXEThis function waits until the masked status lines have the desired values, or until 35ms have elapsed (see IEEE 1284-1994 page 24 to 25 for why this value in particular is hardcoded). The **mask** and **result** parameters are bitmasks, with the bits defined by the constants in parport.h: ``PARPORT_STATUS_BUSY``, and so on.h](hThis function waits until the masked status lines have the desired values, or until 35ms have elapsed (see IEEE 1284-1994 page 24 to 25 for why this value in particular is hardcoded). The }(hj< hhhNhNubji)}(h**mask**h]hmask}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj< ubh and }(hj< hhhNhNubji)}(h **result**h]hresult}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj< ubhO parameters are bitmasks, with the bits defined by the constants in parport.h: }(hj< hhhNhNubj.)}(h``PARPORT_STATUS_BUSY``h]hPARPORT_STATUS_BUSY}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj< ubh , and so on.}(hj< hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj8 ubj()}(hXBThe port is polled quickly to start off with, in anticipation of a fast response from the peripheral. This fast polling time is configurable (using /proc), and defaults to 500usec. If the timeout for this port (see parport_set_timeout()) is zero, the fast polling time is 35ms, and this function does not call schedule().h]hXBThe port is polled quickly to start off with, in anticipation of a fast response from the peripheral. This fast polling time is configurable (using /proc), and defaults to 500usec. If the timeout for this port (see parport_set_timeout()) is zero, the fast polling time is 35ms, and this function does not call schedule().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj8 ubj()}(hIf the timeout for this port is non-zero, after the fast polling fails it uses parport_wait_event() to wait for up to 10ms, waking up if an interrupt occurs.h]hIf the timeout for this port is non-zero, after the fast polling fails it uses parport_wait_event() to wait for up to 10ms, waking up if an interrupt occurs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chKhj8 ubeh}(h]h ]h"]h$]h&]uh1jChj hKhjP ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_negotiate (C function)c.parport_negotiatehNtauh1hhhhhhNhNubh)}(hhh](h)}(h6int parport_negotiate (struct parport *port, int mode)h]h)}(h5int parport_negotiate(struct parport *port, int mode)h](jr)}(hinth]hint}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM/ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hM/ubh)}(hparport_negotiateh]h)}(hparport_negotiateh]hparport_negotiate}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubah}(h]h ](hheh"]h$]h&]hhuh1hhj hhhj hM/ubj)}(h (struct parport *port, int mode)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]h)}(hparporth]hparport}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj" modnameN classnameNjj)}j]j)}jj sbc.parport_negotiateasbuh1hhj ubj)}(h h]h }(hj@ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hjN hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hporth]hport}(hj[ hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hint modeh](jr)}(hinth]hint}(hjt hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjp ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp ubh)}(hmodeh]hmode}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjp ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj hM/ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj hhhj hM/ubah}(h]j ah ](jjeh"]h$]h&]j j )j huh1hhj hM/hj hhubj)}(hhh]j()}(hnegotiate an IEEE 1284 modeh]hnegotiate an IEEE 1284 mode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM/hj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hM/ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j j#j j$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct parport *port`` port to use ``int mode`` mode to negotiate to **Description** Use this to negotiate to a particular IEEE 1284 transfer mode. The **mode** parameter should be one of the constants in parport.h starting ``IEEE1284_MODE_xxx``. The return value is 0 if the peripheral has accepted the negotiation to the mode specified, -1 if the peripheral is not IEEE 1284 compliant (or not present), or 1 if the peripheral has rejected the negotiation.h](j()}(h**Parameters**h]ji)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM3hj ubj)}(hhh](j)}(h%``struct parport *port`` port to use h](j)}(h``struct parport *port``h]j.)}(hj h]hstruct parport *port}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM0hj ubj)}(hhh]j()}(h port to useh]h port to use}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hM0hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hM0hj ubj)}(h"``int mode`` mode to negotiate to h](j)}(h ``int mode``h]j.)}(hj4 h]hint mode}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj2 ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM1hj. ubj)}(hhh]j()}(hmode to negotiate toh]hmode to negotiate to}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjI hM1hjJ ubah}(h]h ]h"]h$]h&]uh1jhj. ubeh}(h]h ]h"]h$]h&]uh1jhjI hM1hj ubeh}(h]h ]h"]h$]h&]uh1j~hj ubj()}(h**Description**h]ji)}(hjo h]h Description}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjm ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM3hj ubjD)}(hXuUse this to negotiate to a particular IEEE 1284 transfer mode. The **mode** parameter should be one of the constants in parport.h starting ``IEEE1284_MODE_xxx``. The return value is 0 if the peripheral has accepted the negotiation to the mode specified, -1 if the peripheral is not IEEE 1284 compliant (or not present), or 1 if the peripheral has rejected the negotiation.h](j()}(hUse this to negotiate to a particular IEEE 1284 transfer mode. The **mode** parameter should be one of the constants in parport.h starting ``IEEE1284_MODE_xxx``.h](hCUse this to negotiate to a particular IEEE 1284 transfer mode. The }(hj hhhNhNubji)}(h**mode**h]hmode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj ubh@ parameter should be one of the constants in parport.h starting }(hj hhhNhNubj.)}(h``IEEE1284_MODE_xxx``h]hIEEE1284_MODE_xxx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM2hj ubj()}(hThe return value is 0 if the peripheral has accepted the negotiation to the mode specified, -1 if the peripheral is not IEEE 1284 compliant (or not present), or 1 if the peripheral has rejected the negotiation.h]hThe return value is 0 if the peripheral has accepted the negotiation to the mode specified, -1 if the peripheral is not IEEE 1284 compliant (or not present), or 1 if the peripheral has rejected the negotiation.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM6hj ubeh}(h]h ]h"]h$]h&]uh1jChj hM2hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_write (C function)c.parport_writehNtauh1hhhhhhNhNubh)}(hhh](h)}(hLssize_t parport_write (struct parport *port, const void *buffer, size_t len)h]h)}(hKssize_t parport_write(struct parport *port, const void *buffer, size_t len)h](h)}(hhh]h)}(hssize_th]hssize_t}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}j parport_writesbc.parport_writeasbuh1hhj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM6ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhjhM6ubh)}(h parport_writeh]h)}(hjh]h parport_write}(hj(hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj$ubah}(h]h ](hheh"]h$]h&]hhuh1hhj hhhjhM6ubj)}(h6(struct parport *port, const void *buffer, size_t len)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hhh]h)}(hparporth]hparport}(hjahhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj^ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjcmodnameN classnameNjj)}j]jc.parport_writeasbuh1hhj?ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hporth]hport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubj)}(hconst void *bufferh](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjr)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hbufferh]hbuffer}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubj)}(h size_t lenh](h)}(hhh]h)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.parport_writeasbuh1hhj ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hlenh]hlen}(hj@hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj;ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhjhM6ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj hhhjhM6ubah}(h]j ah ](jjeh"]h$]h&]j j )j huh1hhjhM6hj hhubj)}(hhh]j()}(h(write a block of data to a parallel porth]h(write a block of data to a parallel port}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM6hjghhubah}(h]h ]h"]h$]h&]uh1jhj hhhjhM6ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct parport *port`` port to write to ``const void *buffer`` data buffer (in kernel space) ``size_t len`` number of bytes of data to transfer **Description** This will write up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports forward transfers (host to peripheral). It is the caller's responsibility to ensure that the first **len** bytes of **buffer** are valid. This function returns the number of bytes transferred (if zero or positive), or else an error code.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM:hjubj)}(hhh](j)}(h*``struct parport *port`` port to write to h](j)}(h``struct parport *port``h]j.)}(hjh]hstruct parport *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM7hjubj)}(hhh]j()}(hport to write toh]hport to write to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhM7hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM7hjubj)}(h5``const void *buffer`` data buffer (in kernel space) h](j)}(h``const void *buffer``h]j.)}(hjh]hconst void *buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM8hjubj)}(hhh]j()}(hdata buffer (in kernel space)h]hdata buffer (in kernel space)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhM8hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM8hjubj)}(h3``size_t len`` number of bytes of data to transfer h](j)}(h``size_t len``h]j.)}(hjh]h size_t len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM9hjubj)}(hhh]j()}(h#number of bytes of data to transferh]h#number of bytes of data to transfer}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj2hM9hj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj2hM9hjubeh}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjXh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjVubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM;hjubjD)}(hXThis will write up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports forward transfers (host to peripheral). It is the caller's responsibility to ensure that the first **len** bytes of **buffer** are valid. This function returns the number of bytes transferred (if zero or positive), or else an error code.h](j()}(hThis will write up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports forward transfers (host to peripheral).h](hThis will write up to }(hjrhhhNhNubji)}(h**len**h]hlen}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrubh bytes of }(hjrhhhNhNubji)}(h **buffer**h]hbuffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrubh to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports forward transfers (host to peripheral).}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM:hjnubj()}(haIt is the caller's responsibility to ensure that the first **len** bytes of **buffer** are valid.h](h=It is the caller’s responsibility to ensure that the first }(hjhhhNhNubji)}(h**len**h]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubh bytes of }(hjhhhNhNubji)}(h **buffer**h]hbuffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubh are valid.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chM?hjnubj()}(hcThis function returns the number of bytes transferred (if zero or positive), or else an error code.h]hcThis function returns the number of bytes transferred (if zero or positive), or else an error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMBhjnubeh}(h]h ]h"]h$]h&]uh1jChjhM:hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_read (C function)c.parport_readhNtauh1hhhhhhNhNubh)}(hhh](h)}(hEssize_t parport_read (struct parport *port, void *buffer, size_t len)h]h)}(hDssize_t parport_read(struct parport *port, void *buffer, size_t len)h](h)}(hhh]h)}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}j parport_readsbc.parport_readasbuh1hhj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj1hMubh)}(h parport_readh]h)}(hj.h]h parport_read}(hjDhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj@ubah}(h]h ](hheh"]h$]h&]hhuh1hhj hhhj1hMubj)}(h0(struct parport *port, void *buffer, size_t len)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]h)}(hparporth]hparport}(hj}hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjzubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j,c.parport_readasbuh1hhj[ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hporth]hport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjWubj)}(h void *bufferh](jr)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hbufferh]hbuffer}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjWubj)}(h size_t lenh](h)}(hhh]h)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j,c.parport_readasbuh1hhj ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hlenh]hlen}(hj@hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhu(h1jhjWubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj1hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhj1hMubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhj1hMhjhhubj)}(hhh]j()}(h)read a block of data from a parallel porth]h)read a block of data from a parallel port}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjghhubah}(h]h ]h"]h$]h&]uh1jhjhhhj1hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct parport *port`` port to read from ``void *buffer`` data buffer (in kernel space) ``size_t len`` number of bytes of data to transfer **Description** This will read up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports reverse transfers (peripheral to host). It is the caller's responsibility to ensure that the first **len** bytes of **buffer** are available to write to. This function returns the number of bytes transferred (if zero or positive), or else an error code.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj)}(hhh](j)}(h+``struct parport *port`` port to read from h](j)}(h``struct parport *port``h]j.)}(hjh]hstruct parport *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj)}(hhh]j()}(hport to read fromh]hport to read from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h/``void *buffer`` data buffer (in kernel space) h](j)}(h``void *buffer``h]j.)}(hjh]h void *buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj)}(hhh]j()}(hdata buffer (in kernel space)h]hdata buffer (in kernel space)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h3``size_t len`` number of bytes of data to transfer h](j)}(h``size_t len``h]j.)}(hjh]h size_t len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj)}(hhh]j()}(h#number of bytes of data to transferh]h#number of bytes of data to transfer}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj2hMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj2hMhjubeh}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjXh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjVubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubjD)}(hXThis will read up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports reverse transfers (peripheral to host). It is the caller's responsibility to ensure that the first **len** bytes of **buffer** are available to write to. This function returns the number of bytes transferred (if zero or positive), or else an error code.h](j()}(hThis will read up to **len** bytes of **buffer** to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports reverse transfers (peripheral to host).h](hThis will read up to }(hjrhhhNhNubji)}(h**len**h]hlen}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrubh bytes of }(hjrhhhNhNubji)}(h **buffer**h]hbuffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrubh to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using parport_negotiate()), as long as that mode supports reverse transfers (peripheral to host).}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjnubj()}(hqIt is the caller's responsibility to ensure that the first **len** bytes of **buffer** are available to write to.h](h=It is the caller’s responsibility to ensure that the first }(hjhhhNhNubji)}(h**len**h]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubh bytes of }(hjhhhNhNubji)}(h **buffer**h]hbuffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubh are available to write to.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjnubj()}(hcThis function returns the number of bytes transferred (if zero or positive), or else an error code.h]hcThis function returns the number of bytes transferred (if zero or positive), or else an error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjnubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ parport_set_timeout (C function)c.parport_set_timeouthNtauh1hhhhhhNhNubh)}(hhh](h)}(hAlong parport_set_timeout (struct pardevice *dev, long inactivity)h]h)}(h@long parport_set_timeout(struct pardevice *dev, long inactivity)h](jr)}(hlongh]hlong}(hj hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhjhMubh)}(hparport_set_timeouth]h)}(hparport_set_timeouth]hparport_set_timeout}(hj.hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj*ubah}(h]h ](hheh"]h$]h&]hhuh1hhj hhhjhMubj)}(h((struct pardevice *dev, long inactivity)h](j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubh)}(hhh]h)}(h pardeviceh]h pardevice}(hjhhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjjmodnameN classnameNjj)}j]j)}jj0sbc.parport_set_timeoutasbuh1hhjFubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubh)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubj)}(hlong inactivityh](jr)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(h inactivityh]h inactivity}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhjhMhjhhubj)}(hhh]j()}(h'set the inactivity timeout for a deviceh]h'set the inactivity timeout for a device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct pardevice *dev`` device on a port ``long inactivity`` inactivity timeout (in jiffies) **Description** This sets the inactivity timeout for a particular device on a port. This affects functions like parport_wait_peripheral(). The special value 0 means not to call schedule() while dealing with this device. The return value is the previous inactivity timeout. Any callers of parport_wait_event() for this device are woken up.h](j()}(h**Parameters**h]ji)}(hj$h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"ubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj)}(hhh](j)}(h+``struct pardevice *dev`` device on a port h](j)}(h``struct pardevice *dev``h]j.)}(hjCh]hstruct pardevice *dev}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjAubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhj=ubj)}(hhh]j()}(hdevice on a porth]hdevice on a port}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjXhMhjYubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhjXhMhj:ubj)}(h4``long inactivity`` inactivity timeout (in jiffies) h](j)}(h``long inactivity``h]j.)}(hj|h]hlong inactivity}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjzubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjvubj)}(hhh]j()}(hinactivity timeout (in jiffies)h]hinactivity timeout (in jiffies)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjhMhj:ubeh}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubjD)}(hXEThis sets the inactivity timeout for a particular device on a port. This affects functions like parport_wait_peripheral(). The special value 0 means not to call schedule() while dealing with this device. The return value is the previous inactivity timeout. Any callers of parport_wait_event() for this device are woken up.h](j()}(hThis sets the inactivity timeout for a particular device on a port. This affects functions like parport_wait_peripheral(). The special value 0 means not to call schedule() while dealing with this device.h]hThis sets the inactivity timeout for a particular device on a port. This affects functions like parport_wait_peripheral(). The special value 0 means not to call schedule() while dealing with this device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj()}(h4The return value is the previous inactivity timeout.h]h4The return value is the previous inactivity timeout.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubj()}(hAAny callers of parport_wait_event() for this device are woken up.h]hAAny callers of parport_wait_event() for this device are woken up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hb/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:7: ./drivers/parport/ieee1284.chMhjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ&__parport_register_driver (C function)c.__parport_register_driverhNtauh1hhhhhhNhNubh)}(hhh](h)}(hfint __parport_register_driver (struct parport_driver *drv, struct module *owner, const char *mod_name)h]h)}(heint __parport_register_driver(struct parport_driver *drv, struct module *owner, const char *mod_name)h](jr)}(hinth]hint}(hj$hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj2hKubh)}(h__parport_register_driverh]h)}(h__parport_register_driverh]h__parport_register_driver}(hjEhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjAubah}(h]h ](hheh"]h$]h&]hhuh1hhj hhhj2hKubj)}(hH(struct parport_driver *drv, struct module *owner, const char *mod_name)h](j)}(hstruct parport_driver *drvh](j)}(hjh]hstruct}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubh)}(hhh]h)}(hparport_driverh]hparport_driver}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjGsbc.__parport_register_driverasbuh1hhj]ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubh)}(hdrvh]hdrv}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjYubj)}(hstruct module *ownerh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]h)}(hmoduleh]hmodule}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.__parport_register_driverasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hownerh]howner}(hj*hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjYubj)}(hconst char *mod_nameh](j)}(hjh]hconst}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubjr)}(hcharh]hchar}(hj^hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj?ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hjh]h*}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hmod_nameh]hmod_name}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjYubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj2hKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhj2hKubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhj2hKhjhhubj)}(hhh]j()}(h®ister a parallel port device driverh]h®ister a parallel port device driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj2hKubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX-**Parameters** ``struct parport_driver *drv`` structure describing the driver ``struct module *owner`` owner module of drv ``const char *mod_name`` module name string **Description** This can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available. If devmodel is true then the new device model is used for registration. The **drv** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver(). If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you. The driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Returns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj)}(hhh](j)}(h?``struct parport_driver *drv`` structure describing the driver h](j)}(h``struct parport_driver *drv``h]j.)}(hjh]hstruct parport_driver *drv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj)}(hhh]j()}(hstructure describing the driverh]hstructure describing the driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h-``struct module *owner`` owner module of drv 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhj%ubj)}(hhh]j()}(howner module of drvh]howner module of drv}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj@hKhjAubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj@hKhjubj)}(h,``const char *mod_name`` module name string h](j)}(h``const char *mod_name``h]j.)}(hjdh]hconst char *mod_name}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjbubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhj^ubj)}(hhh]j()}(hmodule name stringh]hmodule name string}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjyhKhjzubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhjyhKhjubeh}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubjD)}(hX This can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available. If devmodel is true then the new device model is used for registration. The **drv** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver(). If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you. The driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Returns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h](j()}(hThis can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available.h]hThis can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj()}(hGIf devmodel is true then the new device model is used for registration.h]hGIf devmodel is true then the new device model is used for registration.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj()}(h}The **drv** structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver().h](hThe }(hjhhhNhNubji)}(h**drv**h]hdrv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubhr structure is allocated by the caller and must not be deallocated until after calling parport_unregister_driver().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj()}(hX?If using the non device model: The driver's attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you.h]hXAIf using the non device model: The driver’s attach() function may block. The port that attach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so. Calling parport_register_device() on that port will do this for you.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chKhjubj()}(hThe driver's detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so.h]hThe driver’s detach() function may block. The port that detach() is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call parport_get_port() to do so.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjubj()}(hReturns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.h]hReturns 0 on success. The non device model will always succeeds. but the new device model can fail and will return the error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjubeh}(h]h ]h"]h$]h&]uh1jChjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ&parport_unregister_driver (C function)c.parport_unregister_driverhNtauh1hhhhhhNhNubh)}(hhh](h)}(h;void parport_unregister_driver (struct parport_driver *drv)h]h)}(h:void parport_unregister_driver(struct parport_driver *drv)h](jr)}(hvoidh]hvoid}(hjKhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjGhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM:ubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhjYhM:ubh)}(hparport_unregister_driverh]h)}(hparport_unregister_driverh]hparport_unregister_driver}(hjlhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhubah}(h]h ](hheh"]h$]h&]hhuh1hhjGhhhjYhM:ubj)}(h(struct parport_driver *drv)h]j)}(hstruct parport_driver *drvh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]h)}(hparport_driverh]hparport_driver}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjnsbc.parport_unregister_driverasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hdrvh]hdrv}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjGhhhjYhM:ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjChhhjYhM:ubah}(h]j>ah ](jjeh"]h$]h&]j j )j huh1hhjYhM:hj@hhubj)}(hhh]j()}(h(deregister a parallel port device driverh]h(deregister a parallel port device driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM:hjhhubah}(h]h ]h"]h$]h&]uh1jhj@hhhjYhM:ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j#j#j#j$j%j&uh1hhhhhhNhNubj_)}(hXb**Parameters** ``struct parport_driver *drv`` structure describing the driver that was given to parport_register_driver() **Description** This should be called by a parallel port device driver that has registered itself using parport_register_driver() when it is about to be unloaded. When it returns, the driver's attach() routine will no longer be called, and for each port that attach() was called for, the detach() routine will have been called. All the driver's attach() and detach() calls are guaranteed to have finished by the time this function returns.h](j()}(h**Parameters**h]ji)}(hj-h]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM>hj'ubj)}(hhh]j)}(hk``struct parport_driver *drv`` structure describing the driver that was given to parport_register_driver() h](j)}(h``struct parport_driver *drv``h]j.)}(hjLh]hstruct parport_driver *drv}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjJubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM<hjFubj)}(hhh]j()}(hKstructure describing the driver that was given to parport_register_driver()h]hKstructure describing the driver that was given to parport_register_driver()}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM;hjbubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjahM<hjCubah}(h]h ]h"]h$]h&]uh1j~hj'ubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM>hj'ubjD)}(hXThis should be called by a parallel port device driver that has registered itself using parport_register_driver() when it is about to be unloaded. When it returns, the driver's attach() routine will no longer be called, and for each port that attach() was called for, the detach() routine will have been called. All the driver's attach() and detach() calls are guaranteed to have finished by the time this function returns.h](j()}(hThis should be called by a parallel port device driver that has registered itself using parport_register_driver() when it is about to be unloaded.h]hThis should be called by a parallel port device driver that has registered itself using parport_register_driver() when it is about to be unloaded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM=hjubj()}(hWhen it returns, the driver's attach() routine will no longer be called, and for each port that attach() was called for, the detach() routine will have been called.h]hWhen it returns, the driver’s attach() routine will no longer be called, and for each port that attach() was called for, the detach() routine will have been called.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMAhjubj()}(hoAll the driver's attach() and detach() calls are guaranteed to have finished by the time this function returns.h]hqAll the driver’s attach() and detach() calls are guaranteed to have finished by the time this function returns.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMEhjubeh}(h]h ]h"]h$]h&]uh1jChjhM=hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_get_port (C function)c.parport_get_porthNtauh1hhhhhhNhNubh)}(hhh](h)}(h8struct parport * parport_get_port (struct parport *port)h]h)}(h6struct parport *parport_get_port(struct parport *port)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMgubh)}(hhh]h)}(hparporth]hparport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jparport_get_portsbc.parport_get_portasbuh1hhjhhhjhMgubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMgubj)}(hjh]h*}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMgubh)}(hparport_get_porth]h)}(hj2h]hparport_get_port}(hjThhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjPubah}(h]h ](hheh"]h$]h&]hhuh1hhjhhhjhMgubj)}(h(struct parport *port)h]j)}(hstruct parport *porth](j)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hhh]h)}(hparporth]hparport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j0c.parport_get_portasbuh1hhjkubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hporth]hport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjkubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMgubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhjhMgubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhjhMghjhhubj)}(hhh]j()}(h"increment a port's reference counth]h$increment a port’s reference count}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMghjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMgubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(h**Parameters** ``struct parport *port`` the port **Description** This ensures that a struct parport pointer remains valid until the matching parport_put_port() call.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMkhj ubj)}(hhh]j)}(h"``struct parport *port`` the port h](j)}(h``struct parport *port``h]j.)}(hj1h]hstruct parport *port}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj/ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhhj+ubj)}(hhh]j()}(hthe porth]hthe port}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjFhMhhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhMhhj(ubah}(h]h ]h"]h$]h&]uh1j~hj ubj()}(h**Description**h]ji)}(hjlh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMjhj ubjD)}(hdThis ensures that a struct parport pointer remains valid until the matching parport_put_port() call.h]j()}(hdThis ensures that a struct parport pointer remains valid until the matching parport_put_port() call.h]hdThis ensures that a struct parport pointer remains valid until the matching parport_put_port() call.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMihjubah}(h]h ]h"]h$]h&]uh1jChjhMihj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_put_port (C function)c.parport_put_porthNtauh1hhhhhhNhNubh)}(hhh](h)}(h,void parport_put_port (struct parport *port)h]h)}(h+void parport_put_port(struct parport *port)h](jr)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM}ubh)}(hparport_put_porth]h)}(hparport_put_porth]hparport_put_port}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ](hheh"]h$]h&]hhuh1hhjhhhjhM}ubj)}(h(struct parport *port)h]j)}(hstruct parport *porth](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]h)}(hparporth]hparport}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.parport_put_portasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hporth]hport}(hjQhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM}ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjhhhjhM}ubah}(h]jah ](jjeh"]h$]h&]j j )j huh1hhjhM}hjhhubj)}(hhh]j()}(h"decrement a port's reference counth]h$decrement a port’s reference count}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM}hjxhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM}ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhhhNhNubj_)}(hX **Parameters** ``struct parport *port`` the port **Description** This should be called once for each call to parport_get_port(), once the port is no longer needed. When the reference count reaches zero (port is no longer used), free_port is called.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjubj)}(hhh]j)}(h"``struct parport *port`` the port h](j)}(h``struct parport *port``h]j.)}(hjh]hstruct parport *port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM~hjubj)}(hhh]j()}(hthe porth]hthe port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhM~hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM~hjubah}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjubjD)}(hThis should be called once for each call to parport_get_port(), once the port is no longer needed. When the reference count reaches zero (port is no longer used), free_port is called.h]j()}(hThis should be called once for each call to parport_get_port(), once the port is no longer needed. When the reference count reaches zero (port is no longer used), free_port is called.h]hThis should be called once for each call to parport_get_port(), once the port is no longer needed. When the reference count reaches zero (port is no longer used), free_port is called.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj ubah}(h]h ]h"]h$]h&]uh1jChjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ"parport_register_port (C function)c.parport_register_porthNtauh1hhhhhhNhNubh)}(hhh](h)}(hmstruct parport * parport_register_port (unsigned long base, int irq, int dma, struct parport_operations *ops)h]h)}(hkstruct parport *parport_register_port(unsigned long base, int irq, int dma, struct parport_operations *ops)h](j)}(hjh]hstruct}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjShMubh)}(hhh]h)}(hparporth]hparport}(hjehhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjgmodnameN classnameNjj)}j]j)}jparport_register_portsbc.parport_register_portasbuh1hhjBhhhjShMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjShMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjShMubh)}(hparport_register_porth]h)}(hjh]hparport_register_port}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ](hheh"]h$]h&]hhuh1hhjBhhhjShMubj)}(hF(unsigned long base, int irq, int dma, struct parport_operations *ops)h](j)}(hunsigned long baseh](jr)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjr)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hbaseh]hbase}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint irqh](jr)}(hinth]hint}(hjhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hirqh]hirq}(hj-hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint dmah](jr)}(hinth]hint}(hjFhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjBubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubh)}(hdmah]hdma}(hjbhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjBubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct parport_operations *opsh](j)}(hjh]hstruct}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hhh]h)}(hparport_operationsh]hparport_operations}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.parport_register_portasbuh1hhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hopsh]hops}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjwubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjBhhhjShMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj>hhhjShMubah}(h]j9ah ](jjeh"]h$]h&]j j )j huh1hhjShMhj;hhubj)}(hhh]j()}(hregister a parallel porth]hregister a parallel port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj;hhhjShMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j j#j j$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``unsigned long base`` base I/O address ``int irq`` IRQ line ``int dma`` DMA channel ``struct parport_operations *ops`` pointer to the port driver's port operations structure **Description** When a parallel port (lowlevel) driver finds a port that should be made available to parallel port device drivers, it should call parport_register_port(). The **base**, **irq**, and **dma** parameters are for the convenience of port drivers, and for ports where they aren't meaningful needn't be set to anything special. They can be altered afterwards by adjusting the relevant members of the parport structure that is returned and represents the port. They should not be tampered with after calling parport_announce_port, however. If there are parallel port device drivers in the system that have registered themselves using parport_register_driver(), they are not told about the port at this time; that is done by parport_announce_port(). The **ops** structure is allocated by the caller, and must not be deallocated before calling parport_remove_port(). If there is no memory to allocate a new parport structure, this function will return ``NULL``.h](j()}(h**Parameters**h]ji)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj ubj)}(hhh](j)}(h(``unsigned long base`` base I/O address h](j)}(h``unsigned long base``h]j.)}(hj= h]hunsigned long base}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj; ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj7 ubj)}(hhh]j()}(hbase I/O addressh]hbase I/O address}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjR hMhjS ubah}(h]h ]h"]h$]h&]uh1jhj7 ubeh}(h]h ]h"]h$]h&]uh1jhjR hMhj4 ubj)}(h``int irq`` IRQ line h](j)}(h ``int irq``h]j.)}(hjv h]hint irq}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjt ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjp ubj)}(hhh]j()}(hIRQ lineh]hIRQ line}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hMhj ubah}(h]h ]h"]h$]h&]uh1jhjp ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj4 ubj)}(h``int dma`` DMA channel h](j)}(h ``int dma``h]j.)}(hj h]hint dma}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj ubj)}(hhh]j()}(h DMA channelh]h DMA channel}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj4 ubj)}(hZ``struct parport_operations *ops`` pointer to the port driver's port operations structure h](j)}(h"``struct parport_operations *ops``h]j.)}(hj h]hstruct parport_operations *ops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj ubj)}(hhh]j()}(h6pointer to the port driver's port operations structureh]h8pointer to the port driver’s port operations structure}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj4 ubeh}(h]h ]h"]h$]h&]uh1j~hj ubj()}(h**Description**h]ji)}(hj#!h]h Description}(hj%!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!!ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj ubjD)}(hXWhen a parallel port (lowlevel) driver finds a port that should be made available to parallel port device drivers, it should call parport_register_port(). The **base**, **irq**, and **dma** parameters are for the convenience of port drivers, and for ports where they aren't meaningful needn't be set to anything special. They can be altered afterwards by adjusting the relevant members of the parport structure that is returned and represents the port. They should not be tampered with after calling parport_announce_port, however. If there are parallel port device drivers in the system that have registered themselves using parport_register_driver(), they are not told about the port at this time; that is done by parport_announce_port(). The **ops** structure is allocated by the caller, and must not be deallocated before calling parport_remove_port(). If there is no memory to allocate a new parport structure, this function will return ``NULL``.h](j()}(hXWhen a parallel port (lowlevel) driver finds a port that should be made available to parallel port device drivers, it should call parport_register_port(). The **base**, **irq**, and **dma** parameters are for the convenience of port drivers, and for ports where they aren't meaningful needn't be set to anything special. They can be altered afterwards by adjusting the relevant members of the parport structure that is returned and represents the port. They should not be tampered with after calling parport_announce_port, however.h](hWhen a parallel port (lowlevel) driver finds a port that should be made available to parallel port device drivers, it should call parport_register_port(). The }(hj=!hhhNhNubji)}(h**base**h]hbase}(hjE!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=!ubh, }(hj=!hhhNhNubji)}(h**irq**h]hirq}(hjW!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=!ubh, and }(hj=!hhhNhNubji)}(h**dma**h]hdma}(hji!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=!ubhX\ parameters are for the convenience of port drivers, and for ports where they aren’t meaningful needn’t be set to anything special. They can be altered afterwards by adjusting the relevant members of the parport structure that is returned and represents the port. They should not be tampered with after calling parport_announce_port, however.}(hj=!hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj9!ubj()}(hIf there are parallel port device drivers in the system that have registered themselves using parport_register_driver(), they are not told about the port at this time; that is done by parport_announce_port().h]hIf there are parallel port device drivers in the system that have registered themselves using parport_register_driver(), they are not told about the port at this time; that is done by parport_announce_port().}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj9!ubj()}(hsThe **ops** structure is allocated by the caller, and must not be deallocated before calling parport_remove_port().h](hThe }(hj!hhhNhNubji)}(h**ops**h]hops}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!ubhh structure is allocated by the caller, and must not be deallocated before calling parport_remove_port().}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj9!ubj()}(h^If there is no memory to allocate a new parport structure, this function will return ``NULL``.h](hUIf there is no memory to allocate a new parport structure, this function will return }(hj!hhhNhNubj.)}(h``NULL``h]hNULL}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj!ubh.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj9!ubeh}(h]h ]h"]h$]h&]uh1jChj!hMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ"parport_announce_port (C function)c.parport_announce_porthNtauh1hhhhhhNhNubh)}(hhh](h)}(h1void parport_announce_port (struct parport *port)h]h)}(h0void parport_announce_port(struct parport *port)h](jr)}(hvoidh]hvoid}(hj!hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj!hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj"hMubh)}(hparport_announce_porth]h)}(hparport_announce_porth]hparport_announce_port}(hj"hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj"ubah}(h]h ](hheh"]h$]h&]hhuh1hhj!hhhj"hMubj)}(h(struct parport *port)h]j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj6"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2"ubj)}(h h]h }(hjC"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2"ubh)}(hhh]h)}(hparporth]hparport}(hjT"hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjQ"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjV"modnameN classnameNjj)}j]j)}jj"sbc.parport_announce_portasbuh1hhj2"ubj)}(h h]h }(hjt"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2"ubj)}(hjh]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2"ubh)}(hporth]hport}(hj"hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj2"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj."ubah}(h]h ]h"]h$]h&]hhuh1jhj!hhhj"hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj!hhhj"hMubah}(h]j!ah ](jjeh"]h$]h&]j j )j huh1hhj"hMhj!hhubj)}(hhh]j()}(h)tell device drivers about a parallel porth]h)tell device drivers about a parallel port}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj"hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj"hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j"j#j"j$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct parport *port`` parallel port to announce **Description** After a port driver has registered a parallel port with parport_register_port, and performed any necessary initialisation or adjustments, it should call parport_announce_port() in order to notify all device drivers that have called parport_register_driver(). Their attach() functions will be called, with **port** as the parameter.h](j()}(h**Parameters**h]ji)}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj"ubj)}(hhh]j)}(h3``struct parport *port`` parallel port to announce h](j)}(h``struct parport *port``h]j.)}(hj"h]hstruct parport *port}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj"ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj"ubj)}(hhh]j()}(hparallel port to announceh]hparallel port to announce}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj#hMhj#ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj#hMhj"ubah}(h]h ]h"]h$]h&]uh1j~hj"ubj()}(h**Description**h]ji)}(hj5#h]h Description}(hj7#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3#ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj"ubjD)}(hXLAfter a port driver has registered a parallel port with parport_register_port, and performed any necessary initialisation or adjustments, it should call parport_announce_port() in order to notify all device drivers that have called parport_register_driver(). Their attach() functions will be called, with **port** as the parameter.h]j()}(hXLAfter a port driver has registered a parallel port with parport_register_port, and performed any necessary initialisation or adjustments, it should call parport_announce_port() in order to notify all device drivers that have called parport_register_driver(). Their attach() functions will be called, with **port** as the parameter.h](hX2After a port driver has registered a parallel port with parport_register_port, and performed any necessary initialisation or adjustments, it should call parport_announce_port() in order to notify all device drivers that have called parport_register_driver(). Their attach() functions will be called, with }(hjO#hhhNhNubji)}(h**port**h]hport}(hjW#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjO#ubh as the parameter.}(hjO#hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjK#ubah}(h]h ]h"]h$]h&]uh1jChjo#hMhj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ parport_remove_port (C function)c.parport_remove_porthNtauh1hhhhhhNhNubh)}(hhh](h)}(h/void parport_remove_port (struct parport *port)h]h)}(h.void parport_remove_port(struct parport *port)h](jr)}(hvoidh]hvoid}(hj#hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj#hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#hhhj#hMubh)}(hparport_remove_porth]h)}(hparport_remove_porth]hparport_remove_port}(hj#hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#ubah}(h]h ](hheh"]h$]h&]hhuh1hhj#hhhj#hMubj)}(h(struct parport *port)h]j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubh)}(hhh]h)}(hparporth]hparport}(hj#hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j)}jj#sbc.parport_remove_portasbuh1hhj#ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubh)}(hporth]hport}(hj,$hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj#ubah}(h]h ]h"]h$]h&]hhuh1jhj#hhhj#hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj#hhhj#hMubah}(h]j#ah ](jjeh"]h$]h&]j j )j huh1hhj#hMhj#hhubj)}(hhh]j()}(hderegister a parallel porth]hderegister a parallel port}(hjV$hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjS$hhubah}(h]h ]h"]h$]h&]uh1jhj#hhhj#hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jn$j#jn$j$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct parport *port`` parallel port to deregister **Description** When a parallel port driver is forcibly unloaded, or a parallel port becomes inaccessible, the port driver must call this function in order to deal with device drivers that still want to use it. The parport structure associated with the port has its operations structure replaced with one containing 'null' operations that return errors or just don't do anything. Any drivers that have registered themselves using parport_register_driver() are notified that the port is no longer accessible by having their detach() routines called with **port** as the parameter.h](j()}(h**Parameters**h]ji)}(hjx$h]h Parameters}(hjz$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjv$ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM hjr$ubj)}(hhh]j)}(h5``struct parport *port`` parallel port to deregister h](j)}(h``struct parport *port``h]j.)}(hj$h]hstruct parport *port}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj$ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj$ubj)}(hhh]j()}(hparallel port to deregisterh]hparallel port to deregister}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1j~hjr$ubj()}(h**Description**h]ji)}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjr$ubjD)}(hX5When a parallel port driver is forcibly unloaded, or a parallel port becomes inaccessible, the port driver must call this function in order to deal with device drivers that still want to use it. The parport structure associated with the port has its operations structure replaced with one containing 'null' operations that return errors or just don't do anything. Any drivers that have registered themselves using parport_register_driver() are notified that the port is no longer accessible by having their detach() routines called with **port** as the parameter.h](j()}(hWhen a parallel port driver is forcibly unloaded, or a parallel port becomes inaccessible, the port driver must call this function in order to deal with device drivers that still want to use it.h]hWhen a parallel port driver is forcibly unloaded, or a parallel port becomes inaccessible, the port driver must call this function in order to deal with device drivers that still want to use it.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj$ubj()}(hThe parport structure associated with the port has its operations structure replaced with one containing 'null' operations that return errors or just don't do anything.h]hThe parport structure associated with the port has its operations structure replaced with one containing ‘null’ operations that return errors or just don’t do anything.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM#hj$ubj()}(hAny drivers that have registered themselves using parport_register_driver() are notified that the port is no longer accessible by having their detach() routines called with **port** as the parameter.h](hAny drivers that have registered themselves using parport_register_driver() are notified that the port is no longer accessible by having their detach() routines called with }(hj %hhhNhNubji)}(h**port**h]hport}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj %ubh as the parameter.}(hj %hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM'hj$ubeh}(h]h ]h"]h$]h&]uh1jChj$hMhjr$ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ'parport_register_dev_model (C function)c.parport_register_dev_modelhNtauh1hhhhhhNhNubh)}(hhh](h)}(hstruct pardevice * parport_register_dev_model (struct parport *port, const char *name, const struct pardev_cb *par_dev_cb, int id)h]h)}(hstruct pardevice *parport_register_dev_model(struct parport *port, const char *name, const struct pardev_cb *par_dev_cb, int id)h](j)}(hjh]hstruct}(hjQ%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM%hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMbubj)}(h h]h }(hj_%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM%hhhj^%hMbubh)}(hhh]h)}(h pardeviceh]h pardevice}(hjp%hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjm%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjr%modnameN classnameNjj)}j]j)}jparport_register_dev_modelsbc.parport_register_dev_modelasbuh1hhjM%hhhj^%hMbubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM%hhhj^%hMbubj)}(hjh]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM%hhhj^%hMbubh)}(hparport_register_dev_modelh]h)}(hj%h]hparport_register_dev_model}(hj%hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj%ubah}(h]h ](hheh"]h$]h&]hhuh1hhjM%hhhj^%hMbubj)}(hT(struct parport *port, const char *name, const struct pardev_cb *par_dev_cb, int id)h](j)}(hstruct parport *porth](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubh)}(hhh]h)}(hparporth]hparport}(hj%hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj%modnameN classnameNjj)}j]j%c.parport_register_dev_modelasbuh1hhj%ubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hjh]h*}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubh)}(hporth]hport}(hj"&hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubj)}(hconst char *nameh](j)}(hjh]hconst}(hj;&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7&ubj)}(h h]h }(hjH&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7&ubjr)}(hcharh]hchar}(hjV&hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj7&ubj)}(h h]h }(hjd&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7&ubj)}(hjh]h*}(hjr&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7&ubh)}(hnameh]hname}(hj&hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj7&ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubj)}(h"const struct pardev_cb *par_dev_cbh](j)}(hjh]hconst}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(hjh]hstruct}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubh)}(hhh]h)}(h pardev_cbh]h pardev_cb}(hj&hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&modnameN classnameNjj)}j]j%c.parport_register_dev_modelasbuh1hhj&ubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(hjh]h*}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubh)}(h par_dev_cbh]h par_dev_cb}(hj 'hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj&ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubj)}(hint idh](jr)}(hinth]hint}(hj#'hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj'ubj)}(h h]h }(hj1'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hidh]hid}(hj?'hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubeh}(h]h ]h"]h$]h&]hhuh1jhjM%hhhj^%hMbubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjI%hhhj^%hMbubah}(h]jD%ah ](jjeh"]h$]h&]j j )j huh1hhj^%hMbhjF%hhubj)}(hhh]j()}(h$register a device on a parallel porth]h$register a device on a parallel port}(hji'hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMbhjf'hhubah}(h]h ]h"]h$]h&]uh1jhjF%hhhj^%hMbubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j'j#j'j$j%j&uh1hhhhhhNhNubj_)}(hX **Parameters** ``struct parport *port`` port to which the device is attached ``const char *name`` a name to refer to the device ``const struct pardev_cb *par_dev_cb`` struct containing callbacks ``int id`` device number to be given to the device **Description** This function, called by parallel port device drivers, declares that a device is connected to a port, and tells the system all it needs to know. The struct pardev_cb contains pointer to callbacks. preemption callback function, **preempt**, is called when this device driver has claimed access to the port but another device driver wants to use it. It is given, **private**, as its parameter, and should return zero if it is willing for the system to release the port to another driver on its behalf. If it wants to keep control of the port it should return non-zero, and no action will be taken. It is good manners for the driver to try to release the port at the earliest opportunity after its preemption callback rejects a preemption attempt. Note that if a preemption callback is happy for preemption to go ahead, there is no need to release the port; it is done automatically. This function may not block, as it may be called from interrupt context. If the device driver does not support preemption, **preempt** can be ``NULL``. The wake-up ("kick") callback function, **wakeup**, is called when the port is available to be claimed for exclusive access; that is, parport_claim() is guaranteed to succeed when called from inside the wake-up callback function. If the driver wants to claim the port it should do so; otherwise, it need not take any action. This function may not block, as it may be called from interrupt context. If the device driver does not want to be explicitly invited to claim the port in this way, **wakeup** can be ``NULL``. The interrupt handler, **irq_func**, is called when an interrupt arrives from the parallel port. Note that if a device driver wants to use interrupts it should use parport_enable_irq(), and can also check the irq member of the parport structure representing the port. The parallel port (lowlevel) driver is the one that has called request_irq() and whose interrupt handler is called first. This handler does whatever needs to be done to the hardware to acknowledge the interrupt (for PC-style ports there is nothing special to be done). It then tells the IEEE 1284 code about the interrupt, which may involve reacting to an IEEE 1284 event depending on the current IEEE 1284 phase. After this, it calls **irq_func**. Needless to say, **irq_func** will be called from interrupt context, and may not block. The ``PARPORT_DEV_EXCL`` flag is for preventing port sharing, and so should only be used when sharing the port with other device drivers is impossible and would lead to incorrect behaviour. Use it sparingly! Normally, **flags** will be zero. This function returns a pointer to a structure that represents the device on the port, or ``NULL`` if there is not enough memory to allocate space for that structure.h](j()}(h**Parameters**h]ji)}(hj'h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMfhj'ubj)}(hhh](j)}(h>``struct parport *port`` port to which the device is attached h](j)}(h``struct parport *port``h]j.)}(hj'h]hstruct parport *port}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj'ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMchj'ubj)}(hhh]j()}(h$port to which the device is attachedh]h$port to which the device is attached}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj'hMchj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'hMchj'ubj)}(h3``const char *name`` a name to refer to the device h](j)}(h``const char *name``h]j.)}(hj'h]hconst char *name}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj'ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMdhj'ubj)}(hhh]j()}(ha name to refer to the deviceh]ha name to refer to the device}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj'hMdhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'hMdhj'ubj)}(hC``const struct pardev_cb *par_dev_cb`` struct containing callbacks h](j)}(h&``const struct pardev_cb *par_dev_cb``h]j.)}(hj(h]h"const struct pardev_cb *par_dev_cb}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj(ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMehj(ubj)}(hhh]j()}(hstruct containing callbacksh]hstruct containing callbacks}(hj5(hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj1(hMehj2(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj1(hMehj'ubj)}(h3``int id`` device number to be given to the device h](j)}(h ``int id``h]j.)}(hjU(h]hint id}(hjW(hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjS(ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMfhjO(ubj)}(hhh]j()}(h'device number to be given to the deviceh]h'device number to be given to the device}(hjn(hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjj(hMfhjk(ubah}(h]h ]h"]h$]h&]uh1jhjO(ubeh}(h]h ]h"]h$]h&]uh1jhjj(hMfhj'ubeh}(h]h ]h"]h$]h&]uh1j~hj'ubj()}(h**Description**h]ji)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhhj'ubjD)}(hX This function, called by parallel port device drivers, declares that a device is connected to a port, and tells the system all it needs to know. The struct pardev_cb contains pointer to callbacks. preemption callback function, **preempt**, is called when this device driver has claimed access to the port but another device driver wants to use it. It is given, **private**, as its parameter, and should return zero if it is willing for the system to release the port to another driver on its behalf. If it wants to keep control of the port it should return non-zero, and no action will be taken. It is good manners for the driver to try to release the port at the earliest opportunity after its preemption callback rejects a preemption attempt. Note that if a preemption callback is happy for preemption to go ahead, there is no need to release the port; it is done automatically. This function may not block, as it may be called from interrupt context. If the device driver does not support preemption, **preempt** can be ``NULL``. The wake-up ("kick") callback function, **wakeup**, is called when the port is available to be claimed for exclusive access; that is, parport_claim() is guaranteed to succeed when called from inside the wake-up callback function. If the driver wants to claim the port it should do so; otherwise, it need not take any action. This function may not block, as it may be called from interrupt context. If the device driver does not want to be explicitly invited to claim the port in this way, **wakeup** can be ``NULL``. The interrupt handler, **irq_func**, is called when an interrupt arrives from the parallel port. Note that if a device driver wants to use interrupts it should use parport_enable_irq(), and can also check the irq member of the parport structure representing the port. The parallel port (lowlevel) driver is the one that has called request_irq() and whose interrupt handler is called first. This handler does whatever needs to be done to the hardware to acknowledge the interrupt (for PC-style ports there is nothing special to be done). It then tells the IEEE 1284 code about the interrupt, which may involve reacting to an IEEE 1284 event depending on the current IEEE 1284 phase. After this, it calls **irq_func**. Needless to say, **irq_func** will be called from interrupt context, and may not block. The ``PARPORT_DEV_EXCL`` flag is for preventing port sharing, and so should only be used when sharing the port with other device drivers is impossible and would lead to incorrect behaviour. Use it sparingly! Normally, **flags** will be zero. This function returns a pointer to a structure that represents the device on the port, or ``NULL`` if there is not enough memory to allocate space for that structure.h](j()}(hThis function, called by parallel port device drivers, declares that a device is connected to a port, and tells the system all it needs to know.h]hThis function, called by parallel port device drivers, declares that a device is connected to a port, and tells the system all it needs to know.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMghj(ubj()}(hXxThe struct pardev_cb contains pointer to callbacks. preemption callback function, **preempt**, is called when this device driver has claimed access to the port but another device driver wants to use it. It is given, **private**, as its parameter, and should return zero if it is willing for the system to release the port to another driver on its behalf. If it wants to keep control of the port it should return non-zero, and no action will be taken. It is good manners for the driver to try to release the port at the earliest opportunity after its preemption callback rejects a preemption attempt. Note that if a preemption callback is happy for preemption to go ahead, there is no need to release the port; it is done automatically. This function may not block, as it may be called from interrupt context. If the device driver does not support preemption, **preempt** can be ``NULL``.h](hRThe struct pardev_cb contains pointer to callbacks. preemption callback function, }(hj(hhhNhNubji)}(h **preempt**h]hpreempt}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(ubh|, is called when this device driver has claimed access to the port but another device driver wants to use it. It is given, }(hj(hhhNhNubji)}(h **private**h]hprivate}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(ubhXx, as its parameter, and should return zero if it is willing for the system to release the port to another driver on its behalf. If it wants to keep control of the port it should return non-zero, and no action will be taken. It is good manners for the driver to try to release the port at the earliest opportunity after its preemption callback rejects a preemption attempt. Note that if a preemption callback is happy for preemption to go ahead, there is no need to release the port; it is done automatically. This function may not block, as it may be called from interrupt context. If the device driver does not support preemption, }(hj(hhhNhNubji)}(h **preempt**h]hpreempt}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(ubh can be }(hj(hhhNhNubj.)}(h``NULL``h]hNULL}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj(ubh.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMkhj(ubj()}(hXThe wake-up ("kick") callback function, **wakeup**, is called when the port is available to be claimed for exclusive access; that is, parport_claim() is guaranteed to succeed when called from inside the wake-up callback function. If the driver wants to claim the port it should do so; otherwise, it need not take any action. This function may not block, as it may be called from interrupt context. If the device driver does not want to be explicitly invited to claim the port in this way, **wakeup** can be ``NULL``.h](h,The wake-up (“kick”) callback function, }(hj)hhhNhNubji)}(h **wakeup**h]hwakeup}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)ubhX, is called when the port is available to be claimed for exclusive access; that is, parport_claim() is guaranteed to succeed when called from inside the wake-up callback function. If the driver wants to claim the port it should do so; otherwise, it need not take any action. This function may not block, as it may be called from interrupt context. If the device driver does not want to be explicitly invited to claim the port in this way, }(hj)hhhNhNubji)}(h **wakeup**h]hwakeup}(hj*)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)ubh can be }(hj)hhhNhNubj.)}(h``NULL``h]hNULL}(hj<)hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMzhj(ubj()}(hX The interrupt handler, **irq_func**, is called when an interrupt arrives from the parallel port. Note that if a device driver wants to use interrupts it should use parport_enable_irq(), and can also check the irq member of the parport structure representing the port.h](hThe interrupt handler, }(hjU)hhhNhNubji)}(h **irq_func**h]hirq_func}(hj])hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjU)ubh, is called when an interrupt arrives from the parallel port. Note that if a device driver wants to use interrupts it should use parport_enable_irq(), and can also check the irq member of the parport structure representing the port.}(hjU)hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj(ubj()}(hXThe parallel port (lowlevel) driver is the one that has called request_irq() and whose interrupt handler is called first. This handler does whatever needs to be done to the hardware to acknowledge the interrupt (for PC-style ports there is nothing special to be done). It then tells the IEEE 1284 code about the interrupt, which may involve reacting to an IEEE 1284 event depending on the current IEEE 1284 phase. After this, it calls **irq_func**. Needless to say, **irq_func** will be called from interrupt context, and may not block.h](hXThe parallel port (lowlevel) driver is the one that has called request_irq() and whose interrupt handler is called first. This handler does whatever needs to be done to the hardware to acknowledge the interrupt (for PC-style ports there is nothing special to be done). It then tells the IEEE 1284 code about the interrupt, which may involve reacting to an IEEE 1284 event depending on the current IEEE 1284 phase. After this, it calls }(hjv)hhhNhNubji)}(h **irq_func**h]hirq_func}(hj~)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjv)ubh. Needless to say, }(hjv)hhhNhNubji)}(h **irq_func**h]hirq_func}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjv)ubh: will be called from interrupt context, and may not block.}(hjv)hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj(ubj()}(hThe ``PARPORT_DEV_EXCL`` flag is for preventing port sharing, and so should only be used when sharing the port with other device drivers is impossible and would lead to incorrect behaviour. Use it sparingly! Normally, **flags** will be zero.h](hThe }(hj)hhhNhNubj.)}(h``PARPORT_DEV_EXCL``h]hPARPORT_DEV_EXCL}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj)ubh flag is for preventing port sharing, and so should only be used when sharing the port with other device drivers is impossible and would lead to incorrect behaviour. Use it sparingly! Normally, }(hj)hhhNhNubji)}(h **flags**h]hflags}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)ubh will be zero.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj(ubj()}(hThis function returns a pointer to a structure that represents the device on the port, or ``NULL`` if there is not enough memory to allocate space for that structure.h](hZThis function returns a pointer to a structure that represents the device on the port, or }(hj)hhhNhNubj.)}(h``NULL``h]hNULL}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj)ubhD if there is not enough memory to allocate space for that structure.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj(ubeh}(h]h ]h"]h$]h&]uh1jChj(hMghj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ&parport_unregister_device (C function)c.parport_unregister_devicehNtauh1hhhhhhNhNubh)}(hhh](h)}(h6void parport_unregister_device (struct pardevice *dev)h]h)}(h5void parport_unregister_device(struct pardevice *dev)h](jr)}(hvoidh]hvoid}(hj#*hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj*hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM-ubj)}(h h]h }(hj2*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj1*hM-ubh)}(hparport_unregister_deviceh]h)}(hparport_unregister_deviceh]hparport_unregister_device}(hjD*hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj@*ubah}(h]h ](hheh"]h$]h&]hhuh1hhj*hhhj1*hM-ubj)}(h(struct pardevice *dev)h]j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hj`*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\*ubj)}(h h]h }(hjm*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\*ubh)}(hhh]h)}(h pardeviceh]h pardevice}(hj~*hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj{*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j)}jjF*sbc.parport_unregister_deviceasbuh1hhj\*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\*ubj)}(hjh]h*}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\*ubh)}(hdevh]hdev}(hj*hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj\*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjX*ubah}(h]h ]h"]h$]h&]hhuh1jhj*hhhj1*hM-ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj*hhhj1*hM-ubah}(h]j*ah ](jjeh"]h$]h&]j j )j huh1hhj1*hM-hj*hhubj)}(hhh]j()}(h&deregister a device on a parallel porth]h&deregister a device on a parallel port}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM-hj*hhubah}(h]h ]h"]h$]h&]uh1jhj*hhhj1*hM-ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j*j#j*j$j%j&uh1hhhhhhNhNubj_)}(h**Parameters** ``struct pardevice *dev`` pointer to structure representing device **Description** This undoes the effect of parport_register_device().h](j()}(h**Parameters**h]ji)}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM1hj*ubj)}(hhh]j)}(hC``struct pardevice *dev`` pointer to structure representing device h](j)}(h``struct pardevice *dev``h]j.)}(hj$+h]hstruct pardevice *dev}(hj&+hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj"+ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM.hj+ubj)}(hhh]j()}(h(pointer to structure representing deviceh]h(pointer to structure representing device}(hj=+hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj9+hM.hj:+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj9+hM.hj+ubah}(h]h ]h"]h$]h&]uh1j~hj*ubj()}(h**Description**h]ji)}(hj_+h]h Description}(hja+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]+ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM0hj*ubjD)}(h4This undoes the effect of parport_register_device().h]j()}(hjw+h]h4This undoes the effect of parport_register_device().}(hjy+hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM/hju+ubah}(h]h ]h"]h$]h&]uh1jChj+hM/hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ parport_find_number (C function)c.parport_find_numberhNtauh1hhhhhhNhNubh)}(hhh](h)}(h1struct parport * parport_find_number (int number)h]h)}(h/struct parport *parport_find_number(int number)h](j)}(hjh]hstruct}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMsubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj+hMsubh)}(hhh]h)}(hparporth]hparport}(hj+hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+modnameN classnameNjj)}j]j)}jparport_find_numbersbc.parport_find_numberasbuh1hhj+hhhj+hMsubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj+hMsubj)}(hjh]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj+hMsubh)}(hparport_find_numberh]h)}(hj+h]hparport_find_number}(hj ,hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj,ubah}(h]h ](hheh"]h$]h&]hhuh1hhj+hhhj+hMsubj)}(h (int number)h]j)}(h int numberh](jr)}(hinth]hint}(hj',hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj#,ubj)}(h h]h }(hj5,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#,ubh)}(hnumberh]hnumber}(hjC,hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubah}(h]h ]h"]h$]h&]hhuh1jhj+hhhj+hMsubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj+hhhj+hMsubah}(h]j+ah ](jjeh"]h$]h&]j j )j huh1hhj+hMshj+hhubj)}(hhh]j()}(hfind a parallel port by numberh]hfind a parallel port by number}(hjm,hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMshjj,hhubah}(h]h ]h"]h$]h&]uh1jhj+hhhj+hMsubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j,j#j,j$j%j&uh1hhhhhhNhNubj_)}(hXU**Parameters** ``int number`` parallel port number **Description** This returns the parallel port with the specified number, or ``NULL`` if there is none. There is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_number() gives you, use parport_put_port().h](j()}(h**Parameters**h]ji)}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMwhj,ubj)}(hhh]j)}(h$``int number`` parallel port number h](j)}(h``int number``h]j.)}(hj,h]h int number}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj,ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMthj,ubj)}(hhh]j()}(hparallel port numberh]hparallel port number}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj,hMthj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMthj,ubah}(h]h ]h"]h$]h&]uh1j~hj,ubj()}(h**Description**h]ji)}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMvhj,ubjD)}(hThis returns the parallel port with the specified number, or ``NULL`` if there is none. There is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_number() gives you, use parport_put_port().h](j()}(hWThis returns the parallel port with the specified number, or ``NULL`` if there is none.h](h=This returns the parallel port with the specified number, or }(hj-hhhNhNubj.)}(h``NULL``h]hNULL}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj-ubh if there is none.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMuhj,ubj()}(hThere is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_number() gives you, use parport_put_port().h]hThere is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_number() gives you, use parport_put_port().}(hj$-hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMxhj,ubeh}(h]h ]h"]h$]h&]uh1jChj#-hMuhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_find_base (C function)c.parport_find_basehNtauh1hhhhhhNhNubh)}(hhh](h)}(h7struct parport * parport_find_base (unsigned long base)h]h)}(h5struct parport *parport_find_base(unsigned long base)h](j)}(hjh]hstruct}(hjY-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU-hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMubj)}(h h]h }(hjg-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU-hhhjf-hMubh)}(hhh]h)}(hparporth]hparport}(hjx-hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhju-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjz-modnameN classnameNjj)}j]j)}jparport_find_basesbc.parport_find_baseasbuh1hhjU-hhhjf-hMubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU-hhhjf-hMubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU-hhhjf-hMubh)}(hparport_find_baseh]h)}(hj-h]hparport_find_base}(hj-hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj-ubah}(h]h ](hheh"]h$]h&]hhuh1hhjU-hhhjf-hMubj)}(h(unsigned long base)h]j)}(hunsigned long baseh](jr)}(hunsignedh]hunsigned}(hj-hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjr)}(hlongh]hlong}(hj-hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubh)}(hbaseh]hbase}(hj .hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj-ubah}(h]h ]h"]h$]h&]hhuh1jhjU-hhhjf-hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjQ-hhhjf-hMubah}(h]jL-ah ](jjeh"]h$]h&]j j )j huh1hhjf-hMhjN-hhubj)}(hhh]j()}(h$find a parallel port by base addressh]h$find a parallel port by base address}(hj5.hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj2.hhubah}(h]h ]h"]h$]h&]uh1jhjN-hhhjf-hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jM.j#jM.j$j%j&uh1hhhhhhNhNubj_)}(hX]**Parameters** ``unsigned long base`` base I/O address **Description** This returns the parallel port with the specified base address, or ``NULL`` if there is none. There is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_base() gives you, use parport_put_port().h](j()}(h**Parameters**h]ji)}(hjW.h]h Parameters}(hjY.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjU.ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjQ.ubj)}(hhh]j)}(h(``unsigned long base`` base I/O address h](j)}(h``unsigned long base``h]j.)}(hjv.h]hunsigned long base}(hjx.hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjt.ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjp.ubj)}(hhh]j()}(hbase I/O addressh]hbase I/O address}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jhjp.ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhjm.ubah}(h]h ]h"]h$]h&]uh1j~hjQ.ubj()}(h**Description**h]ji)}(hj.h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj.ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjQ.ubjD)}(hThis returns the parallel port with the specified base address, or ``NULL`` if there is none. There is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_base() gives you, use parport_put_port().h](j()}(h]This returns the parallel port with the specified base address, or ``NULL`` if there is none.h](hCThis returns the parallel port with the specified base address, or }(hj.hhhNhNubj.)}(h``NULL``h]hNULL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj.ubh if there is none.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj.ubj()}(hThere is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_base() gives you, use parport_put_port().h]hThere is an implicit parport_get_port() done already; to throw away the reference to the port that parport_find_base() gives you, use parport_put_port().}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj.ubeh}(h]h ]h"]h$]h&]uh1jChj.hMhjQ.ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_claim (C function)c.parport_claimhNtauh1hhhhhhNhNubh)}(hhh](h)}(h)int parport_claim (struct pardevice *dev)h]h)}(h(int parport_claim(struct pardevice *dev)h](jr)}(hinth]hint}(hj!/hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj/hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMubj)}(h h]h }(hj0/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj//hMubh)}(h parport_claimh]h)}(h parport_claimh]h parport_claim}(hjB/hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj>/ubah}(h]h ](hheh"]h$]h&]hhuh1hhj/hhhj//hMubj)}(h(struct pardevice *dev)h]j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hj^/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ/ubj)}(h h]h }(hjk/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ/ubh)}(hhh]h)}(h pardeviceh]h pardevice}(hj|/hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjy/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj~/modnameN classnameNjj)}j]j)}jjD/sbc.parport_claimasbuh1hhjZ/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ/ubj)}(hjh]h*}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ/ubh)}(hdevh]hdev}(hj/hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjZ/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjV/ubah}(h]h ]h"]h$]h&]hhuh1jhj/hhhj//hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj/hhhj//hMubah}(h]j/ah ](jjeh"]h$]h&]j j )j huh1hhj//hMhj/hhubj)}(hhh]j()}(h&claim access to a parallel port deviceh]h&claim access to a parallel port device}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj/hhubah}(h]h ]h"]h$]h&]uh1jhj/hhhj//hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j/j#j/j$j%j&uh1hhhhhhNhNubj_)}(hX**Parameters** ``struct pardevice *dev`` pointer to structure representing a device on the port **Description** This function will not block and so can be used from interrupt context. If parport_claim() succeeds in claiming access to the port it returns zero and the port is available to use. It may fail (returning non-zero) if the port is in use by another driver and that driver is not willing to relinquish control of the port.h](j()}(h**Parameters**h]ji)}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj/ubj)}(hhh]j)}(hQ``struct pardevice *dev`` pointer to structure representing a device on the port h](j)}(h``struct pardevice *dev``h]j.)}(hj"0h]hstruct pardevice *dev}(hj$0hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj 0ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj0ubj)}(hhh]j()}(h6pointer to structure representing a device on the porth]h6pointer to structure representing a device on the port}(hj;0hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj70hMhj80ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj70hMhj0ubah}(h]h ]h"]h$]h&]uh1j~hj/ubj()}(h**Description**h]ji)}(hj]0h]h Description}(hj_0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[0ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhj/ubjD)}(hXAThis function will not block and so can be used from interrupt context. If parport_claim() succeeds in claiming access to the port it returns zero and the port is available to use. It may fail (returning non-zero) if the port is in use by another driver and that driver is not willing to relinquish control of the port.h]j()}(hXAThis function will not block and so can be used from interrupt context. If parport_claim() succeeds in claiming access to the port it returns zero and the port is available to use. It may fail (returning non-zero) if the port is in use by another driver and that driver is not willing to relinquish control of the port.h]hXAThis function will not block and so can be used from interrupt context. If parport_claim() succeeds in claiming access to the port it returns zero and the port is available to use. It may fail (returning non-zero) if the port is in use by another driver and that driver is not willing to relinquish control of the port.}(hjw0hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhjs0ubah}(h]h ]h"]h$]h&]uh1jChj0hMhj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ#parport_claim_or_block (C function)c.parport_claim_or_blockhNtauh1hhhhhhNhNubh)}(hhh](h)}(h2int parport_claim_or_block (struct pardevice *dev)h]h)}(h1int parport_claim_or_block(struct pardevice *dev)h](jr)}(hinth]hint}(hj0hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj0hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM%ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhj0hM%ubh)}(hparport_claim_or_blockh]h)}(hparport_claim_or_blockh]hparport_claim_or_block}(hj0hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj0ubah}(h]h ](hheh"]h$]h&]hhuh1hhj0hhhj0hM%ubj)}(h(struct pardevice *dev)h]j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubh)}(hhh]h)}(h pardeviceh]h pardevice}(hj1hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj 1modnameN classnameNjj)}j]j)}jj0sbc.parport_claim_or_blockasbuh1hhj0ubj)}(h h]h }(hj'1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(hjh]h*}(hj51hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubh)}(hdevh]hdev}(hjB1hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj0ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj0ubah}(h]h ]h"]h$]h&]hhuh1jhj0hhhj0hM%ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj0hhhj0hM%ubah}(h]j0ah ](jjeh"]h$]h&]j j )j huh1hhj0hM%hj0hhubj)}(hhh]j()}(h&claim access to a parallel port deviceh]h&claim access to a parallel port device}(hjl1hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM%hji1hhubah}(h]h ]h"]h$]h&]uh1jhj0hhhj0hM%ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j1j#j1j$j%j&uh1hhhhhhNhNubj_)}(hXt**Parameters** ``struct pardevice *dev`` pointer to structure representing a device on the port **Description** This behaves like parport_claim(), but will block if necessary to wait for the port to be free. A return value of 1 indicates that it slept; 0 means that it succeeded without needing to sleep. A negative error code indicates failure.h](j()}(h**Parameters**h]ji)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM)hj1ubj)}(hhh]j)}(hQ``struct pardevice *dev`` pointer to structure representing a device on the port h](j)}(h``struct pardevice *dev``h]j.)}(hj1h]hstruct pardevice *dev}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj1ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM&hj1ubj)}(hhh]j()}(h6pointer to structure representing a device on the porth]h6pointer to structure representing a device on the port}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj1hM&hj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hM&hj1ubah}(h]h ]h"]h$]h&]uh1j~hj1ubj()}(h**Description**h]ji)}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM(hj1ubjD)}(hThis behaves like parport_claim(), but will block if necessary to wait for the port to be free. A return value of 1 indicates that it slept; 0 means that it succeeded without needing to sleep. A negative error code indicates failure.h]j()}(hThis behaves like parport_claim(), but will block if necessary to wait for the port to be free. A return value of 1 indicates that it slept; 0 means that it succeeded without needing to sleep. A negative error code indicates failure.h]hThis behaves like parport_claim(), but will block if necessary to wait for the port to be free. A return value of 1 indicates that it slept; 0 means that it succeeded without needing to sleep. A negative error code indicates failure.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chM'hj1ubah}(h]h ]h"]h$]h&]uh1jChj2hM'hj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_release (C function)c.parport_releasehNtauh1hhhhhhNhNubh)}(hhh](h)}(h,void parport_release (struct pardevice *dev)h]h)}(h+void parport_release(struct pardevice *dev)h](jr)}(hvoidh]hvoid}(hj72hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj32hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMgubj)}(h h]h }(hjF2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj32hhhjE2hMgubh)}(hparport_releaseh]h)}(hparport_releaseh]hparport_release}(hjX2hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjT2ubah}(h]h ](hheh"]h$]h&]hhuh1hhj32hhhjE2hMgubj)}(h(struct pardevice *dev)h]j)}(hstruct pardevice *devh](j)}(hjh]hstruct}(hjt2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp2ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp2ubh)}(hhh]h)}(h pardeviceh]h pardevice}(hj2hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2modnameN classnameNjj)}j]j)}jjZ2sbc.parport_releaseasbuh1hhjp2ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp2ubj)}(hjh]h*}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp2ubh)}(hdevh]hdev}(hj2hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjp2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjl2ubah}(h]h ]h"]h$]h&]hhuh1jhj32hhhjE2hMgubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj/2hhhjE2hMgubah}(h]j*2ah ](jjeh"]h$]h&]j j )j huh1hhjE2hMghj,2hhubj)}(hhh]j()}(h(give up access to a parallel port deviceh]h(give up access to a parallel port device}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMghj2hhubah}(h]h ]h"]h$]h&]uh1jhj,2hhhjE2hMgubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j3j#j3j$j%j&uh1hhhhhhNhNubj_)}(hX%**Parameters** ``struct pardevice *dev`` pointer to structure representing parallel port device **Description** This function cannot fail, but it should not be called without the port claimed. Similarly, if the port is already claimed you should not try claiming it again.h](j()}(h**Parameters**h]ji)}(hj3h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMkhj3ubj)}(hhh]j)}(hQ``struct pardevice *dev`` pointer to structure representing parallel port device h](j)}(h``struct pardevice *dev``h]j.)}(hj83h]hstruct pardevice *dev}(hj:3hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj63ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMhhj23ubj)}(hhh]j()}(h6pointer to structure representing parallel port deviceh]h6pointer to structure representing parallel port device}(hjQ3hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjM3hMhhjN3ubah}(h]h ]h"]h$]h&]uh1jhj23ubeh}(h]h ]h"]h$]h&]uh1jhjM3hMhhj/3ubah}(h]h ]h"]h$]h&]uh1j~hj3ubj()}(h**Description**h]ji)}(hjs3h]h Description}(hju3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjq3ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMjhj3ubjD)}(hThis function cannot fail, but it should not be called without the port claimed. Similarly, if the port is already claimed you should not try claiming it again.h]j()}(hThis function cannot fail, but it should not be called without the port claimed. Similarly, if the port is already claimed you should not try claiming it again.h]hThis function cannot fail, but it should not be called without the port claimed. Similarly, if the port is already claimed you should not try claiming it again.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:10: ./drivers/parport/share.chMihj3ubah}(h]h ]h"]h$]h&]uh1jChj3hMihj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČparport_open (C function)c.parport_openhNtauh1hhhhhhNhNubh)}(hhh](h)}(h>struct pardevice * parport_open (int devnum, const char *name)h]h)}(h7ubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:13: ./drivers/parport/daisy.chM"hj6ubjD)}(hYThis is to parport_open() as parport_unregister_device() is to parport_register_device().h]j()}(hYThis is to parport_open() as parport_unregister_device() is to parport_register_device().h]hYThis is to parport_open() as parport_unregister_device() is to parport_register_device().}(hjZ7hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h`/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:13: ./drivers/parport/daisy.chM!hjV7ubah}(h]h ]h"]h$]h&]uh1jChjh7hM!hj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hhhhhNhNubeh}(h]parallel-port-devicesah ]h"]parallel port devicesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h16x50 UART Driverh]h16x50 UART Driver}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~7hhhhhKubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ serial8250_get_port (C function)c.serial8250_get_porthNtauh1hhj~7hhhNhNubh)}(hhh](h)}(h6struct uart_8250_port * serial8250_get_port (int line)h]h)}(h4struct uart_8250_port *serial8250_get_port(int line)h](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMBubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhj7hMBubh)}(hhh]h)}(huart_8250_porth]huart_8250_port}(hj7hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]j)}jserial8250_get_portsbc.serial8250_get_portasbuh1hhj7hhhj7hMBubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhj7hMBubj)}(hjh]h*}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhj7hMBubh)}(hserial8250_get_porth]h)}(hj7h]hserial8250_get_port}(hj8hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj8ubah}(h]h ](hheh"]h$]h&]hhuh1hhj7hhhj7hMBubj)}(h (int line)h]j)}(hint lineh](jr)}(hinth]hint}(hj"8hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj8ubj)}(h h]h }(hj08hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubh)}(hlineh]hline}(hj>8hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubah}(h]h ]h"]h$]h&]hhuh1jhj7hhhj7hMBubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj7hhhj7hMBubah}(h]j7ah ](jjeh"]h$]h&]j j )j huh1hhj7hMBhj7hhubj)}(hhh]j()}(hretrieve struct uart_8250_porth]hretrieve struct uart_8250_port}(hjh8hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMBhje8hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj7hMBubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j8j#j8j$j%j&uh1hhhhj~7hNhNubj_)}(hX**Parameters** ``int line`` serial line number **Description** This function retrieves struct uart_8250_port for the specific line. This struct *must* *not* be used to perform a 8250 or serial core operation which is not accessible otherwise. Its only purpose is to make the struct accessible to the runtime-pm callbacks for context suspend/restore. The lock assumption made here is none because runtime-pm suspend/resume callbacks should not be invoked if there is any operation performed on the port.h](j()}(h**Parameters**h]ji)}(hj8h]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMFhj8ubj)}(hhh]j)}(h ``int line`` serial line number h](j)}(h ``int line``h]j.)}(hj8h]hint line}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj8ubah}(h]h ]h"]h$]h&]uh1jhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMChj8ubj)}(hhh]j()}(hserial line numberh]hserial line number}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj8hMChj8ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhj8hMChj8ubah}(h]h ]h"]h$]h&]uh1j~hj8ubj()}(h**Description**h]ji)}(hj8h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMEhj8ubj()}(hXThis function retrieves struct uart_8250_port for the specific line. This struct *must* *not* be used to perform a 8250 or serial core operation which is not accessible otherwise. Its only purpose is to make the struct accessible to the runtime-pm callbacks for context suspend/restore. The lock assumption made here is none because runtime-pm suspend/resume callbacks should not be invoked if there is any operation performed on the port.h](hQThis function retrieves struct uart_8250_port for the specific line. This struct }(hj8hhhNhNubhemphasis)}(h*must*h]hmust}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj8ubh }(hj8hhhNhNubj9)}(h*not*h]hnot}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj8ubhXZ be used to perform a 8250 or serial core operation which is not accessible otherwise. Its only purpose is to make the struct accessible to the runtime-pm callbacks for context suspend/restore. The lock assumption made here is none because runtime-pm suspend/resume callbacks should not be invoked if there is any operation performed on the port.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMDhj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj~7hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ$serial8250_suspend_port (C function)c.serial8250_suspend_porthNtauh1hhj~7hhhNhNubh)}(hhh](h)}(h'void serial8250_suspend_port (int line)h]h)}(h&void serial8250_suspend_port(int line)h](jr)}(hvoidh]hvoid}(hjO9hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjK9hhhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMBubj)}(h h]h }(hj^9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK9hhhj]9hMBubh)}(hserial8250_suspend_porth]h)}(hserial8250_suspend_porth]hserial8250_suspend_port}(hjp9hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjl9ubah}(h]h ](hheh"]h$]h&]hhuh1hhjK9hhhj]9hMBubj)}(h (int line)h]j)}(hint lineh](jr)}(hinth]hint}(hj9hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj9ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubh)}(hlineh]hline}(hj9hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj9ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj9ubah}(h]h ]h"]h$]h&]hhuh1jhjK9hhhj]9hMBubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjG9hhhj]9hMBubah}(h]jB9ah ](jjeh"]h$]h&]j j )j huh1hhj]9hMBhjD9hhubj)}(hhh]j()}(hsuspend one serial porth]hsuspend one serial port}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMBhj9hhubah}(h]h ]h"]h$]h&]uh1jhjD9hhhj]9hMBubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j9j#j9j$j%j&uh1hhhhj~7hNhNubj_)}(ha**Parameters** ``int line`` serial line number **Description** Suspend one serial port.h](j()}(h**Parameters**h]ji)}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMFhj9ubj)}(hhh]j)}(h ``int line`` serial line number h](j)}(h ``int line``h]j.)}(hj:h]hint line}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj:ubah}(h]h ]h"]h$]h&]uh1jhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMChj :ubj)}(hhh]j()}(hserial line numberh]hserial line number}(hj,:hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj(:hMChj):ubah}(h]h ]h"]h$]h&]uh1jhj :ubeh}(h]h ]h"]h$]h&]uh1jhj(:hMChj :ubah}(h]h ]h"]h$]h&]uh1j~hj9ubj()}(h**Description**h]ji)}(hjN:h]h Description}(hjP:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjL:ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMEhj9ubjD)}(hSuspend one serial port.h]j()}(hjf:h]hSuspend one serial port.}(hjh:hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMDhjd:ubah}(h]h ]h"]h$]h&]uh1jChju:hMDhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj~7hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ#serial8250_resume_port (C function)c.serial8250_resume_porthNtauh1hhj~7hhhNhNubh)}(hhh](h)}(h&void serial8250_resume_port (int line)h]h)}(h%void serial8250_resume_port(int line)h](jr)}(hvoidh]hvoid}(hj:hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj:hhhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMZubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhj:hMZubh)}(hserial8250_resume_porth]h)}(hserial8250_resume_porth]hserial8250_resume_port}(hj:hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj:ubah}(h]h ](hheh"]h$]h&]hhuh1hhj:hhhj:hMZubj)}(h (int line)h]j)}(hint lineh](jr)}(hinth]hint}(hj:hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubh)}(hlineh]hline}(hj:hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj:ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:ubah}(h]h ]h"]h$]h&]hhuh1jhj:hhhj:hMZubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj:hhhj:hMZubah}(h]j:ah ](jjeh"]h$]h&]j j )j huh1hhj:hMZhj:hhubj)}(hhh]j()}(hresume one serial porth]hresume one serial port}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMZhj;hhubah}(h]h ]h"]h$]h&]uh1jhj:hhhj:hMZubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j7;j#j7;j$j%j&uh1hhhhj~7hNhNubj_)}(h`**Parameters** ``int line`` serial line number **Description** Resume one serial port.h](j()}(h**Parameters**h]ji)}(hjA;h]h Parameters}(hjC;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?;ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chM^hj;;ubj)}(hhh]j)}(h ``int line`` serial line number h](j)}(h ``int line``h]j.)}(hj`;h]hint line}(hjb;hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj^;ubah}(h]h ]h"]h$]h&]uh1jhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chM[hjZ;ubj)}(hhh]j()}(hserial line numberh]hserial line number}(hjy;hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hju;hM[hjv;ubah}(h]h ]h"]h$]h&]uh1jhjZ;ubeh}(h]h ]h"]h$]h&]uh1jhju;hM[hjW;ubah}(h]h ]h"]h$]h&]uh1j~hj;;ubj()}(h**Description**h]ji)}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chM]hj;;ubjD)}(hResume one serial port.h]j()}(hj;h]hResume one serial port.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chM\hj;ubah}(h]h ]h"]h$]h&]uh1jChj;hM\hj;;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj~7hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ*serial8250_register_8250_port (C function)c.serial8250_register_8250_porthNtauh1hhj~7hhhNhNubh)}(hhh](h)}(hCint serial8250_register_8250_port (const struct uart_8250_port *up)h]h)}(hBint serial8250_register_8250_port(const struct uart_8250_port *up)h](jr)}(hinth]hint}(hj;hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj;hhhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMubj)}(h h]h }(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;hhhj;hMubh)}(hserial8250_register_8250_porth]h)}(hserial8250_register_8250_porth]hserial8250_register_8250_port}(hj <hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj<ubah}(h]h ](hheh"]h$]h&]hhuh1hhj;hhhj;hMubj)}(h!(const struct uart_8250_port *up)h]j)}(hconst struct uart_8250_port *uph](j)}(hjh]hconst}(hj&<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubj)}(h h]h }(hj3<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubj)}(hjh]hstruct}(hjA<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubj)}(h h]h }(hjN<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubh)}(hhh]h)}(huart_8250_porth]huart_8250_port}(hj_<hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj\<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetja<modnameN classnameNjj)}j]j)}jj <sbc.serial8250_register_8250_portasbuh1hhj"<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubj)}(hjh]h*}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"<ubh)}(huph]hup}(hj<hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj"<ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj<ubah}(h]h ]h"]h$]h&]hhuh1jhj;hhhj;hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj;hhhj;hMubah}(h]j;ah ](jjeh"]h$]h&]j j )j huh1hhj;hMhj;hhubj)}(hhh]j()}(hregister a serial porth]hregister a serial port}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhj<hhubah}(h]h ]h"]h$]h&]uh1jhj;hhhj;hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j<j#j<j$j%j&uh1hhhhj~7hNhNubj_)}(hX**Parameters** ``const struct uart_8250_port *up`` serial port template **Description** Configure the serial port specified by the request. If the port exists and is in use, it is hung up and unregistered first. The port is then probed and if necessary the IRQ is autodetected If this fails an error is returned. On success the port is ready to use and the line number is returned.h](j()}(h**Parameters**h]ji)}(hj<h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhj<ubj)}(hhh]j)}(h9``const struct uart_8250_port *up`` serial port template h](j)}(h#``const struct uart_8250_port *up``h]j.)}(hj=h]hconst struct uart_8250_port *up}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj=ubah}(h]h ]h"]h$]h&]uh1jhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhj<ubj)}(hhh]j()}(hserial port templateh]hserial port template}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj=hMhj=ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhj=hMhj<ubah}(h]h ]h"]h$]h&]uh1j~hj<ubj()}(h**Description**h]ji)}(hj@=h]h Description}(hjB=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>=ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhj<ubjD)}(hX'Configure the serial port specified by the request. If the port exists and is in use, it is hung up and unregistered first. The port is then probed and if necessary the IRQ is autodetected If this fails an error is returned. On success the port is ready to use and the line number is returned.h](j()}(h{Configure the serial port specified by the request. If the port exists and is in use, it is hung up and unregistered first.h]h{Configure the serial port specified by the request. If the port exists and is in use, it is hung up and unregistered first.}(hjZ=hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhjV=ubj()}(hdThe port is then probed and if necessary the IRQ is autodetected If this fails an error is returned.h]hdThe port is then probed and if necessary the IRQ is autodetected If this fails an error is returned.}(hji=hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhjV=ubj()}(hDOn success the port is ready to use and the line number is returned.h]hDOn success the port is ready to use and the line number is returned.}(hjx=hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhjV=ubeh}(h]h ]h"]h$]h&]uh1jChjh=hMhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj~7hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ'serial8250_unregister_port (C function)c.serial8250_unregister_porthNtauh1hhj~7hhhNhNubh)}(hhh](h)}(h*void serial8250_unregister_port (int line)h]h)}(h)void serial8250_unregister_port(int line)h](jr)}(hvoidh]hvoid}(hj=hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj=hhhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMgubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhj=hMgubh)}(hserial8250_unregister_porth]h)}(hserial8250_unregister_porth]hserial8250_unregister_port}(hj=hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj=ubah}(h]h ](hheh"]h$]h&]hhuh1hhj=hhhj=hMgubj)}(h (int line)h]j)}(hint lineh](jr)}(hinth]hint}(hj=hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj=ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubh)}(hlineh]hline}(hj>hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj=ubah}(h]h ]h"]h$]h&]hhuh1jhj=hhhj=hMgubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj=hhhj=hMgubah}(h]j=ah ](jjeh"]h$]h&]j j )j huh1hhj=hMghj=hhubj)}(hhh]j()}(h%remove a 16x50 serial port at runtimeh]h%remove a 16x50 serial port at runtime}(hj0>hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMghj->hhubah}(h]h ]h"]h$]h&]uh1jhj=hhhj=hMgubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jH>j#jH>j$j%j&uh1hhhhj~7hNhNubj_)}(h**Parameters** ``int line`` serial line number **Description** Remove one serial port. This may not be called from interrupt context. We hand the port back to the our control.h](j()}(h**Parameters**h]ji)}(hjR>h]h Parameters}(hjT>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjP>ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMkhjL>ubj)}(hhh]j)}(h ``int line`` serial line number h](j)}(h ``int line``h]j.)}(hjq>h]hint line}(hjs>hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjo>ubah}(h]h ]h"]h$]h&]uh1jhl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMhhjk>ubj)}(hhh]j()}(hserial line numberh]hserial line number}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj>hMhhj>ubah}(h]h ]h"]h$]h&]uh1jhjk>ubeh}(h]h ]h"]h$]h&]uh1jhj>hMhhjh>ubah}(h]h ]h"]h$]h&]uh1j~hjL>ubj()}(h**Description**h]ji)}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>ubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMjhjL>ubjD)}(hrRemove one serial port. This may not be called from interrupt context. We hand the port back to the our control.h]j()}(hrRemove one serial port. This may not be called from interrupt context. We hand the port back to the our control.h]hrRemove one serial port. This may not be called from interrupt context. We hand the port back to the our control.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hl/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:19: ./drivers/tty/serial/8250/8250_core.chMihj>ubah}(h]h ]h"]h$]h&]uh1jChj>hMihjL>ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj~7hhhNhNubj()}(h'See serial/driver.rst for related APIs.h]h'See serial/driver.rst for related APIs.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hhhKhj~7hhubeh}(h]x50-uart-driverah ]h"]16x50 uart driverah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hPulse-Width Modulation (PWM)h]hPulse-Width Modulation (PWM)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhKubj()}(hpPulse-width modulation is a modulation technique primarily used to control power supplied to electrical devices.h]hpPulse-width modulation is a modulation technique primarily used to control power supplied to electrical devices.}(hj ?hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hhhKhj>hhubj()}(hXNThe PWM framework provides an abstraction for providers and consumers of PWM signals. A controller that provides one or more PWM signals is registered as :c:type:`struct pwm_chip `. Providers are expected to embed this structure in a driver-specific structure. This structure contains fields that describe a particular chip.h](hThe PWM framework provides an abstraction for providers and consumers of PWM signals. A controller that provides one or more PWM signals is registered as }(hj?hhhNhNubh)}(h$:c:type:`struct pwm_chip `h]j.)}(hj!?h]hstruct pwm_chip}(hj#?hhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1j-hj?ubah}(h]h ]h"]h$]h&]refdocdriver-api/miscellaneous refdomainjreftypetype refexplicitrefwarnjj)}j]sb reftargetpwm_chipuh1hhhhKhj?ubh. Providers are expected to embed this structure in a driver-specific structure. This structure contains fields that describe a particular chip.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hhhKhj>hhubj()}(hA chip exposes one or more PWM signal sources, each of which exposed as a :c:type:`struct pwm_device `. Operations can be performed on PWM devices to control the period, duty cycle, polarity and active state of the signal.h](hJA chip exposes one or more PWM signal sources, each of which exposed as a }(hjN?hhhNhNubh)}(h(:c:type:`struct pwm_device `h]j.)}(hjX?h]hstruct pwm_device}(hjZ?hhhNhNubah}(h]h ](j-?jc-typeeh"]h$]h&]uh1j-hjV?ubah}(h]h ]h"]h$]h&]refdocj9? refdomainjreftypetype refexplicitrefwarnjj??jB? pwm_deviceuh1hhhhK$hjN?ubhx. Operations can be performed on PWM devices to control the period, duty cycle, polarity and active state of the signal.}(hjN?hhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hhhK$hj>hhubj()}(hfNote that PWM devices are exclusive resources: they can always only be used by one consumer at a time.h]hfNote that PWM devices are exclusive resources: they can always only be used by one consumer at a time.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hhhK)hj>hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_polarity (C enum)c.pwm_polarityhNtauh1hhj>hhhNhNubh)}(hhh](h)}(h pwm_polarityh]h)}(henum pwm_polarityh](j)}(henumh]henum}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hKubh)}(h pwm_polarityh]h)}(hj?h]h pwm_polarity}(hj?hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj?ubah}(h]h ](hheh"]h$]h&]hhuh1hhj?hhhj?hKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj?hhhj?hKubah}(h]j?ah ](jjeh"]h$]h&]j j )j huh1hhj?hKhj?hhubj)}(hhh]j()}(hpolarity of a PWM signalh]hpolarity of a PWM signal}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj?hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hKubeh}(h]h ](jenumeh"]h$]h&]j!jj"j@j#j@j$j%j&uh1hhhhj>hNhNubj_)}(hX1**Constants** ``PWM_POLARITY_NORMAL`` a high signal for the duration of the duty- cycle, followed by a low signal for the remainder of the pulse period ``PWM_POLARITY_INVERSED`` a low signal for the duration of the duty- cycle, followed by a high signal for the remainder of the pulse periodh](j()}(h **Constants**h]ji)}(hj @h]h Constants}(hj @hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj @ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj@ubj)}(hhh](j)}(h``PWM_POLARITY_NORMAL`` a high signal for the duration of the duty- cycle, followed by a low signal for the remainder of the pulse period h](j)}(h``PWM_POLARITY_NORMAL``h]j.)}(hj*@h]hPWM_POLARITY_NORMAL}(hj,@hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj(@ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj$@ubj)}(hhh]j()}(hqa high signal for the duration of the duty- cycle, followed by a low signal for the remainder of the pulse periodh]hqa high signal for the duration of the duty- cycle, followed by a low signal for the remainder of the pulse period}(hjC@hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj@@ubah}(h]h ]h"]h$]h&]uh1jhj$@ubeh}(h]h ]h"]h$]h&]uh1jhj?@hKhj!@ubj)}(h``PWM_POLARITY_INVERSED`` a low signal for the duration of the duty- cycle, followed by a high signal for the remainder of the pulse periodh](j)}(h``PWM_POLARITY_INVERSED``h]j.)}(hjd@h]hPWM_POLARITY_INVERSED}(hjf@hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjb@ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj^@ubj)}(hhh]j()}(hqa low signal for the duration of the duty- cycle, followed by a high signal for the remainder of the pulse periodh]hqa low signal for the duration of the duty- cycle, followed by a high signal for the remainder of the pulse period}(hj}@hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjz@ubah}(h]h ]h"]h$]h&]uh1jhj^@ubeh}(h]h ]h"]h$]h&]uh1jhjy@hKhj!@ubeh}(h]h ]h"]h$]h&]uh1j~hj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_args (C struct) c.pwm_argshNtauh1hhj>hhhNhNubh)}(hhh](h)}(hpwm_argsh]h)}(hstruct pwm_argsh](j)}(hjh]hstruct}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK$ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhj@hK$ubh)}(hpwm_argsh]h)}(hj@h]hpwm_args}(hj@hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj@ubah}(h]h ](hheh"]h$]h&]hhuh1hhj@hhhj@hK$ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj@hhhj@hK$ubah}(h]j@ah ](jjeh"]h$]h&]j j )j huh1hhj@hK$hj@hhubj)}(hhh]j()}(hboard-dependent PWM argumentsh]hboard-dependent PWM arguments}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj@hhubah}(h]h ]h"]h$]h&]uh1jhj@hhhj@hK$ubeh}(h]h ](jstructeh"]h$]h&]j!jj"jAj#jAj$j%j&uh1hhhhj>hNhNubj_)}(h**Definition**:: struct pwm_args { u64 period; enum pwm_polarity polarity; }; **Members** ``period`` reference period ``polarity`` reference polarityh](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hj$AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj Aubh:}(hj AhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK#hjAubh literal_block)}(hDstruct pwm_args { u64 period; enum pwm_polarity polarity; };h]hDstruct pwm_args { u64 period; enum pwm_polarity polarity; };}hj?Asbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK%hjAubj()}(h **Members**h]ji)}(hjPAh]hMembers}(hjRAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNAubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK*hjAubj)}(hhh](j)}(h``period`` reference period h](j)}(h ``period``h]j.)}(hjoAh]hperiod}(hjqAhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjmAubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK!hjiAubj)}(hhh]j()}(hreference periodh]hreference period}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjAhK!hjAubah}(h]h ]h"]h$]h&]uh1jhjiAubeh}(h]h ]h"]h$]h&]uh1jhjAhK!hjfAubj)}(h``polarity`` reference polarityh](j)}(h ``polarity``h]j.)}(hjAh]hpolarity}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjAubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK!hjAubj)}(hhh]j()}(hreference polarityh]hreference polarity}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK"hjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhjAhK!hjfAubeh}(h]h ]h"]h$]h&]uh1j~hjAubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubj()}(h**Description**h]ji)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK%hj>hhubj()}(hThis structure describes board-dependent arguments attached to a PWM device. These arguments are usually retrieved from the PWM lookup table or device tree.h]hThis structure describes board-dependent arguments attached to a PWM device. These arguments are usually retrieved from the PWM lookup table or device tree.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK"hj>hhubj()}(hDo not confuse this with the PWM state: PWM arguments represent the initial configuration that users want to use on this PWM device rather than the current PWM hardware state.h]hDo not confuse this with the PWM state: PWM arguments represent the initial configuration that users want to use on this PWM device rather than the current PWM hardware state.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK&hj>hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_waveform (C struct)c.pwm_waveformhNtauh1hhj>hhhNhNubh)}(hhh](h)}(h pwm_waveformh]h)}(hstruct pwm_waveformh](j)}(hjh]hstruct}(hj8BhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4Bhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK-ubj)}(h h]h }(hjFBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4BhhhjEBhK-ubh)}(h pwm_waveformh]h)}(hj2Bh]h pwm_waveform}(hjXBhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjTBubah}(h]h ](hheh"]h$]h&]hhuh1hhj4BhhhjEBhK-ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj0BhhhjEBhK-ubah}(h]j+Bah ](jjeh"]h$]h&]j j )j huh1hhjEBhK-hj-Bhhubj)}(hhh]j()}(hdescription of a PWM waveformh]hdescription of a PWM waveform}(hjzBhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK6hjwBhhubah}(h]h ]h"]h$]h&]uh1jhj-BhhhjEBhK-ubeh}(h]h ](jstructeh"]h$]h&]j!jj"jBj#jBj$j%j&uh1hhhhj>hNhNubj_)}(hX**Definition**:: struct pwm_waveform { u64 period_length_ns; u64 duty_length_ns; u64 duty_offset_ns; }; **Members** ``period_length_ns`` PWM period ``duty_length_ns`` PWM duty cycle ``duty_offset_ns`` offset of the rising edge from the period's starth](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBubh:}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK:hjBubj>A)}(hbstruct pwm_waveform { u64 period_length_ns; u64 duty_length_ns; u64 duty_offset_ns; };h]hbstruct pwm_waveform { u64 period_length_ns; u64 duty_length_ns; u64 duty_offset_ns; };}hjBsbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhhhNhNubj()}(h**Description**h]ji)}(hjCh]h Description}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjCubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK=hj>hhubj()}(hX-This is a representation of a PWM waveform alternative to struct pwm_state below. It's more expressive than struct pwm_state as it contains a duty_offset_ns and so can represent offsets other than zero (with .polarity = PWM_POLARITY_NORMAL) and period - duty_cycle (.polarity = PWM_POLARITY_INVERSED).h]hX/This is a representation of a PWM waveform alternative to struct pwm_state below. It’s more expressive than struct pwm_state as it contains a duty_offset_ns and so can represent offsets other than zero (with .polarity = PWM_POLARITY_NORMAL) and period - duty_cycle (.polarity = PWM_POLARITY_INVERSED).}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK:hj>hhubj()}(hX#Note there is no explicit bool for enabled. A "disabled" PWM is represented by .period_length_ns = 0. Note further that the behaviour of a "disabled" PWM is undefined. Depending on the hardware's capabilities it might drive the active or inactive level, go high-z or even continue to toggle.h]hX-Note there is no explicit bool for enabled. A “disabled” PWM is represented by .period_length_ns = 0. Note further that the behaviour of a “disabled” PWM is undefined. Depending on the hardware’s capabilities it might drive the active or inactive level, go high-z or even continue to toggle.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK@hj>hhubj()}(h.The unit for all three members is nanoseconds.h]h.The unit for all three members is nanoseconds.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKEhj>hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_device (C struct) c.pwm_devicehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h pwm_deviceh]h)}(hstruct pwm_deviceh](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjChhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKJubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjChhhjDhKJubh)}(h pwm_deviceh]h)}(hjCh]h pwm_device}(hjDhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjDubah}(h]h ](hheh"]h$]h&]hhuh1hhjChhhjDhKJubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjChhhjDhKJubah}(h]jCah ](jjeh"]h$]h&]j j )j huh1hhjDhKJhjChhubj)}(hhh]j()}(hPWM channel objecth]hPWM channel object}(hj:DhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKbhj7Dhhubah}(h]h ]h"]h$]h&]uh1jhjChhhjDhKJubeh}(h]h ](jstructeh"]h$]h&]j!jj"jRDj#jRDj$j%j&uh1hhhhj>hNhNubj_)}(hX$**Definition**:: struct pwm_device { const char *label; unsigned long flags; unsigned int hwpwm; struct pwm_chip *chip; struct pwm_args args; struct pwm_state state; struct pwm_state last; }; **Members** ``label`` name of the PWM device ``flags`` flags associated with the PWM device ``hwpwm`` per-chip relative index of the PWM device ``chip`` PWM chip providing this PWM device ``args`` PWM arguments ``state`` last applied state ``last`` last implemented state (for PWM_DEBUG)h](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hj^DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjZDubh:}(hjZDhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKfhjVDubj>A)}(hstruct pwm_device { const char *label; unsigned long flags; unsigned int hwpwm; struct pwm_chip *chip; struct pwm_args args; struct pwm_state state; struct pwm_state last; };h]hstruct pwm_device { const char *label; unsigned long flags; unsigned int hwpwm; struct pwm_chip *chip; struct pwm_args args; struct pwm_state state; struct pwm_state last; };}hjwDsbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhhjVDubj()}(h **Members**h]ji)}(hjDh]hMembers}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKrhjVDubj)}(hhh](j)}(h!``label`` name of the PWM device h](j)}(h ``label``h]j.)}(hjDh]hlabel}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjDubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKdhjDubj)}(hhh]j()}(hname of the PWM deviceh]hname of the PWM device}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjDhKdhjDubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhjDhKdhjDubj)}(h/``flags`` flags associated with the PWM device h](j)}(h ``flags``h]j.)}(hjDh]hflags}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjDubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKehjDubj)}(hhh]j()}(h$flags associated with the PWM deviceh]h$flags associated with the PWM device}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjDhKehjDubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhjDhKehjDubj)}(h4``hwpwm`` per-chip relative index of the PWM device h](j)}(h ``hwpwm``h]j.)}(hjEh]hhwpwm}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjEubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKfhjEubj)}(hhh]j()}(h)per-chip relative index of the PWM deviceh]h)per-chip relative index of the PWM device}(hj2EhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj.EhKfhj/Eubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj.EhKfhjDubj)}(h,``chip`` PWM chip providing this PWM device h](j)}(h``chip``h]j.)}(hjREh]hchip}(hjTEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjPEubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKghjLEubj)}(hhh]j()}(h"PWM chip providing this PWM deviceh]h"PWM chip providing this PWM device}(hjkEhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjgEhKghjhEubah}(h]h ]h"]h$]h&]uh1jhjLEubeh}(h]h ]h"]h$]h&]uh1jhjgEhKghjDubj)}(h``args`` PWM arguments h](j)}(h``args``h]j.)}(hjEh]hargs}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjEubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhhjEubj)}(hhh]j()}(h PWM argumentsh]h PWM arguments}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjEhKhhjEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhjEhKhhjDubj)}(h``state`` last applied state h](j)}(h ``state``h]j.)}(hjEh]hstate}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjEubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKihjEubj)}(hhh]j()}(hlast applied stateh]hlast applied state}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjEhKihjEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhjEhKihjDubj)}(h/``last`` last implemented state (for PWM_DEBUG)h](j)}(h``last``h]j.)}(hjEh]hlast}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjEubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKihjEubj)}(hhh]j()}(h&last implemented state (for PWM_DEBUG)h]h&last implemented state (for PWM_DEBUG)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKjhjFubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhjFhKihjDubeh}(h]h ]h"]h$]h&]uh1j~hjVDubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_get_state (C function)c.pwm_get_statehNtauh1hhj>hhhNhNubh)}(hhh](h)}(hJvoid pwm_get_state (const struct pwm_device *pwm, struct pwm_state *state)h]h)}(hIvoid pwm_get_state(const struct pwm_device *pwm, struct pwm_state *state)h](jr)}(hvoidh]hvoid}(hjWFhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjSFhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKwubj)}(h h]h }(hjfFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSFhhhjeFhKwubh)}(h pwm_get_stateh]h)}(h pwm_get_stateh]h pwm_get_state}(hjxFhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtFubah}(h]h ](hheh"]h$]h&]hhuh1hhjSFhhhjeFhKwubj)}(h7(const struct pwm_device *pwm, struct pwm_state *state)h](j)}(hconst struct pwm_device *pwmh](j)}(hjh]hconst}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(hjh]hstruct}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjFhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjFmodnameN classnameNjj)}j]j)}jjzFsbc.pwm_get_stateasbuh1hhjFubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(hjh]h*}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubh)}(hpwmh]hpwm}(hjGhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjFubj)}(hstruct pwm_state *stateh](j)}(hjh]hstruct}(hj!GhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(h h]h }(hj.GhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hj?GhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhNhNubj_)}(hX**Parameters** ``const struct pwm_device *pwm`` PWM device ``struct pwm_state *state`` state to fill with the current PWM state **Description** The returned PWM state represents the state that was applied by a previous call to pwm_apply_might_sleep(). Drivers may have to slightly tweak that state before programming it to hardware. If pwm_apply_might_sleep() was never called, this returns either the current hardware state (if supported) or the default settings.h](j()}(h**Parameters**h]ji)}(hjGh]h Parameters}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK{hjGubj)}(hhh](j)}(h,``const struct pwm_device *pwm`` PWM device h](j)}(h ``const struct pwm_device *pwm``h]j.)}(hjGh]hconst struct pwm_device *pwm}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjGubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKxhjGubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjGhKxhjGubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jhjGhKxhjGubj)}(hE``struct pwm_state *state`` state to fill with the current PWM state h](j)}(h``struct pwm_state *state``h]j.)}(hjHh]hstruct pwm_state *state}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjHubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKyhjHubj)}(hhh]j()}(h(state to fill with the current PWM stateh]h(state to fill with the current PWM state}(hj5HhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj1HhKyhj2Hubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhj1HhKyhjGubeh}(h]h ]h"]h$]h&]uh1j~hjGubj()}(h**Description**h]ji)}(hjWHh]h Description}(hjYHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjUHubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhK{hjGubj()}(hX@The returned PWM state represents the state that was applied by a previous call to pwm_apply_might_sleep(). Drivers may have to slightly tweak that state before programming it to hardware. If pwm_apply_might_sleep() was never called, this returns either the current hardware state (if supported) or the default settings.h]hX@The returned PWM state represents the state that was applied by a previous call to pwm_apply_might_sleep(). Drivers may have to slightly tweak that state before programming it to hardware. If pwm_apply_might_sleep() was never called, this returns either the current hardware state (if supported) or the default settings.}(hjmHhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKzhjGubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_init_state (C function)c.pwm_init_statehNtauh1hhj>hhhNhNubh)}(hhh](h)}(hKvoid pwm_init_state (const struct pwm_device *pwm, struct pwm_state *state)h]h)}(hJvoid pwm_init_state(const struct pwm_device *pwm, struct pwm_state *state)h](jr)}(hvoidh]hvoid}(hjHhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjHhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhhjHhKubh)}(hpwm_init_stateh]h)}(hpwm_init_stateh]hpwm_init_state}(hjHhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjHubah}(h]h ](hheh"]h$]h&]hhuh1hhjHhhhjHhKubj)}(h7(const struct pwm_device *pwm, struct pwm_state *state)h](j)}(hconst struct pwm_device *pwmh](j)}(hjh]hconst}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjIhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjImodnameN classnameNjj)}j]j)}jjHsbc.pwm_init_stateasbuh1hhjHubj)}(h h]h }(hj2IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(hjh]h*}(hj@IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubh)}(hpwmh]hpwm}(hjMIhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubj)}(hstruct pwm_state *stateh](j)}(hjh]hstruct}(hjfIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbIubj)}(h h]h }(hjsIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbIubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hjIhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjImodnameN classnameNjj)}j]j.Ic.pwm_init_stateasbuh1hhjbIubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbIubj)}(hjh]h*}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbIubh)}(hstateh]hstate}(hjIhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjbIubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubeh}(h]h ]h"]h$]h&]hhuh1jhjHhhhjHhKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjHhhhjHhKubah}(h]jHah ](jjeh"]h$]h&]j j )j huh1hhjHhKhjHhhubj)}(hhh]j()}(h>prepare a new state to be applied with pwm_apply_might_sleep()h]h>prepare a new state to be applied with pwm_apply_might_sleep()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjIhhubah}(h]h ]h"]h$]h&]uh1jhjHhhhjHhKubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jIj#jIj$j%j&uh1hhhhj>hNhNubj_)}(hX0**Parameters** ``const struct pwm_device *pwm`` PWM device ``struct pwm_state *state`` state to fill with the prepared PWM state **Description** This functions prepares a state that can later be tweaked and applied to the PWM device with pwm_apply_might_sleep(). This is a convenient function that first retrieves the current PWM state and the replaces the period and polarity fields with the reference values defined in pwm->args. Once the function returns, you can adjust the ->enabled and ->duty_cycle fields according to your needs before calling pwm_apply_might_sleep(). ->duty_cycle is initially set to zero to avoid cases where the current ->duty_cycle value exceed the pwm_args->period one, which would trigger an error if the user calls pwm_apply_might_sleep() without adjusting ->duty_cycle first.h](j()}(h**Parameters**h]ji)}(hj Jh]h Parameters}(hj JhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjJubj)}(hhh](j)}(h,``const struct pwm_device *pwm`` PWM device h](j)}(h ``const struct pwm_device *pwm``h]j.)}(hj(Jh]hconst struct pwm_device *pwm}(hj*JhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj&Jubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj"Jubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjAJhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj=JhKhj>Jubah}(h]h ]h"]h$]h&]uh1jhj"Jubeh}(h]h ]h"]h$]h&]uh1jhj=JhKhjJubj)}(hF``struct pwm_state *state`` state to fill with the prepared PWM state h](j)}(h``struct pwm_state *state``h]j.)}(hjaJh]hstruct pwm_state *state}(hjcJhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj_Jubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj[Jubj)}(hhh]j()}(h)state to fill with the prepared PWM stateh]h)state to fill with the prepared PWM state}(hjzJhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjvJhKhjwJubah}(h]h ]h"]h$]h&]uh1jhj[Jubeh}(h]h ]h"]h$]h&]uh1jhjvJhKhjJubeh}(h]h ]h"]h$]h&]uh1j~hjJubj()}(h**Description**h]ji)}(hjJh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjJubj()}(hXThis functions prepares a state that can later be tweaked and applied to the PWM device with pwm_apply_might_sleep(). This is a convenient function that first retrieves the current PWM state and the replaces the period and polarity fields with the reference values defined in pwm->args. Once the function returns, you can adjust the ->enabled and ->duty_cycle fields according to your needs before calling pwm_apply_might_sleep().h]hXThis functions prepares a state that can later be tweaked and applied to the PWM device with pwm_apply_might_sleep(). This is a convenient function that first retrieves the current PWM state and the replaces the period and polarity fields with the reference values defined in pwm->args. Once the function returns, you can adjust the ->enabled and ->duty_cycle fields according to your needs before calling pwm_apply_might_sleep().}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjJubj()}(h->duty_cycle is initially set to zero to avoid cases where the current ->duty_cycle value exceed the pwm_args->period one, which would trigger an error if the user calls pwm_apply_might_sleep() without adjusting ->duty_cycle first.h]h->duty_cycle is initially set to zero to avoid cases where the current ->duty_cycle value exceed the pwm_args->period one, which would trigger an error if the user calls pwm_apply_might_sleep() without adjusting ->duty_cycle first.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ(pwm_get_relative_duty_cycle (C function)c.pwm_get_relative_duty_cyclehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h\unsigned int pwm_get_relative_duty_cycle (const struct pwm_state *state, unsigned int scale)h]h)}(h[unsigned int pwm_get_relative_duty_cycle(const struct pwm_state *state, unsigned int scale)h](jr)}(hunsignedh]hunsigned}(hjJhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjJhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhjJhKubjr)}(hinth]hint}(hj KhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjJhhhjJhKubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhjJhKubh)}(hpwm_get_relative_duty_cycleh]h)}(hpwm_get_relative_duty_cycleh]hpwm_get_relative_duty_cycle}(hj-KhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj)Kubah}(h]h ](hheh"]h$]h&]hhuh1hhjJhhhjJhKubj)}(h3(const struct pwm_state *state, unsigned int scale)h](j)}(hconst struct pwm_state *stateh](j)}(hjh]hconst}(hjIKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubj)}(h h]h }(hjVKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubj)}(hjh]hstruct}(hjdKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubj)}(h h]h }(hjqKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hjKhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjKmodnameN classnameNjj)}j]j)}jj/Ksbc.pwm_get_relative_duty_cycleasbuh1hhjEKubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubj)}(hjh]h*}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEKubh)}(hstateh]hstate}(hjKhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjEKubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjAKubj)}(hunsigned int scaleh](jr)}(hunsignedh]hunsigned}(hjKhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjKubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubjr)}(hinth]hint}(hjKhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjKubj)}(h h]h }(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubh)}(hscaleh]hscale}(hjLhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjKubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjAKubeh}(h]h ]h"]h$]h&]hhuh1jhjJhhhjJhKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjJhhhjJhKubah}(h]jJah ](jjeh"]h$]h&]j j )j huh1hhjJhKhjJhhubj)}(hhh]j()}(hGet a relative duty cycle valueh]hGet a relative duty cycle value}(hj8LhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj5Lhhubah}(h]h ]h"]h$]h&]uh1jhjJhhhjJhKubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jPLj#jPLj$j%j&uh1hhhhj>hNhNubj_)}(hX**Parameters** ``const struct pwm_state *state`` PWM state to extract the duty cycle from ``unsigned int scale`` target scale of the relative duty cycle **Description** This functions converts the absolute duty cycle stored in **state** (expressed in nanosecond) into a value relative to the period. For example if you want to get the duty_cycle expressed in percent, call: pwm_get_state(pwm, :c:type:`state`); duty = pwm_get_relative_duty_cycle(:c:type:`state`, 100); **Return** rounded relative duty cycle multiplied by **scale**h](j()}(h**Parameters**h]ji)}(hjZLh]h Parameters}(hj\LhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjXLubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubj)}(hhh](j)}(hK``const struct pwm_state *state`` PWM state to extract the duty cycle from h](j)}(h!``const struct pwm_state *state``h]j.)}(hjyLh]hconst struct pwm_state *state}(hj{LhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjwLubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjsLubj)}(hhh]j()}(h(PWM state to extract the duty cycle fromh]h(PWM state to extract the duty cycle from}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjLhKhjLubah}(h]h ]h"]h$]h&]uh1jhjsLubeh}(h]h ]h"]h$]h&]uh1jhjLhKhjpLubj)}(h?``unsigned int scale`` target scale of the relative duty cycle h](j)}(h``unsigned int scale``h]j.)}(hjLh]hunsigned int scale}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjLubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjLubj)}(hhh]j()}(h'target scale of the relative duty cycleh]h'target scale of the relative duty cycle}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjLhKhjLubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjLhKhjpLubeh}(h]h ]h"]h$]h&]uh1j~hjTLubj()}(h**Description**h]ji)}(hjLh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubj()}(hThis functions converts the absolute duty cycle stored in **state** (expressed in nanosecond) into a value relative to the period.h](h:This functions converts the absolute duty cycle stored in }(hjMhhhNhNubji)}(h **state**h]hstate}(hj MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjMubh? (expressed in nanosecond) into a value relative to the period.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubj()}(hIFor example if you want to get the duty_cycle expressed in percent, call:h]hIFor example if you want to get the duty_cycle expressed in percent, call:}(hj$MhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubj()}(h^pwm_get_state(pwm, :c:type:`state`); duty = pwm_get_relative_duty_cycle(:c:type:`state`, 100);h](hpwm_get_state(pwm, }(hj3MhhhNhNubh)}(h:c:type:`state`h]j.)}(hj=Mh]hstate}(hj?MhhhNhNubah}(h]h ](j-?jc-typeeh"]h$]h&]uh1j-hj;Mubah}(h]h ]h"]h$]h&]refdocj9? refdomainjreftypetype refexplicitrefwarnjj??jB?stateuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj3Mubh&); duty = pwm_get_relative_duty_cycle(}(hj3MhhhNhNubh)}(h:c:type:`state`h]j.)}(hjaMh]hstate}(hjcMhhhNhNubah}(h]h ](j-?jc-typeeh"]h$]h&]uh1j-hj_Mubah}(h]h ]h"]h$]h&]refdocj9? refdomainjreftypetype refexplicitrefwarnjj??jB?stateuh1hhjZMhKhj3Mubh, 100);}(hj3MhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hjZMhKhjTLubj()}(h **Return**h]ji)}(hjMh]hReturn}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjMubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubj()}(h3rounded relative duty cycle multiplied by **scale**h](h*rounded relative duty cycle multiplied by }(hjMhhhNhNubji)}(h **scale**h]hscale}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjMubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjTLubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ(pwm_set_relative_duty_cycle (C function)c.pwm_set_relative_duty_cyclehNtauh1hhj>hhhNhNubh)}(hhh](h)}(hfint pwm_set_relative_duty_cycle (struct pwm_state *state, unsigned int duty_cycle, unsigned int scale)h]h)}(heint pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, unsigned int scale)h](jr)}(hinth]hint}(hjMhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjMhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMhhhjMhKubh)}(hpwm_set_relative_duty_cycleh]h)}(hpwm_set_relative_duty_cycleh]hpwm_set_relative_duty_cycle}(hjMhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjMubah}(h]h ](hheh"]h$]h&]hhuh1hhjMhhhjMhKubj)}(hF(struct pwm_state *state, unsigned int duty_cycle, unsigned int scale)h](j)}(hstruct pwm_state *stateh](j)}(hjh]hstruct}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubj)}(h h]h }(hj'NhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hj8NhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj5Nubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj:NmodnameN classnameNjj)}j]j)}jjNsbc.pwm_set_relative_duty_cycleasbuh1hhjNubj)}(h h]h }(hjXNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubj)}(hjh]h*}(hjfNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubh)}(hstateh]hstate}(hjsNhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjNubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjNubj)}(hunsigned int duty_cycleh](jr)}(hunsignedh]hunsigned}(hjNhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjNubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubjr)}(hinth]hint}(hjNhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjNubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubh)}(h duty_cycleh]h duty_cycle}(hjNhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjNubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjNubj)}(hunsigned int scaleh](jr)}(hunsignedh]hunsigned}(hjNhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjNubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubjr)}(hinth]hint}(hjNhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjNubj)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubh)}(hscaleh]hscale}(hjOhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjNubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjNubeh}(h]h ]h"]h$]h&]hhuh1jhjMhhhjMhKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjMhhhjMhKubah}(h]jMah ](jjeh"]h$]h&]j j )j huh1hhjMhKhjMhhubj)}(hhh]j()}(hSet a relative duty cycle valueh]hSet a relative duty cycle value}(hj?OhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjhNhNubj_)}(hX**Parameters** ``struct pwm_state *state`` PWM state to fill ``unsigned int duty_cycle`` relative duty cycle value ``unsigned int scale`` scale in which **duty_cycle** is expressed **Description** This functions converts a relative into an absolute duty cycle (expressed in nanoseconds), and puts the result in state->duty_cycle. For example if you want to configure a 50% duty cycle, call: pwm_init_state(pwm, :c:type:`state`); pwm_set_relative_duty_cycle(:c:type:`state`, 50, 100); pwm_apply_might_sleep(pwm, :c:type:`state`); **Return** 0 on success or ``-EINVAL`` if **duty_cycle** and/or **scale** are inconsistent (**scale** == 0 or **duty_cycle** > **scale**)h](j()}(h**Parameters**h]ji)}(hjaOh]h Parameters}(hjcOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_Oubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj[Oubj)}(hhh](j)}(h.``struct pwm_state *state`` PWM state to fill h](j)}(h``struct pwm_state *state``h]j.)}(hjOh]hstruct pwm_state *state}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj~Oubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjzOubj)}(hhh]j()}(hPWM state to fillh]hPWM state to fill}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjOhKhjOubah}(h]h ]h"]h$]h&]uh1jhjzOubeh}(h]h ]h"]h$]h&]uh1jhjOhKhjwOubj)}(h6``unsigned int duty_cycle`` relative duty cycle value h](j)}(h``unsigned int duty_cycle``h]j.)}(hjOh]hunsigned int duty_cycle}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjOubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjOubj)}(hhh]j()}(hrelative duty cycle valueh]hrelative duty cycle value}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjOhKhjOubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjOhKhjwOubj)}(hB``unsigned int scale`` scale in which **duty_cycle** is expressed h](j)}(h``unsigned int scale``h]j.)}(hjOh]hunsigned int scale}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjOubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhjOubj)}(hhh]j()}(h*scale in which **duty_cycle** is expressedh](hscale in which }(hj PhhhNhNubji)}(h**duty_cycle**h]h duty_cycle}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj Pubh is expressed}(hj PhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hjPhKhjPubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjPhKhjwOubeh}(h]h ]h"]h$]h&]uh1j~hj[Oubj()}(h**Description**h]ji)}(hj?Ph]h Description}(hjAPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=Pubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj[Oubj()}(hThis functions converts a relative into an absolute duty cycle (expressed in nanoseconds), and puts the result in state->duty_cycle.h]hThis functions converts a relative into an absolute duty cycle (expressed in nanoseconds), and puts the result in state->duty_cycle.}(hjUPhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj[Oubj()}(h **scale**)h](h0 on success or }(hjQhhhNhNubj.)}(h ``-EINVAL``h]h-EINVAL}(hj QhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjQubh if }(hjQhhhNhNubji)}(h**duty_cycle**h]h duty_cycle}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQubh and/or }(hjQhhhNhNubji)}(h **scale**h]hscale}(hj/QhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQubh are inconsistent (}(hjQhhhNhNubji)}(h **scale**h]hscale}(hjAQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQubh == 0 or }(hjQhhhNhNubji)}(h**duty_cycle**h]h duty_cycle}(hjSQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQubh > }(hjQhhhNhNubji)}(h **scale**h]hscale}(hjeQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQubh)}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhKhj[Oubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_capture (C struct) c.pwm_capturehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h pwm_captureh]h)}(hstruct pwm_captureh](j)}(hjh]hstruct}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQhhhjQhMubh)}(h pwm_captureh]h)}(hjQh]h pwm_capture}(hjQhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjQubah}(h]h ](hheh"]h$]h&]hhuh1hhjQhhhjQhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjQhhhjQhMubah}(h]jQah ](jjeh"]h$]h&]j j )j huh1hhjQhMhjQhhubj)}(hhh]j()}(hPWM capture datah]hPWM capture data}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM hjQhhubah}(h]h ]h"]h$]h&]uh1jhjQhhhjQhMubeh}(h]h ](jstructeh"]h$]h&]j!jj"jQj#jQj$j%j&uh1hhhhj>hNhNubj_)}(h**Definition**:: struct pwm_capture { unsigned int period; unsigned int duty_cycle; }; **Members** ``period`` period of the PWM signal (in nanoseconds) ``duty_cycle`` duty cycle of the PWM signal (in nanoseconds)h](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRubh:}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjQubj>A)}(hMstruct pwm_capture { unsigned int period; unsigned int duty_cycle; };h]hMstruct pwm_capture { unsigned int period; unsigned int duty_cycle; };}hjRsbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjQubj()}(h **Members**h]ji)}(hj.Rh]hMembers}(hj0RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,Rubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjQubj)}(hhh](j)}(h5``period`` period of the PWM signal (in nanoseconds) h](j)}(h ``period``h]j.)}(hjMRh]hperiod}(hjORhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjKRubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjGRubj)}(hhh]j()}(h)period of the PWM signal (in nanoseconds)h]h)period of the PWM signal (in nanoseconds)}(hjfRhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjbRhMhjcRubah}(h]h ]h"]h$]h&]uh1jhjGRubeh}(h]h ]h"]h$]h&]uh1jhjbRhMhjDRubj)}(h<``duty_cycle`` duty cycle of the PWM signal (in nanoseconds)h](j)}(h``duty_cycle``h]j.)}(hjRh]h duty_cycle}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjRubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjRubj)}(hhh]j()}(h-duty cycle of the PWM signal (in nanoseconds)h]h-duty cycle of the PWM signal (in nanoseconds)}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjRubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhjRhMhjDRubeh}(h]h ]h"]h$]h&]uh1j~hjQubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_ops (C struct) c.pwm_opshNtauh1hhj>hhhNhNubh)}(hhh](h)}(hpwm_opsh]h)}(hstruct pwm_opsh](j)}(hjh]hstruct}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRhhhjRhMubh)}(hpwm_opsh]h)}(hjRh]hpwm_ops}(hjShhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjRubah}(h]h ](hheh"]h$]h&]hhuh1hhjRhhhjRhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjRhhhjRhMubah}(h]jRah ](jjeh"]h$]h&]j j )j huh1hhjRhMhjRhhubj)}(hhh]j()}(hPWM controller operationsh]hPWM controller operations}(hj"ShhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjShhubah}(h]h ]h"]h$]h&]uh1jhjRhhhjRhMubeh}(h]h ](jstructeh"]h$]h&]j!jj"j:Sj#j:Sj$j%j&uh1hhhhj>hNhNubj_)}(hXL**Definition**:: struct pwm_ops { int (*request)(struct pwm_chip *chip, struct pwm_device *pwm); void (*free)(struct pwm_chip *chip, struct pwm_device *pwm); int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_capture *result, unsigned long timeout); size_t sizeof_wfhw; int (*round_waveform_tohw)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_waveform *wf, void *wfhw); int (*round_waveform_fromhw)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw, struct pwm_waveform *wf); int (*read_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, void *wfhw); int (*write_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw); int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state); int (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state); }; **Members** ``request`` optional hook for requesting a PWM ``free`` optional hook for freeing a PWM ``capture`` capture and report PWM signal ``sizeof_wfhw`` size (in bytes) of driver specific waveform presentation ``round_waveform_tohw`` convert a struct pwm_waveform to driver specific presentation ``round_waveform_fromhw`` convert a driver specific waveform presentation to struct pwm_waveform ``read_waveform`` read driver specific waveform presentation from hardware ``write_waveform`` write driver specific waveform presentation to hardware ``apply`` atomically apply a new PWM config ``get_state`` get the current PWM state.h](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hjFShhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBSubh:}(hjBShhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj>Subj>A)}(hXstruct pwm_ops { int (*request)(struct pwm_chip *chip, struct pwm_device *pwm); void (*free)(struct pwm_chip *chip, struct pwm_device *pwm); int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_capture *result, unsigned long timeout); size_t sizeof_wfhw; int (*round_waveform_tohw)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_waveform *wf, void *wfhw); int (*round_waveform_fromhw)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw, struct pwm_waveform *wf); int (*read_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, void *wfhw); int (*write_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw); int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state); int (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state); };h]hXstruct pwm_ops { int (*request)(struct pwm_chip *chip, struct pwm_device *pwm); void (*free)(struct pwm_chip *chip, struct pwm_device *pwm); int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_capture *result, unsigned long timeout); size_t sizeof_wfhw; int (*round_waveform_tohw)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_waveform *wf, void *wfhw); int (*round_waveform_fromhw)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw, struct pwm_waveform *wf); int (*read_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, void *wfhw); int (*write_waveform)(struct pwm_chip *chip, struct pwm_device *pwm, const void *wfhw); int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state); int (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state); };}hj_Ssbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj>Subj()}(h **Members**h]ji)}(hjpSh]hMembers}(hjrShhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjnSubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM+hj>Subj)}(hhh](j)}(h/``request`` optional hook for requesting a PWM h](j)}(h ``request``h]j.)}(hjSh]hrequest}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjSubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjSubj)}(hhh]j()}(h"optional hook for requesting a PWMh]h"optional hook for requesting a PWM}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjShMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjShMhjSubj)}(h)``free`` optional hook for freeing a PWM h](j)}(h``free``h]j.)}(hjSh]hfree}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjSubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjSubj)}(hhh]j()}(hoptional hook for freeing a PWMh]hoptional hook for freeing a PWM}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjShMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjShMhjSubj)}(h*``capture`` capture and report PWM signal h](j)}(h ``capture``h]j.)}(hjTh]hcapture}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjSubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjSubj)}(hhh]j()}(hcapture and report PWM signalh]hcapture and report PWM signal}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjThMhjTubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjThMhjSubj)}(hI``sizeof_wfhw`` size (in bytes) of driver specific waveform presentation h](j)}(h``sizeof_wfhw``h]j.)}(hj:Th]h sizeof_wfhw}(hjSubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_chip (C struct) c.pwm_chiphNtauh1hhj>hhhNhNubh)}(hhh](h)}(hpwm_chiph]h)}(hstruct pwm_chiph](j)}(hjh]hstruct}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM)ubj)}(h h]h }(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhhjUhM)ubh)}(hpwm_chiph]h)}(hjUh]hpwm_chip}(hj VhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjVubah}(h]h ](hheh"]h$]h&]hhuh1hhjUhhhjUhM)ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjUhhhjUhM)ubah}(h]jUah ](jjeh"]h$]h&]j j )j huh1hhjUhM)hjUhhubj)}(hhh]j()}(habstract a PWM controllerh]habstract a PWM controller}(hj,VhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM;hj)Vhhubah}(h]h ]h"]h$]h&]uh1jhjUhhhjUhM)ubeh}(h]h ](jstructeh"]h$]h&]j!jj"jDVj#jDVj$j%j&uh1hhhhj>hNhNubj_)}(hX**Definition**:: struct pwm_chip { struct device dev; struct cdev cdev; const struct pwm_ops *ops; struct module *owner; unsigned int id; unsigned int npwm; struct pwm_device * (*of_xlate)(struct pwm_chip *chip, const struct of_phandle_args *args); bool atomic; bool uses_pwmchip_alloc; bool operational; union { struct mutex nonatomic_lock; spinlock_t atomic_lock; }; struct pwm_device pwms[] ; }; **Members** ``dev`` device providing the PWMs ``cdev`` :c:type:`struct cdev ` for this device ``ops`` callbacks for this PWM controller ``owner`` module providing this chip ``id`` unique number of this PWM chip ``npwm`` number of PWMs controlled by this chip ``of_xlate`` request a PWM device given a device tree PWM specifier ``atomic`` can the driver's ->apply() be called in atomic context ``uses_pwmchip_alloc`` signals if pwmchip_allow was used to allocate this chip ``operational`` signals if the chip can be used (or is already deregistered) ``{unnamed_union}`` anonymous ``nonatomic_lock`` mutex for nonatomic chips ``atomic_lock`` mutex for atomic chips ``pwms`` array of PWM devices allocated by the frameworkh](j()}(h**Definition**::h](ji)}(h**Definition**h]h Definition}(hjPVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLVubh:}(hjLVhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM?hjHVubj>A)}(hXstruct pwm_chip { struct device dev; struct cdev cdev; const struct pwm_ops *ops; struct module *owner; unsigned int id; unsigned int npwm; struct pwm_device * (*of_xlate)(struct pwm_chip *chip, const struct of_phandle_args *args); bool atomic; bool uses_pwmchip_alloc; bool operational; union { struct mutex nonatomic_lock; spinlock_t atomic_lock; }; struct pwm_device pwms[] ; };h]hXstruct pwm_chip { struct device dev; struct cdev cdev; const struct pwm_ops *ops; struct module *owner; unsigned int id; unsigned int npwm; struct pwm_device * (*of_xlate)(struct pwm_chip *chip, const struct of_phandle_args *args); bool atomic; bool uses_pwmchip_alloc; bool operational; union { struct mutex nonatomic_lock; spinlock_t atomic_lock; }; struct pwm_device pwms[] ; };}hjiVsbah}(h]h ]h"]h$]h&]hhuh1j=Ah\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMAhjHVubj()}(h **Members**h]ji)}(hjzVh]hMembers}(hj|VhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxVubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMShjHVubj)}(hhh](j)}(h"``dev`` device providing the PWMs h](j)}(h``dev``h]j.)}(hjVh]hdev}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjVubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM=hjVubj)}(hhh]j()}(hdevice providing the PWMsh]hdevice providing the PWMs}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjVhM=hjVubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjVhM=hjVubj)}(h6``cdev`` :c:type:`struct cdev ` for this device h](j)}(h``cdev``h]j.)}(hjVh]hcdev}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjVubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM>hjVubj)}(hhh]j()}(h,:c:type:`struct cdev ` for this deviceh](h)}(h:c:type:`struct cdev `h]j.)}(hjVh]h struct cdev}(hjVhhhNhNubah}(h]h ](j-?jc-typeeh"]h$]h&]uh1j-hjVubah}(h]h ]h"]h$]h&]refdocj9? refdomainjreftypetype refexplicitrefwarnjj??jB?cdevuh1hhjVhM>hjVubh for this device}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'hjVhM>hjVubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjVhM>hjVubj)}(h*``ops`` callbacks for this PWM controller h](j)}(h``ops``h]j.)}(hj*Wh]hops}(hj,WhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj(Wubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM?hj$Wubj)}(hhh]j()}(h!callbacks for this PWM controllerh]h!callbacks for this PWM controller}(hjCWhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj?WhM?hj@Wubah}(h]h ]h"]h$]h&]uh1jhj$Wubeh}(h]h ]h"]h$]h&]uh1jhj?WhM?hjVubj)}(h%``owner`` module providing this chip h](j)}(h ``owner``h]j.)}(hjcWh]howner}(hjeWhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjaWubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhM@hj]Wubj)}(hhh]j()}(hmodule providing this chiph]hmodule providing this chip}(hj|WhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjxWhM@hjyWubah}(h]h ]h"]h$]h&]uh1jhj]Wubeh}(h]h ]h"]h$]h&]uh1jhjxWhM@hjVubj)}(h&``id`` unique number of this PWM chip h](j)}(h``id``h]j.)}(hjWh]hid}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjWubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMAhjWubj)}(hhh]j()}(hunique number of this PWM chiph]hunique number of this PWM chip}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjWhMAhjWubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjWhMAhjVubj)}(h0``npwm`` number of PWMs controlled by this chip h](j)}(h``npwm``h]j.)}(hjWh]hnpwm}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjWubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMBhjWubj)}(hhh]j()}(h&number of PWMs controlled by this chiph]h&number of PWMs controlled by this chip}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjWhMBhjWubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjWhMBhjVubj)}(hD``of_xlate`` request a PWM device given a device tree PWM specifier h](j)}(h ``of_xlate``h]j.)}(hjXh]hof_xlate}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj Xubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMChjXubj)}(hhh]j()}(h6request a PWM device given a device tree PWM specifierh]h6request a PWM device given a device tree PWM specifier}(hj'XhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj#XhMChj$Xubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jhj#XhMChjVubj)}(hB``atomic`` can the driver's ->apply() be called in atomic context h](j)}(h ``atomic``h]j.)}(hjGXh]hatomic}(hjIXhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjEXubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMDhjAXubj)}(hhh]j()}(h6can the driver's ->apply() be called in atomic contexth]h8can the driver’s ->apply() be called in atomic context}(hj`XhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj\XhMDhj]Xubah}(h]h ]h"]h$]h&]uh1jhjAXubeh}(h]h ]h"]h$]h&]uh1jhj\XhMDhjVubj)}(hO``uses_pwmchip_alloc`` signals if pwmchip_allow was used to allocate this chip h](j)}(h``uses_pwmchip_alloc``h]j.)}(hjXh]huses_pwmchip_alloc}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj~Xubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMEhjzXubj)}(hhh]j()}(h7signals if pwmchip_allow was used to allocate this chiph]h7signals if pwmchip_allow was used to allocate this chip}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjXhMEhjXubah}(h]h ]h"]h$]h&]uh1jhjzXubeh}(h]h ]h"]h$]h&]uh1jhjXhMEhjVubj)}(hM``operational`` signals if the chip can be used (or is already deregistered) h](j)}(h``operational``h]j.)}(hjXh]h operational}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjXubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMFhjXubj)}(hhh]j()}(hhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ&pwmchip_supports_waveform (C function)c.pwmchip_supports_waveformhNtauh1hhj>hhhNhNubh)}(hhh](h)}(h6bool pwmchip_supports_waveform (struct pwm_chip *chip)h]h)}(h5bool pwmchip_supports_waveform(struct pwm_chip *chip)h](jr)}(hboolh]hbool}(hjYhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjYhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMfubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhjZhMfubh)}(hpwmchip_supports_waveformh]h)}(hpwmchip_supports_waveformh]hpwmchip_supports_waveform}(hjZhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjZubah}(h]h ](hheh"]h$]h&]hhuh1hhjYhhhjZhMfubj)}(h(struct pwm_chip *chip)h]j)}(hstruct pwm_chip *chiph](j)}(hjh]hstruct}(hj4ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0Zubj)}(h h]h }(hjAZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0Zubh)}(hhh]h)}(hpwm_chiph]hpwm_chip}(hjRZhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjOZubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjTZmodnameN classnameNjj)}j]j)}jjZsbc.pwmchip_supports_waveformasbuh1hhj0Zubj)}(h h]h }(hjrZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0Zubj)}(hjh]h*}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0Zubh)}(hchiph]hchip}(hjZhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj0Zubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,Zubah}(h]h ]h"]h$]h&]hhuh1jhjYhhhjZhMfubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjYhhhjZhMfubah}(h]jYah ](jjeh"]h$]h&]j j )j huh1hhjZhMfhjYhhubj)}(hhh]j()}(h4checks if the given chip supports waveform callbacksh]h4checks if the given chip supports waveform callbacks}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMfhjZhhubah}(h]h ]h"]h$]h&]uh1jhjYhhhjZhMfubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jZj#jZj$j%j&uh1hhhhj>hNhNubj_)}(h**Parameters** ``struct pwm_chip *chip`` The pwm_chip to test **Return** true iff the pwm chip support the waveform functions like pwm_set_waveform_might_sleep() and pwm_round_waveform_might_sleep()h](j()}(h**Parameters**h]ji)}(hjZh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjZubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMjhjZubj)}(hhh]j)}(h/``struct pwm_chip *chip`` The pwm_chip to test h](j)}(h``struct pwm_chip *chip``h]j.)}(hjZh]hstruct pwm_chip *chip}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjZubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMghjZubj)}(hhh]j()}(hThe pwm_chip to testh]hThe pwm_chip to test}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj [hMghj[ubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhj [hMghjZubah}(h]h ]h"]h$]h&]uh1j~hjZubj()}(h **Return**h]ji)}(hj3[h]hReturn}(hj5[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1[ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMihjZubj()}(h}true iff the pwm chip support the waveform functions like pwm_set_waveform_might_sleep() and pwm_round_waveform_might_sleep()h]h}true iff the pwm chip support the waveform functions like pwm_set_waveform_might_sleep() and pwm_round_waveform_might_sleep()}(hjI[hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMihjZubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_config (C function) c.pwm_confighNtauh1hhj>hhhNhNubh)}(hhh](h)}(hCint pwm_config (struct pwm_device *pwm, int duty_ns, int period_ns)h]h)}(hBint pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)h](jr)}(hinth]hint}(hjx[hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjt[hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[hhhj[hMubh)}(h pwm_configh]h)}(h pwm_configh]h pwm_config}(hj[hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj[ubah}(h]h ](hheh"]h$]h&]hhuh1hhjt[hhhj[hMubj)}(h4(struct pwm_device *pwm, int duty_ns, int period_ns)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj[hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj[modnameN classnameNjj)}j]j)}jj[sb c.pwm_configasbuh1hhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hjh]h*}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hpwmh]hpwm}(hj\hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj[ubj)}(h int duty_nsh](jr)}(hinth]hint}(hj'\hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj#\ubj)}(h h]h }(hj5\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#\ubh)}(hduty_nsh]hduty_ns}(hjC\hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj[ubj)}(h int period_nsh](jr)}(hinth]hint}(hj\\hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjX\ubj)}(h h]h }(hjj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX\ubh)}(h period_nsh]h period_ns}(hjx\hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjX\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj[ubeh}(h]h ]h"]h$]h&]hhuh1jhjt[hhhj[hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjp[hhhj[hMubah}(h]jk[ah ](jjeh"]h$]h&]j j )j huh1hhj[hMhjm[hhubj)}(hhh]j()}(h!change a PWM device configurationh]h!change a PWM device configuration}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj\hhubah}(h]h ]h"]h$]h&]uh1jhjm[hhhj[hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j\j#j\j$j%j&uh1hhhhj>hNhNubj_)}(h**Parameters** ``struct pwm_device *pwm`` PWM device ``int duty_ns`` "on" time (in nanoseconds) ``int period_ns`` duration (in nanoseconds) of one cycle **Return** 0 on success or a negative error code on failure.h](j()}(h**Parameters**h]ji)}(hj\h]h Parameters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj\ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj\ubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hj\h]hstruct pwm_device *pwm}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj\ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj\ubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj\hMhj\ubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhj\hMhj\ubj)}(h+``int duty_ns`` "on" time (in nanoseconds) h](j)}(h``int duty_ns``h]j.)}(hj]h]h int duty_ns}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj]ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj]ubj)}(hhh]j()}(h"on" time (in nanoseconds)h]h“on” time (in nanoseconds)}(hj5]hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj1]hMhj2]ubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhj1]hMhj\ubj)}(h9``int period_ns`` duration (in nanoseconds) of one cycle h](j)}(h``int period_ns``h]j.)}(hjU]h]h int period_ns}(hjW]hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjS]ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjO]ubj)}(hhh]j()}(h&duration (in nanoseconds) of one cycleh]h&duration (in nanoseconds) of one cycle}(hjn]hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjj]hMhjk]ubah}(h]h ]h"]h$]h&]uh1jhjO]ubeh}(h]h ]h"]h$]h&]uh1jhjj]hMhj\ubeh}(h]h ]h"]h$]h&]uh1j~hj\ubj()}(h **Return**h]ji)}(hj]h]hReturn}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj\ubj()}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_enable (C function) c.pwm_enablehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h'int pwm_enable (struct pwm_device *pwm)h]h)}(h&int pwm_enable(struct pwm_device *pwm)h](jr)}(hinth]hint}(hj]hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj]hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]hhhj]hMubh)}(h pwm_enableh]h)}(h pwm_enableh]h pwm_enable}(hj]hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj]ubah}(h]h ](hheh"]h$]h&]hhuh1hhj]hhhj]hMubj)}(h(struct pwm_device *pwm)h]j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj0^hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj-^ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2^modnameN classnameNjj)}j]j)}jj]sb c.pwm_enableasbuh1hhj^ubj)}(h h]h }(hjP^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj)}(hjh]h*}(hj^^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubh)}(hpwmh]hpwm}(hjk^hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj^ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ^ubah}(h]h ]h"]h$]h&]hhuh1jhj]hhhj]hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj]hhhj]hMubah}(h]j]ah ](jjeh"]h$]h&]j j )j huh1hhj]hMhj]hhubj)}(hhh]j()}(hstart a PWM output togglingh]hstart a PWM output toggling}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj^hhubah}(h]h ]h"]h$]h&]uh1jhj]hhhj]hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j^j#j^j$j%j&uh1hhhhj>hNhNubj_)}(hv**Parameters** ``struct pwm_device *pwm`` PWM device **Return** 0 on success or a negative error code on failure.h](j()}(h**Parameters**h]ji)}(hj^h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj^ubj)}(hhh]j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hj^h]hstruct pwm_device *pwm}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj^ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj^ubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj^hMhj^ubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhj^hMhj^ubah}(h]h ]h"]h$]h&]uh1j~hj^ubj()}(h **Return**h]ji)}(hj_h]hReturn}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj^ubj()}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hj'_hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_disable (C function) c.pwm_disablehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h)void pwm_disable (struct pwm_device *pwm)h]h)}(h(void pwm_disable(struct pwm_device *pwm)h](jr)}(hvoidh]hvoid}(hjV_hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjR_hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hje_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR_hhhjd_hMubh)}(h pwm_disableh]h)}(h pwm_disableh]h pwm_disable}(hjw_hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjs_ubah}(h]h ](hheh"]h$]h&]hhuh1hhjR_hhhjd_hMubj)}(h(struct pwm_device *pwm)h]j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj_hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_modnameN classnameNjj)}j]j)}jjy_sb c.pwm_disableasbuh1hhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hjh]h*}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubh)}(hpwmh]hpwm}(hj_hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj_ubah}(h]h ]h"]h$]h&]hhuh1jhjR_hhhjd_hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjN_hhhjd_hMubah}(h]jI_ah ](jjeh"]h$]h&]j j )j huh1hhjd_hMhjK_hhubj)}(hhh]j()}(hstop a PWM output togglingh]hstop a PWM output toggling}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj`hhubah}(h]h ]h"]h$]h&]uh1jhjK_hhhjd_hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j.`j#j.`j$j%j&uh1hhhhj>hNhNubj_)}(h7**Parameters** ``struct pwm_device *pwm`` PWM deviceh](j()}(h**Parameters**h]ji)}(hj8`h]h Parameters}(hj:`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6`ubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhj2`ubj)}(hhh]j)}(h%``struct pwm_device *pwm`` PWM deviceh](j)}(h``struct pwm_device *pwm``h]j.)}(hjW`h]hstruct pwm_device *pwm}(hjY`hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjU`ubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjQ`ubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjp`hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjm`ubah}(h]h ]h"]h$]h&]uh1jhjQ`ubeh}(h]h ]h"]h$]h&]uh1jhjl`hMhjN`ubah}(h]h ]h"]h$]h&]uh1j~hj2`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_might_sleep (C function)c.pwm_might_sleephNtauh1hhj>hhhNhNubh)}(hhh](h)}(h-bool pwm_might_sleep (struct pwm_device *pwm)h]h)}(h,bool pwm_might_sleep(struct pwm_device *pwm)h](jr)}(hjYh]hbool}(hj`hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj`hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`hhhj`hMubh)}(hpwm_might_sleeph]h)}(hpwm_might_sleeph]hpwm_might_sleep}(hj`hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj`ubah}(h]h ](hheh"]h$]h&]hhuh1hhj`hhhj`hMubj)}(h(struct pwm_device *pwm)h]j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj ahhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj amodnameN classnameNjj)}j]j)}jj`sbc.pwm_might_sleepasbuh1hhj`ubj)}(h h]h }(hj+ahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hjh]h*}(hj9ahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hpwmh]hpwm}(hjFahhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj`ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj`ubah}(h]h ]h"]h$]h&]hhuh1jhj`hhhj`hMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj`hhhj`hMubah}(h]j`ah ](jjeh"]h$]h&]j j )j huh1hhj`hMhj`hhubj)}(hhh]j()}(h is pwm_apply_atomic() supported?h]h is pwm_apply_atomic() supported?}(hjpahhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjmahhubah}(h]h ]h"]h$]h&]uh1jhj`hhhj`hMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jaj#jaj$j%j&uh1hhhhj>hNhNubj_)}(h**Parameters** ``struct pwm_device *pwm`` PWM device **Return** false if pwm_apply_atomic() can be called from atomic context.h](j()}(h**Parameters**h]ji)}(hjah]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjaubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjaubj)}(hhh]j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjah]hstruct pwm_device *pwm}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjaubah}(h]h ]h"]h$]h&]uh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjaubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjahMhjaubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhjahMhjaubah}(h]h ]h"]h$]h&]uh1j~hjaubj()}(h **Return**h]ji)}(hjah]hReturn}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjaubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjaubj()}(h>false if pwm_apply_atomic() can be called from atomic context.h]h>false if pwm_apply_atomic() can be called from atomic context.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h\/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:44: ./include/linux/pwm.hhMhjaubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ+pwm_round_waveform_might_sleep (C function) c.pwm_round_waveform_might_sleephNtauh1hhj>hhhNhNubh)}(hhh](h)}(hTint pwm_round_waveform_might_sleep (struct pwm_device *pwm, struct pwm_waveform *wf)h]h)}(hSint pwm_round_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform *wf)h](jr)}(hinth]hint}(hj1bhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj-bhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKubj)}(h h]h }(hj@bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-bhhhj?bhKubh)}(hpwm_round_waveform_might_sleeph]h)}(hpwm_round_waveform_might_sleeph]hpwm_round_waveform_might_sleep}(hjRbhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjNbubah}(h]h ](hheh"]h$]h&]hhuh1hhj-bhhhj?bhKubj)}(h1(struct pwm_device *pwm, struct pwm_waveform *wf)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjnbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjbubj)}(h h]h }(hj{bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjbubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjbhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjbmodnameN classnameNjj)}j]j)}jjTbsb c.pwm_round_waveform_might_sleepasbuh1hhjjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjbubj)}(hjh]h*}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjbubh)}(hpwmh]hpwm}(hjbhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjjbubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjfbubj)}(hstruct pwm_waveform *wfh](j)}(hjh]hstruct}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubh)}(hhh]h)}(h pwm_waveformh]h pwm_waveform}(hjbhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjcmodnameN classnameNjj)}j]jb c.pwm_round_waveform_might_sleepasbuh1hhjbubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(hjh]h*}(hj*chhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubh)}(hwfh]hwf}(hj7chhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjbubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjfbubeh}(h]h ]h"]h$]h&]hhuh1jhj-bhhhj?bhKubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj)bhhhj?bhKubah}(h]j$bah ](jjeh"]h$]h&]j j )j huh1hhj?bhKhj&bhhubj)}(hhh]j()}(h=Query hardware capabilities Cannot be used in atomic context.h]h=Query hardware capabilities Cannot be used in atomic context.}(hjachhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj^chhubah}(h]h ]h"]h$]h&]uh1jhj&bhhhj?bhKubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jycj#jycj$j%j&uh1hhhhj>hNhNubj_)}(hX**Parameters** ``struct pwm_device *pwm`` PWM device ``struct pwm_waveform *wf`` waveform to round and output parameter **Description** Typically a given waveform cannot be implemented exactly by hardware, e.g. because hardware only supports coarse period resolution or no duty_offset. This function returns the actually implemented waveform if you pass **wf** to pwm_set_waveform_might_sleep() now. Note however that the world doesn't stop turning when you call it, so when doing:: pwm_round_waveform_might_sleep(mypwm, &wf); pwm_set_waveform_might_sleep(mypwm, &wf, true); the latter might fail, e.g. because an input clock changed its rate between these two calls and the waveform determined by pwm_round_waveform_might_sleep() cannot be implemented any more. Usually all values passed in **wf** are rounded down to the nearest possible value (in the order period_length_ns, duty_length_ns and then duty_offset_ns). Only if this isn't possible, a value might grow. See the documentation for pwm_set_waveform_might_sleep() for a more formal description. **Return** 0 on success, 1 if at least one value had to be rounded up or a negative errno. **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hjch]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjcubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjch]hstruct pwm_device *pwm}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjcubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhjcubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjchKhjcubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjchKhjcubj)}(hC``struct pwm_waveform *wf`` waveform to round and output parameter h](j)}(h``struct pwm_waveform *wf``h]j.)}(hjch]hstruct pwm_waveform *wf}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjcubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhjcubj)}(hhh]j()}(h&waveform to round and output parameterh]h&waveform to round and output parameter}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjchKhjcubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjchKhjcubeh}(h]h ]h"]h$]h&]uh1j~hj}cubj()}(h**Description**h]ji)}(hjdh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(hXTypically a given waveform cannot be implemented exactly by hardware, e.g. because hardware only supports coarse period resolution or no duty_offset. This function returns the actually implemented waveform if you pass **wf** to pwm_set_waveform_might_sleep() now.h](hTypically a given waveform cannot be implemented exactly by hardware, e.g. because hardware only supports coarse period resolution or no duty_offset. This function returns the actually implemented waveform if you pass }(hj,dhhhNhNubji)}(h**wf**h]hwf}(hj4dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,dubh' to pwm_set_waveform_might_sleep() now.}(hj,dhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(hRNote however that the world doesn't stop turning when you call it, so when doing::h]hSNote however that the world doesn’t stop turning when you call it, so when doing:}(hjMdhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj>A)}(h[pwm_round_waveform_might_sleep(mypwm, &wf); pwm_set_waveform_might_sleep(mypwm, &wf, true);h]h[pwm_round_waveform_might_sleep(mypwm, &wf); pwm_set_waveform_might_sleep(mypwm, &wf, true);}hj\dsbah}(h]h ]h"]h$]h&]hhuh1j=Ah[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(hthe latter might fail, e.g. because an input clock changed its rate between these two calls and the waveform determined by pwm_round_waveform_might_sleep() cannot be implemented any more.h]hthe latter might fail, e.g. because an input clock changed its rate between these two calls and the waveform determined by pwm_round_waveform_might_sleep() cannot be implemented any more.}(hjkdhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(hX$Usually all values passed in **wf** are rounded down to the nearest possible value (in the order period_length_ns, duty_length_ns and then duty_offset_ns). Only if this isn't possible, a value might grow. See the documentation for pwm_set_waveform_might_sleep() for a more formal description.h](hUsually all values passed in }(hjzdhhhNhNubji)}(h**wf**h]hwf}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjzdubhX are rounded down to the nearest possible value (in the order period_length_ns, duty_length_ns and then duty_offset_ns). Only if this isn’t possible, a value might grow. See the documentation for pwm_set_waveform_might_sleep() for a more formal description.}(hjzdhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(h **Return**h]ji)}(hjdh]hReturn}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(hO0 on success, 1 if at least one value had to be rounded up or a negative errno.h]hO0 on success, 1 if at least one value had to be rounded up or a negative errno.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(h **Context**h]ji)}(hjdh]hContext}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubj()}(h May sleep.h]h May sleep.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chKhj}cubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ)pwm_get_waveform_might_sleep (C function)c.pwm_get_waveform_might_sleephNtauh1hhj>hhhNhNubh)}(hhh](h)}(hRint pwm_get_waveform_might_sleep (struct pwm_device *pwm, struct pwm_waveform *wf)h]h)}(hQint pwm_get_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform *wf)h](jr)}(hinth]hint}(hj ehhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjehhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM$ubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhjehM$ubh)}(hpwm_get_waveform_might_sleeph]h)}(hpwm_get_waveform_might_sleeph]hpwm_get_waveform_might_sleep}(hj*ehhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj&eubah}(h]h ](hheh"]h$]h&]hhuh1hhjehhhjehM$ubj)}(h1(struct pwm_device *pwm, struct pwm_waveform *wf)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjFehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBeubj)}(h h]h }(hjSehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBeubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjdehhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjaeubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjfemodnameN classnameNjj)}j]j)}jj,esbc.pwm_get_waveform_might_sleepasbuh1hhjBeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBeubj)}(hjh]h*}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBeubh)}(hpwmh]hpwm}(hjehhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjBeubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj>eubj)}(hstruct pwm_waveform *wfh](j)}(hjh]hstruct}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubh)}(hhh]h)}(h pwm_waveformh]h pwm_waveform}(hjehhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjemodnameN classnameNjj)}j]jec.pwm_get_waveform_might_sleepasbuh1hhjeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj)}(hjh]h*}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubh)}(hwfh]hwf}(hjfhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjeubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj>eubeh}(h]h ]h"]h$]h&]hhuh1jhjehhhjehM$ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjehhhjehM$ubah}(h]jdah ](jjeh"]h$]h&]j j )j huh1hhjehM$hjdhhubj)}(hhh]j()}(hLQuery hardware about current configuration Cannot be used in atomic context.h]hLQuery hardware about current configuration Cannot be used in atomic context.}(hj9fhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM$hj6fhhubah}(h]h ]h"]h$]h&]uh1jhjdhhhjehM$ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jQfj#jQfj$j%j&uh1hhhhj>hNhNubj_)}(hXU**Parameters** ``struct pwm_device *pwm`` PWM device ``struct pwm_waveform *wf`` output parameter **Description** Stores the current configuration of the PWM in **wf**. Note this is the equivalent of pwm_get_state_hw() (and not pwm_get_state()) for pwm_waveform. **Return** 0 on success or a negative errno **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hj[fh]h Parameters}(hj]fhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYfubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM(hjUfubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjzfh]hstruct pwm_device *pwm}(hj|fhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjxfubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM&hjtfubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjfhM&hjfubah}(h]h ]h"]h$]h&]uh1jhjtfubeh}(h]h ]h"]h$]h&]uh1jhjfhM&hjqfubj)}(h-``struct pwm_waveform *wf`` output parameter h](j)}(h``struct pwm_waveform *wf``h]j.)}(hjfh]hstruct pwm_waveform *wf}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjfubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM'hjfubj)}(hhh]j()}(houtput parameterh]houtput parameter}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjfhM'hjfubah}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]uh1jhjfhM'hjqfubeh}(h]h ]h"]h$]h&]uh1j~hjUfubj()}(h**Description**h]ji)}(hjfh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM)hjUfubj()}(hStores the current configuration of the PWM in **wf**. Note this is the equivalent of pwm_get_state_hw() (and not pwm_get_state()) for pwm_waveform.h](h/Stores the current configuration of the PWM in }(hjghhhNhNubji)}(h**wf**h]hwf}(hj ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjgubh_. Note this is the equivalent of pwm_get_state_hw() (and not pwm_get_state()) for pwm_waveform.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM(hjUfubj()}(h **Return**h]ji)}(hj'gh]hReturn}(hj)ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj%gubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM+hjUfubj()}(h 0 on success or a negative errnoh]h 0 on success or a negative errno}(hj=ghhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM,hjUfubj()}(h **Context**h]ji)}(hjNgh]hContext}(hjPghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLgubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM.hjUfubj()}(h May sleep.h]h May sleep.}(hjdghhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM-hjUfubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ)pwm_set_waveform_might_sleep (C function)c.pwm_set_waveform_might_sleephNtauh1hhj>hhhNhNubh)}(hhh](h)}(hdint pwm_set_waveform_might_sleep (struct pwm_device *pwm, const struct pwm_waveform *wf, bool exact)h]h)}(hcint pwm_set_waveform_might_sleep(struct pwm_device *pwm, const struct pwm_waveform *wf, bool exact)h](jr)}(hinth]hint}(hjghhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjghhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjghhhjghMubh)}(hpwm_set_waveform_might_sleeph]h)}(hpwm_set_waveform_might_sleeph]hpwm_set_waveform_might_sleep}(hjghhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjgubah}(h]h ](hheh"]h$]h&]hhuh1hhjghhhjghMubj)}(hC(struct pwm_device *pwm, const struct pwm_waveform *wf, bool exact)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjghhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjgmodnameN classnameNjj)}j]j)}jjgsbc.pwm_set_waveform_might_sleepasbuh1hhjgubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(hjh]h*}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubh)}(hpwmh]hpwm}(hj)hhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjgubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubj)}(hconst struct pwm_waveform *wfh](j)}(hjh]hconst}(hjBhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubj)}(h h]h }(hjOhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubj)}(hjh]hstruct}(hj]hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubj)}(h h]h }(hjjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubh)}(hhh]h)}(h pwm_waveformh]h pwm_waveform}(hj{hhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjxhubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj}hmodnameN classnameNjj)}j]j hc.pwm_set_waveform_might_sleepasbuh1hhj>hubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubj)}(hjh]h*}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hubh)}(hwfh]hwf}(hjhhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj>hubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubj)}(h bool exacth](jr)}(hjYh]hbool}(hjhhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjhubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubh)}(hexacth]hexact}(hjhhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubeh}(h]h ]h"]h$]h&]hhuh1jhjghhhjghMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjghhhjghMubah}(h]jgah ](jjeh"]h$]h&]j j )j huh1hhjghMhjghhubj)}(hhh]j()}(h6Apply a new waveform Cannot be used in atomic context.h]h6Apply a new waveform Cannot be used in atomic context.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjihhubah}(h]h ]h"]h$]h&]uh1jhjghhhjghMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j*ij#j*ij$j%j&uh1hhhhj>hNhNubj_)}(hX**Parameters** ``struct pwm_device *pwm`` PWM device ``const struct pwm_waveform *wf`` The waveform to apply ``bool exact`` If true no rounding is allowed **Description** Typically a requested waveform cannot be implemented exactly, e.g. because you requested .period_length_ns = 100 ns, but the hardware can only set periods that are a multiple of 8.5 ns. With that hardware passing **exact** = true results in pwm_set_waveform_might_sleep() failing and returning -EDOM. If **exact** = false you get a period of 93.5 ns (i.e. the biggest period not bigger than the requested value). Note that even with **exact** = true, some rounding by less than 1 ns is possible/needed. In the above example requesting .period_length_ns = 94 and **exact** = true, you get the hardware configured with period = 93.5 ns. Let C be the set of possible hardware configurations for a given PWM device, consisting of tuples (p, d, o) where p is the period length, d is the duty length and o the duty offset. The following algorithm is implemented to pick the hardware setting (p, d, o) ∈ C for a given request (p', d', o') with **exact** = false:: p = max( { ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C ∧ ṗ ≤ p' } ∪ { min({ ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C }) }) d = max( { ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C ∧ ḋ ≤ d' } ∪ { min({ ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C }) }) o = max( { ȯ | (p, d, ȯ) ∈ C ∧ ȯ ≤ o' } ∪ { min({ ȯ | (p, d, ȯ) ∈ C }) }) In words: The chosen period length is the maximal possible period length not bigger than the requested period length and if that doesn't exist, the minimal period length. The chosen duty length is the maximal possible duty length that is compatible with the chosen period length and isn't bigger than the requested duty length. Again if such a value doesn't exist, the minimal duty length compatible with the chosen period is picked. After that the duty offset compatible with the chosen period and duty length is chosen in the same way. **Return** 0 on success, -EDOM if setting failed due to the exact waveform not being possible (if **exact**), or a different negative errno on failure. **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hj4ih]h Parameters}(hj6ihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2iubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjSih]hstruct pwm_device *pwm}(hjUihhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjQiubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjMiubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjlihhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhihMhjiiubah}(h]h ]h"]h$]h&]uh1jhjMiubeh}(h]h ]h"]h$]h&]uh1jhjhihMhjJiubj)}(h8``const struct pwm_waveform *wf`` The waveform to apply h](j)}(h!``const struct pwm_waveform *wf``h]j.)}(hjih]hconst struct pwm_waveform *wf}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjiubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjiubj)}(hhh]j()}(hThe waveform to applyh]hThe waveform to apply}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjihMhjiubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1jhjihMhjJiubj)}(h.``bool exact`` If true no rounding is allowed h](j)}(h``bool exact``h]j.)}(hjih]h bool exact}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjiubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjiubj)}(hhh]j()}(hIf true no rounding is allowedh]hIf true no rounding is allowed}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjihMhjiubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1jhjihMhjJiubeh}(h]h ]h"]h$]h&]uh1j~hj.iubj()}(h**Description**h]ji)}(hjjh]h Description}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjiubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(hXzTypically a requested waveform cannot be implemented exactly, e.g. because you requested .period_length_ns = 100 ns, but the hardware can only set periods that are a multiple of 8.5 ns. With that hardware passing **exact** = true results in pwm_set_waveform_might_sleep() failing and returning -EDOM. If **exact** = false you get a period of 93.5 ns (i.e. the biggest period not bigger than the requested value). Note that even with **exact** = true, some rounding by less than 1 ns is possible/needed. In the above example requesting .period_length_ns = 94 and **exact** = true, you get the hardware configured with period = 93.5 ns.h](hTypically a requested waveform cannot be implemented exactly, e.g. because you requested .period_length_ns = 100 ns, but the hardware can only set periods that are a multiple of 8.5 ns. With that hardware passing }(hjjhhhNhNubji)}(h **exact**h]hexact}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubhR = true results in pwm_set_waveform_might_sleep() failing and returning -EDOM. If }(hjjhhhNhNubji)}(h **exact**h]hexact}(hj0jhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubhx = false you get a period of 93.5 ns (i.e. the biggest period not bigger than the requested value). Note that even with }(hjjhhhNhNubji)}(h **exact**h]hexact}(hjBjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubhx = true, some rounding by less than 1 ns is possible/needed. In the above example requesting .period_length_ns = 94 and }(hjjhhhNhNubji)}(h **exact**h]hexact}(hjTjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubh? = true, you get the hardware configured with period = 93.5 ns.}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(hLet C be the set of possible hardware configurations for a given PWM device, consisting of tuples (p, d, o) where p is the period length, d is the duty length and o the duty offset.h]hLet C be the set of possible hardware configurations for a given PWM device, consisting of tuples (p, d, o) where p is the period length, d is the duty length and o the duty offset.}(hjmjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(hThe following algorithm is implemented to pick the hardware setting (p, d, o) ∈ C for a given request (p', d', o') with **exact** = false::h](hThe following algorithm is implemented to pick the hardware setting (p, d, o) ∈ C for a given request (p’, d’, o’) with }(hj|jhhhNhNubji)}(h **exact**h]hexact}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|jubh = false:}(hj|jhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj>A)}(hXJp = max( { ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C ∧ ṗ ≤ p' } ∪ { min({ ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C }) }) d = max( { ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C ∧ ḋ ≤ d' } ∪ { min({ ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C }) }) o = max( { ȯ | (p, d, ȯ) ∈ C ∧ ȯ ≤ o' } ∪ { min({ ȯ | (p, d, ȯ) ∈ C }) })h]hXJp = max( { ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C ∧ ṗ ≤ p' } ∪ { min({ ṗ | ∃ ḋ, ȯ : (ṗ, ḋ, ȯ) ∈ C }) }) d = max( { ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C ∧ ḋ ≤ d' } ∪ { min({ ḋ | ∃ ȯ : (p, ḋ, ȯ) ∈ C }) }) o = max( { ȯ | (p, d, ȯ) ∈ C ∧ ȯ ≤ o' } ∪ { min({ ȯ | (p, d, ȯ) ∈ C }) })}hjjsbah}(h]h ]h"]h$]h&]hhuh1j=Ah[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(hXIn words: The chosen period length is the maximal possible period length not bigger than the requested period length and if that doesn't exist, the minimal period length. The chosen duty length is the maximal possible duty length that is compatible with the chosen period length and isn't bigger than the requested duty length. Again if such a value doesn't exist, the minimal duty length compatible with the chosen period is picked. After that the duty offset compatible with the chosen period and duty length is chosen in the same way.h]hXIn words: The chosen period length is the maximal possible period length not bigger than the requested period length and if that doesn’t exist, the minimal period length. The chosen duty length is the maximal possible duty length that is compatible with the chosen period length and isn’t bigger than the requested duty length. Again if such a value doesn’t exist, the minimal duty length compatible with the chosen period is picked. After that the duty offset compatible with the chosen period and duty length is chosen in the same way.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(h **Return**h]ji)}(hjjh]hReturn}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(h0 on success, -EDOM if setting failed due to the exact waveform not being possible (if **exact**), or a different negative errno on failure.h](hW0 on success, -EDOM if setting failed due to the exact waveform not being possible (if }(hjjhhhNhNubji)}(h **exact**h]hexact}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubh,), or a different negative errno on failure.}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(h **Context**h]ji)}(hjjh]hContext}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubj()}(h May sleep.h]h May sleep.}(hj khhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj.iubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ"pwm_apply_might_sleep (C function)c.pwm_apply_might_sleephNtauh1hhj>hhhNhNubh)}(hhh](h)}(hQint pwm_apply_might_sleep (struct pwm_device *pwm, const struct pwm_state *state)h]h)}(hPint pwm_apply_might_sleep(struct pwm_device *pwm, const struct pwm_state *state)h](jr)}(hinth]hint}(hj;khhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj7khhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMubj)}(h h]h }(hjJkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7khhhjIkhMubh)}(hpwm_apply_might_sleeph]h)}(hpwm_apply_might_sleeph]hpwm_apply_might_sleep}(hj\khhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjXkubah}(h]h ](hheh"]h$]h&]hhuh1hhj7khhhjIkhMubj)}(h7(struct pwm_device *pwm, const struct pwm_state *state)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjxkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtkubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjkhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjkmodnameN classnameNjj)}j]j)}jj^ksbc.pwm_apply_might_sleepasbuh1hhjtkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtkubj)}(hjh]h*}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtkubh)}(hpwmh]hpwm}(hjkhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtkubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjpkubj)}(hconst struct pwm_state *stateh](j)}(hjh]hconst}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(hjh]hstruct}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hj#lhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj lubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj%lmodnameN classnameNjj)}j]jkc.pwm_apply_might_sleepasbuh1hhjkubj)}(h h]h }(hjAlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(hjh]h*}(hjOlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hstateh]hstate}(hj\lhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjkubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjpkubeh}(h]h ]h"]h$]h&]hhuh1jhj7khhhjIkhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj3khhhjIkhMubah}(h]j.kah ](jjeh"]h$]h&]j j )j huh1hhjIkhMhj0khhubj)}(hhh]j()}(hNatomically apply a new state to a PWM device Cannot be used in atomic context.h]hNatomically apply a new state to a PWM device Cannot be used in atomic context.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlhhubah}(h]h ]h"]h$]h&]uh1jhj0khhhjIkhMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jlj#jlj$j%j&uh1hhhhj>hNhNubj_)}(h**Parameters** ``struct pwm_device *pwm`` PWM device ``const struct pwm_state *state`` new state to apply **Return** 0 on success, or a negative errno **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hjlh]h Parameters}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjlubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjlh]hstruct pwm_device *pwm}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjlubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjlhMhjlubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjlhMhjlubj)}(h5``const struct pwm_state *state`` new state to apply h](j)}(h!``const struct pwm_state *state``h]j.)}(hjmh]hconst struct pwm_state *state}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjlubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj)}(hhh]j()}(hnew state to applyh]hnew state to apply}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjmhMhjmubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjmhMhjlubeh}(h]h ]h"]h$]h&]uh1j~hjlubj()}(h **Return**h]ji)}(hj;mh]hReturn}(hj=mhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9mubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj()}(h!0 on success, or a negative errnoh]h!0 on success, or a negative errno}(hjQmhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj()}(h **Context**h]ji)}(hjbmh]hContext}(hjdmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`mubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubj()}(h May sleep.h]h May sleep.}(hjxmhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjlubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_apply_atomic (C function)c.pwm_apply_atomichNtauh1hhj>hhhNhNubh)}(hhh](h)}(hLint pwm_apply_atomic (struct pwm_device *pwm, const struct pwm_state *state)h]h)}(hKint pwm_apply_atomic(struct pwm_device *pwm, const struct pwm_state *state)h](jr)}(hinth]hint}(hjmhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjmhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmhhhjmhMubh)}(hpwm_apply_atomich]h)}(hpwm_apply_atomich]hpwm_apply_atomic}(hjmhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjmubah}(h]h ](hheh"]h$]h&]hhuh1hhjmhhhjmhMubj)}(h7(struct pwm_device *pwm, const struct pwm_state *state)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjnhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjnmodnameN classnameNjj)}j]j)}jjmsbc.pwm_apply_atomicasbuh1hhjmubj)}(h h]h }(hj"nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(hjh]h*}(hj0nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubh)}(hpwmh]hpwm}(hj=nhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjmubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjmubj)}(hconst struct pwm_state *stateh](j)}(hjh]hconst}(hjVnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubj)}(h h]h }(hjcnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubj)}(hjh]hstruct}(hjqnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubj)}(h h]h }(hj~nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hjnhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjnubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjnmodnameN classnameNjj)}j]jnc.pwm_apply_atomicasbuh1hhjRnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubj)}(hjh]h*}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRnubh)}(hstateh]hstate}(hjnhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjRnubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjmubeh}(h]h ]h"]h$]h&]hhuh1jhjmhhhjmhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjmhhhjmhMubah}(h]jmah ](jjeh"]h$]h&]j j )j huh1hhjmhMhjmhhubj)}(hhh]j()}(h~apply a new state to a PWM device from atomic context Not all PWM devices support this function, check with pwm_might_sleep().h]h~apply a new state to a PWM device from atomic context Not all PWM devices support this function, check with pwm_might_sleep().}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjnhhubah}(h]h ]h"]h$]h&]uh1jhjmhhhjmhMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j oj#j oj$j%j&uh1hhhhj>hNhNubj_)}(h**Parameters** ``struct pwm_device *pwm`` PWM device ``const struct pwm_state *state`` new state to apply **Return** 0 on success, or a negative errno **Context** Anyh](j()}(h**Parameters**h]ji)}(hjoh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjoubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjoubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hj3oh]hstruct pwm_device *pwm}(hj5ohhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj1oubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj-oubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjLohhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjHohMhjIoubah}(h]h ]h"]h$]h&]uh1jhj-oubeh}(h]h ]h"]h$]h&]uh1jhjHohMhj*oubj)}(h5``const struct pwm_state *state`` new state to apply h](j)}(h!``const struct pwm_state *state``h]j.)}(hjloh]hconst struct pwm_state *state}(hjnohhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjjoubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjfoubj)}(hhh]j()}(hnew state to applyh]hnew state to apply}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjohMhjoubah}(h]h ]h"]h$]h&]uh1jhjfoubeh}(h]h ]h"]h$]h&]uh1jhjohMhj*oubeh}(h]h ]h"]h$]h&]uh1j~hjoubj()}(h **Return**h]ji)}(hjoh]hReturn}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjoubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjoubj()}(h!0 on success, or a negative errnoh]h!0 on success, or a negative errno}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjoubj()}(h **Context**h]ji)}(hjoh]hContext}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjoubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjoubj()}(hAnyh]hAny}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjoubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_get_state_hw (C function)c.pwm_get_state_hwhNtauh1hhj>hhhNhNubh)}(hhh](h)}(hFint pwm_get_state_hw (struct pwm_device *pwm, struct pwm_state *state)h]h)}(hEint pwm_get_state_hw(struct pwm_device *pwm, struct pwm_state *state)h](jr)}(hinth]hint}(hjphhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjphhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMubj)}(h h]h }(hj"phhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjphhhj!phMubh)}(hpwm_get_state_hwh]h)}(hpwm_get_state_hwh]hpwm_get_state_hw}(hj4phhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj0pubah}(h]h ](hheh"]h$]h&]hhuh1hhjphhhj!phMubj)}(h1(struct pwm_device *pwm, struct pwm_state *state)h](j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjPphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLpubj)}(h h]h }(hj]phhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLpubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjnphhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjkpubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjppmodnameN classnameNjj)}j]j)}jj6psbc.pwm_get_state_hwasbuh1hhjLpubj)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLpubj)}(hjh]h*}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLpubh)}(hpwmh]hpwm}(hjphhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjLpubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHpubj)}(hstruct pwm_state *stateh](j)}(hjh]hstruct}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubh)}(hhh]h)}(h pwm_stateh]h pwm_state}(hjphhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjpubahD}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjpmodnameN classnameNjj)}j]jpc.pwm_get_state_hwasbuh1hhjpubj)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(hjh]h*}(hj qhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubh)}(hstateh]hstate}(hjqhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjpubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHpubeh}(h]h ]h"]h$]h&]hhuh1jhjphhhj!phMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj phhhj!phMubah}(h]jpah ](jjeh"]h$]h&]j j )j huh1hhj!phMhjphhubj)}(hhh]j()}(h'get the current PWM state from hardwareh]h'get the current PWM state from hardware}(hjCqhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj@qhhubah}(h]h ]h"]h$]h&]uh1jhjphhhj!phMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j[qj#j[qj$j%j&uh1hhhhj>hNhNubj_)}(hXR**Parameters** ``struct pwm_device *pwm`` PWM device ``struct pwm_state *state`` state to fill with the current PWM state **Description** Similar to pwm_get_state() but reads the current PWM state from hardware instead of the requested state. **Return** 0 on success or a negative error code on failure. **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hjeqh]h Parameters}(hjgqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjcqubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj)}(hhh](j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjqh]hstruct pwm_device *pwm}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjqubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj~qubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjqhMhjqubah}(h]h ]h"]h$]h&]uh1jhj~qubeh}(h]h ]h"]h$]h&]uh1jhjqhMhj{qubj)}(hE``struct pwm_state *state`` state to fill with the current PWM state h](j)}(h``struct pwm_state *state``h]j.)}(hjqh]hstruct pwm_state *state}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjqubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjqubj)}(hhh]j()}(h(state to fill with the current PWM stateh]h(state to fill with the current PWM state}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjqhMhjqubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjqhMhj{qubeh}(h]h ]h"]h$]h&]uh1j~hj_qubj()}(h**Description**h]ji)}(hjqh]h Description}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjqubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj()}(hhSimilar to pwm_get_state() but reads the current PWM state from hardware instead of the requested state.h]hhSimilar to pwm_get_state() but reads the current PWM state from hardware instead of the requested state.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj()}(h **Return**h]ji)}(hjrh]hReturn}(hj!rhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj()}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hj5rhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj()}(h **Context**h]ji)}(hjFrh]hContext}(hjHrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDrubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubj()}(h May sleep.h]h May sleep.}(hj\rhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhj_qubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_adjust_config (C function)c.pwm_adjust_confighNtauh1hhj>hhhNhNubh)}(hhh](h)}(h.int pwm_adjust_config (struct pwm_device *pwm)h]h)}(h-int pwm_adjust_config(struct pwm_device *pwm)h](jr)}(hinth]hint}(hjrhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjrhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMCubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhjrhMCubh)}(hpwm_adjust_configh]h)}(hpwm_adjust_configh]hpwm_adjust_config}(hjrhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjrubah}(h]h ](hheh"]h$]h&]hhuh1hhjrhhhjrhMCubj)}(h(struct pwm_device *pwm)h]j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjrhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjrubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjrmodnameN classnameNjj)}j]j)}jjrsbc.pwm_adjust_configasbuh1hhjrubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(hjh]h*}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubh)}(hpwmh]hpwm}(hj!shhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjrubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjrubah}(h]h ]h"]h$]h&]hhuh1jhjrhhhjrhMCubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjrhhhjrhMCubah}(h]j~rah ](jjeh"]h$]h&]j j )j huh1hhjrhMChjrhhubj)}(hhh]j()}(h2adjust the current PWM config to the PWM argumentsh]h2adjust the current PWM config to the PWM arguments}(hjKshhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMChjHshhubah}(h]h ]h"]h$]h&]uh1jhjrhhhjrhMCubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jcsj#jcsj$j%j&uh1hhhhj>hNhNubj_)}(hXT**Parameters** ``struct pwm_device *pwm`` PWM device **Description** This function will adjust the PWM config to the PWM arguments provided by the DT or PWM lookup table. This is particularly useful to adapt the bootloader config to the Linux one. **Return** 0 on success or a negative error code on failure. **Context** May sleep.h](j()}(h**Parameters**h]ji)}(hjmsh]h Parameters}(hjoshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjksubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMGhjgsubj)}(hhh]j)}(h&``struct pwm_device *pwm`` PWM device h](j)}(h``struct pwm_device *pwm``h]j.)}(hjsh]hstruct pwm_device *pwm}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjsubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMDhjsubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjshMDhjsubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjshMDhjsubah}(h]h ]h"]h$]h&]uh1j~hjgsubj()}(h**Description**h]ji)}(hjsh]h Description}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjsubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMFhjgsubj()}(hThis function will adjust the PWM config to the PWM arguments provided by the DT or PWM lookup table. This is particularly useful to adapt the bootloader config to the Linux one.h]hThis function will adjust the PWM config to the PWM arguments provided by the DT or PWM lookup table. This is particularly useful to adapt the bootloader config to the Linux one.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMEhjgsubj()}(h **Return**h]ji)}(hjsh]hReturn}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjsubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMIhjgsubj()}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMJhjgsubj()}(h **Context**h]ji)}(hjth]hContext}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjtubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMLhjgsubj()}(h May sleep.h]h May sleep.}(hj+thhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMKhjgsubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_get (C function) c.pwm_gethNtauh1hhj>hhhNhNubh)}(hhh](h)}(hDstruct pwm_device * pwm_get (struct device *dev, const char *con_id)h]h)}(hBstruct pwm_device *pwm_get(struct device *dev, const char *con_id)h](j)}(hjh]hstruct}(hjZthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVthhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMbubj)}(h h]h }(hjhthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVthhhjgthMbubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjythhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjvtubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{tmodnameN classnameNjj)}j]j)}jpwm_getsb c.pwm_getasbuh1hhjVthhhjgthMbubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVthhhjgthMbubj)}(hjh]h*}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVthhhjgthMbubh)}(hpwm_geth]h)}(hjth]hpwm_get}(hjthhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtubah}(h]h ](hheh"]h$]h&]hhuh1hhjVthhhjgthMbubj)}(h((struct device *dev, const char *con_id)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]h)}(hdeviceh]hdevice}(hjthhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjtmodnameN classnameNjj)}j]jt c.pwm_getasbuh1hhjtubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(hjh]h*}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hdevh]hdev}(hj+uhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjtubj)}(hconst char *con_idh](j)}(hjh]hconst}(hjDuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@uubj)}(h h]h }(hjQuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@uubjr)}(hcharh]hchar}(hj_uhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj@uubj)}(h h]h }(hjmuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@uubj)}(hjh]h*}(hj{uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@uubh)}(hcon_idh]hcon_id}(hjuhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj@uubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjtubeh}(h]h ]h"]h$]h&]hhuh1jhjVthhhjgthMbubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjRthhhjgthMbubah}(h]jMtah ](jjeh"]h$]h&]j j )j huh1hhjgthMbhjOthhubj)}(hhh]j()}(h look up and request a PWM deviceh]h look up and request a PWM device}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMbhjuhhubah}(h]h ]h"]h$]h&]uh1jhjOthhhjgthMbubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"juj#juj$j%j&uh1hhhhj>hNhNubj_)}(hX**Parameters** ``struct device *dev`` device for PWM consumer ``const char *con_id`` consumer name **Description** Lookup is first attempted using DT. If the device was not instantiated from a device tree, a PWM chip and a relative index is looked up via a table supplied by board setup code (see pwm_add_table()). Once a PWM chip has been found the specified PWM device will be requested and is ready to be used. **Return** A pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h](j()}(h**Parameters**h]ji)}(hjuh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMfhjuubj)}(hhh](j)}(h/``struct device *dev`` device for PWM consumer h](j)}(h``struct device *dev``h]j.)}(hjuh]hstruct device *dev}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjuubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMchjuubj)}(hhh]j()}(hdevice for PWM consumerh]hdevice for PWM consumer}(hj vhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjvhMchj vubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjvhMchjuubj)}(h%``const char *con_id`` consumer name h](j)}(h``const char *con_id``h]j.)}(hj,vh]hconst char *con_id}(hj.vhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj*vubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMdhj&vubj)}(hhh]j()}(h consumer nameh]h consumer name}(hjEvhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjAvhMdhjBvubah}(h]h ]h"]h$]h&]uh1jhj&vubeh}(h]h ]h"]h$]h&]uh1jhjAvhMdhjuubeh}(h]h ]h"]h$]h&]uh1j~hjuubj()}(h**Description**h]ji)}(hjgvh]h Description}(hjivhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjevubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMfhjuubj()}(hLookup is first attempted using DT. If the device was not instantiated from a device tree, a PWM chip and a relative index is looked up via a table supplied by board setup code (see pwm_add_table()).h]hLookup is first attempted using DT. If the device was not instantiated from a device tree, a PWM chip and a relative index is looked up via a table supplied by board setup code (see pwm_add_table()).}(hj}vhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMehjuubj()}(hbOnce a PWM chip has been found the specified PWM device will be requested and is ready to be used.h]hbOnce a PWM chip has been found the specified PWM device will be requested and is ready to be used.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMihjuubj()}(h **Return**h]ji)}(hjvh]hReturn}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMlhjuubj()}(hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h]hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMmhjuubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwm_put (C function) c.pwm_puthNtauh1hhj>hhhNhNubh)}(hhh](h)}(h%void pwm_put (struct pwm_device *pwm)h]h)}(h$void pwm_put(struct pwm_device *pwm)h](jr)}(hvoidh]hvoid}(hjvhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhjvhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvhhhjvhMubh)}(hpwm_puth]h)}(hpwm_puth]hpwm_put}(hjwhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjvubah}(h]h ](hheh"]h$]h&]hhuh1hhjvhhhjvhMubj)}(h(struct pwm_device *pwm)h]j)}(hstruct pwm_device *pwmh](j)}(hjh]hstruct}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(h h]h }(hj,whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj=whhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj:wubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj?wmodnameN classnameNjj)}j]j)}jjwsb c.pwm_putasbuh1hhjwubj)}(h h]h }(hj]whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(hjh]h*}(hjkwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hpwmh]hpwm}(hjxwhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjwubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjwubah}(h]h ]h"]h$]h&]hhuh1jhjvhhhjvhMubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjvhhhjvhMubah}(h]jvah ](jjeh"]h$]h&]j j )j huh1hhjvhMhjvhhubj)}(hhh]j()}(hrelease a PWM deviceh]hrelease a PWM device}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjwhhubah}(h]h ]h"]h$]h&]uh1jhjvhhhjvhMubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jwj#jwj$j%j&uh1hhhhj>hNhNubj_)}(h7**Parameters** ``struct pwm_device *pwm`` PWM deviceh](j()}(h**Parameters**h]ji)}(hjwh]h Parameters}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjwubj)}(hhh]j)}(h%``struct pwm_device *pwm`` PWM deviceh](j)}(h``struct pwm_device *pwm``h]j.)}(hjwh]hstruct pwm_device *pwm}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjwubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjwubj)}(hhh]j()}(h PWM deviceh]h PWM device}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjwubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1jhjwhMhjwubah}(h]h ]h"]h$]h&]uh1j~hjwubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČdevm_pwm_get (C function)c.devm_pwm_gethNtauh1hhj>hhhNhNubh)}(hhh](h)}(hIstruct pwm_device * devm_pwm_get (struct device *dev, const char *con_id)h]h)}(hGstruct pwm_device *devm_pwm_get(struct device *dev, const char *con_id)h](j)}(hjh]hstruct}(hj=xhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9xhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM ubj)}(h h]h }(hjKxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9xhhhjJxhM ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hj\xhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjYxubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj^xmodnameN classnameNjj)}j]j)}j devm_pwm_getsbc.devm_pwm_getasbuh1hhj9xhhhjJxhM ubj)}(h h]h }(hj}xhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9xhhhjJxhM ubj)}(hjh]h*}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9xhhhjJxhM ubh)}(h devm_pwm_geth]h)}(hjzxh]h devm_pwm_get}(hjxhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjxubah}(h]h ](hheh"]h$]h&]hhuh1hhj9xhhhjJxhM ubj)}(h((struct device *dev, const char *con_id)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubh)}(hhh]h)}(hdeviceh]hdevice}(hjxhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjxubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjxmodnameN classnameNjj)}j]jxxc.devm_pwm_getasbuh1hhjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(hjh]h*}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubh)}(hdevh]hdev}(hjyhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjxubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjxubj)}(hconst char *con_idh](j)}(hjh]hconst}(hj'yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#yubj)}(h h]h }(hj4yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#yubjr)}(hcharh]hchar}(hjByhhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj#yubj)}(h h]h }(hjPyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#yubj)}(hjh]h*}(hj^yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#yubh)}(hcon_idh]hcon_id}(hjkyhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj#yubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjxubeh}(h]h ]h"]h$]h&]hhuh1jhj9xhhhjJxhM ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj5xhhhjJxhM ubah}(h]j0xah ](jjeh"]h$]h&]j j )j huh1hhjJxhM hj2xhhubj)}(hhh]j()}(hresource managed pwm_get()h]hresource managed pwm_get()}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjyhhubah}(h]h ]h"]h$]h&]uh1jhj2xhhhjJxhM ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jyj#jyj$j%j&uh1hhhhj>hNhNubj_)}(hXO**Parameters** ``struct device *dev`` device for PWM consumer ``const char *con_id`` consumer name **Description** This function performs like pwm_get() but the acquired PWM device will automatically be released on driver detach. **Return** A pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h](j()}(h**Parameters**h]ji)}(hjyh]h Parameters}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjyubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjyubj)}(hhh](j)}(h/``struct device *dev`` device for PWM consumer h](j)}(h``struct device *dev``h]j.)}(hjyh]hstruct device *dev}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjyubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjyubj)}(hhh]j()}(hdevice for PWM consumerh]hdevice for PWM consumer}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjyhM hjyubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjyhM hjyubj)}(h%``const char *con_id`` consumer name h](j)}(h``const char *con_id``h]j.)}(hjzh]hconst char *con_id}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj zubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hj zubj)}(hhh]j()}(h consumer nameh]h consumer name}(hj(zhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj$zhM hj%zubah}(h]h ]h"]h$]h&]uh1jhj zubeh}(h]h ]h"]h$]h&]uh1jhj$zhM hjyubeh}(h]h ]h"]h$]h&]uh1j~hjyubj()}(h**Description**h]ji)}(hjJzh]h Description}(hjLzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjHzubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjyubj()}(hrThis function performs like pwm_get() but the acquired PWM device will automatically be released on driver detach.h]hrThis function performs like pwm_get() but the acquired PWM device will automatically be released on driver detach.}(hj`zhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjyubj()}(h **Return**h]ji)}(hjqzh]hReturn}(hjszhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjozubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjyubj()}(hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h]hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMhjyubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ devm_fwnode_pwm_get (C function)c.devm_fwnode_pwm_gethNtauh1hhj>hhhNhNubh)}(hhh](h)}(hnstruct pwm_device * devm_fwnode_pwm_get (struct device *dev, struct fwnode_handle *fwnode, const char *con_id)h]h)}(hlstruct pwm_device *devm_fwnode_pwm_get(struct device *dev, struct fwnode_handle *fwnode, const char *con_id)h](j)}(hjh]hstruct}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM%ubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhM%ubh)}(hhh]h)}(h pwm_deviceh]h pwm_device}(hjzhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjzubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjzmodnameN classnameNjj)}j]j)}jdevm_fwnode_pwm_getsbc.devm_fwnode_pwm_getasbuh1hhjzhhhjzhM%ubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhM%ubj)}(hjh]h*}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhM%ubh)}(hdevm_fwnode_pwm_geth]h)}(hjzh]hdevm_fwnode_pwm_get}(hj{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj{ubah}(h]h ](hheh"]h$]h&]hhuh1hhjzhhhjzhM%ubj)}(hF(struct device *dev, struct fwnode_handle *fwnode, const char *con_id)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hj0{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,{ubj)}(h h]h }(hj={hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,{ubh)}(hhh]h)}(hdeviceh]hdevice}(hjN{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjK{ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjP{modnameN classnameNjj)}j]jzc.devm_fwnode_pwm_getasbuh1hhj,{ubj)}(h h]h }(hjl{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,{ubj)}(hjh]h*}(hjz{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,{ubh)}(hdevh]hdev}(hj{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj,{ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj({ubj)}(hstruct fwnode_handle *fwnodeh](j)}(hjh]hstruct}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubh)}(hhh]h)}(h fwnode_handleh]h fwnode_handle}(hj{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj{ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{modnameN classnameNjj)}j]jzc.devm_fwnode_pwm_getasbuh1hhj{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(hjh]h*}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubh)}(hfwnodeh]hfwnode}(hj{hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj{ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj({ubj)}(hconst char *con_idh](j)}(hjh]hconst}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubjr)}(hcharh]hchar}(hj+|hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj |ubj)}(h h]h }(hj9|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubj)}(hjh]h*}(hjG|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubh)}(hcon_idh]hcon_id}(hjT|hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj |ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj({ubeh}(h]h ]h"]h$]h&]hhuh1jhjzhhhjzhM%ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhjzhhhjzhM%ubah}(h]jzah ](jjeh"]h$]h&]j j )j huh1hhjzhM%hjzhhubj)}(hhh]j()}(h1request a resource managed PWM from firmware nodeh]h1request a resource managed PWM from firmware node}(hj~|hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM%hj{|hhubah}(h]h ]h"]h$]h&]uh1jhjzhhhjzhM%ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j|j#j|j$j%j&uh1hhhhj>hNhNubj_)}(hX**Parameters** ``struct device *dev`` device for PWM consumer ``struct fwnode_handle *fwnode`` firmware node to get the PWM from ``const char *con_id`` consumer name **Description** Returns the PWM device parsed from the firmware node. See of_pwm_get() and acpi_pwm_get() for a detailed description. **Return** A pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h](j()}(h**Parameters**h]ji)}(hj|h]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|ubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM)hj|ubj)}(hhh](j)}(h/``struct device *dev`` device for PWM consumer h](j)}(h``struct device *dev``h]j.)}(hj|h]hstruct device *dev}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj|ubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM&hj|ubj)}(hhh]j()}(hdevice for PWM consumerh]hdevice for PWM consumer}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj|hM&hj|ubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhj|hM&hj|ubj)}(hC``struct fwnode_handle *fwnode`` firmware node to get the PWM from h](j)}(h ``struct fwnode_handle *fwnode``h]j.)}(hj|h]hstruct fwnode_handle *fwnode}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj|ubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM'hj|ubj)}(hhh]j()}(h!firmware node to get the PWM fromh]h!firmware node to get the PWM from}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj }hM'hj}ubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhj }hM'hj|ubj)}(h%``const char *con_id`` consumer name h](j)}(h``const char *con_id``h]j.)}(hj1}h]hconst char *con_id}(hj3}hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj/}ubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM(hj+}ubj)}(hhh]j()}(h consumer nameh]h consumer name}(hjJ}hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjF}hM(hjG}ubah}(h]h ]h"]h$]h&]uh1jhj+}ubeh}(h]h ]h"]h$]h&]uh1jhjF}hM(hj|ubeh}(h]h ]h"]h$]h&]uh1j~hj|ubj()}(h**Description**h]ji)}(hjl}h]h Description}(hjn}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjj}ubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM*hj|ubj()}(huReturns the PWM device parsed from the firmware node. See of_pwm_get() and acpi_pwm_get() for a detailed description.h]huReturns the PWM device parsed from the firmware node. See of_pwm_get() and acpi_pwm_get() for a detailed description.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM)hj|ubj()}(h **Return**h]ji)}(hj}h]hReturn}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}ubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM,hj|ubj()}(hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.h]hTA pointer to the requested PWM device or an ERR_PTR()-encoded error code on failure.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM-hj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČ__pwmchip_add (C function)c.__pwmchip_addhNtauh1hhj>hhhNhNubh)}(hhh](h)}(h?int __pwmchip_add (struct pwm_chip *chip, struct module *owner)h]h)}(h>int __pwmchip_add(struct pwm_chip *chip, struct module *owner)h](jr)}(hinth]hint}(hj}hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj}hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMS ubj)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}hhhj}hMS ubh)}(h __pwmchip_addh]h)}(h __pwmchip_addh]h __pwmchip_add}(hj}hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj}ubah}(h]h ](hheh"]h$]h&]hhuh1hhj}hhhj}hMS ubj)}(h-(struct pwm_chip *chip, struct module *owner)h](j)}(hstruct pwm_chip *chiph](j)}(hjh]hstruct}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hj"~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hhh]h)}(hpwm_chiph]hpwm_chip}(hj3~hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj0~ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5~modnameN classnameNjj)}j]j)}jj}sbc.__pwmchip_addasbuh1hhj~ubj)}(h h]h }(hjS~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(hjh]h*}(hja~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hchiph]hchip}(hjn~hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj~ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ~ubj)}(hstruct module *ownerh](j)}(hjh]hstruct}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hhh]h)}(hmoduleh]hmodule}(hj~hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj~ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj~modnameN classnameNjj)}j]jO~c.__pwmchip_addasbuh1hhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(hjh]h*}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hownerh]howner}(hj~hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj~ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ~ubeh}(h]h ]h"]h$]h&]hhuh1jhj}hhhj}hMS ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj}hhhj}hMS ubah}(h]j}ah ](jjeh"]h$]h&]j j )j huh1hhj}hMS hj}hhubj)}(hhh]j()}(hregister a new PWM chiph]hregister a new PWM chip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMS hjhhubah}(h]h ]h"]h$]h&]uh1jhj}hhhj}hMS ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"j j#j j$j%j&uh1hhhhj>hNhNubj_)}(hXH**Parameters** ``struct pwm_chip *chip`` the PWM chip to add ``struct module *owner`` reference to the module providing the chip. **Description** Register a new PWM chip. **owner** is supposed to be THIS_MODULE, use the pwmchip_add wrapper to do this right. **Return** 0 on success or a negative error code on failure.h](j()}(h**Parameters**h]ji)}(hj*h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(ubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMW hj$ubj)}(hhh](j)}(h.``struct pwm_chip *chip`` the PWM chip to add h](j)}(h``struct pwm_chip *chip``h]j.)}(hjIh]hstruct pwm_chip *chip}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjGubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMT hjCubj)}(hhh]j()}(hthe PWM chip to addh]hthe PWM chip to add}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hj^hMT hj_ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj^hMT hj@ubj)}(hE``struct module *owner`` reference to the module providing the chip. h](j)}(h``struct module *owner``h]j.)}(hjh]hstruct module *owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j-hjubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMU hj|ubj)}(hhh]j()}(h+reference to the module providing the chip.h]h+reference to the module providing the chip.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjhMU hjubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhjhMU hj@ubeh}(h]h ]h"]h$]h&]uh1j~hj$ubj()}(h**Description**h]ji)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMW hj$ubj()}(hoRegister a new PWM chip. **owner** is supposed to be THIS_MODULE, use the pwmchip_add wrapper to do this right.h](hRegister a new PWM chip. }(hjhhhNhNubji)}(h **owner**h]howner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubhM is supposed to be THIS_MODULE, use the pwmchip_add wrapper to do this right.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMV hj$ubj()}(h **Return**h]ji)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMY hj$ubj()}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chMZ hj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hČpwmchip_remove (C function)c.pwmchip_removehNtauh1hhj>hhhNhNubh)}(hhh](h)}(h+void pwmchip_remove (struct pwm_chip *chip)h]h)}(h*void pwmchip_remove(struct pwm_chip *chip)h](jr)}(hvoidh]hvoid}(hj;hhhNhNubah}(h]h ]j~ah"]h$]h&]uh1jqhj7hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM ubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhjIhM ubh)}(hpwmchip_removeh]h)}(hpwmchip_removeh]hpwmchip_remove}(hj\hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjXubah}(h]h ](hheh"]h$]h&]hhuh1hhj7hhhjIhM ubj)}(h(struct pwm_chip *chip)h]j)}(hstruct pwm_chip *chiph](j)}(hjh]hstruct}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]h)}(hpwm_chiph]hpwm_chip}(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jj^sbc.pwmchip_removeasbuh1hhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(hjh]h*}(hjĀhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hchiph]hchip}(hjрhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjtubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjpubah}(h]h ]h"]h$]h&]hhuh1jhj7hhhjIhM ubeh}(h]h ]h"]h$]h&]hhjuh1hjjhj3hhhjIhM ubah}(h]j.ah ](jjeh"]h$]h&]j j )j huh1hhjIhM hj0hhubj)}(hhh]j()}(hremove a PWM chiph]hremove a PWM chip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjhhubah}(h]h ]h"]h$]h&]uh1jhj0hhhjIhM ubeh}(h]h ](jfunctioneh"]h$]h&]j!jj"jj#jj$j%j&uh1hhhhj>hNhNubj_)}(hh**Parameters** ``struct pwm_chip *chip`` the PWM chip to remove **Description** Removes a PWM chip.h](j()}(h**Parameters**h]ji)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjubj)}(hhh]j)}(h1``struct pwm_chip *chip`` the PWM chip to remove h](j)}(h``struct pwm_chip *chip``h]j.)}(hj<h]hstruct pwm_chip *chip}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hj:ubah}(h]h ]h"]h$]h&]uh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hj6ubj)}(hhh]j()}(hthe PWM chip to removeh]hthe PWM chip to remove}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjQhM hjRubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhjQhM hj3ubah}(h]h ]h"]h$]h&]uh1j~hjubj()}(h**Description**h]ji)}(hjwh]h Description}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjubj()}(hRemoves a PWM chip.h]hRemoves a PWM chip.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'h[/var/lib/git/docbuild/linux/Documentation/driver-api/miscellaneous:47: ./drivers/pwm/core.chM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j^hj>hhhNhNubeh}(h]pulse-width-modulation-pwmah ]h"]pulse-width modulation (pwm)ah$]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_handlerj΁error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j{7jx7j>j>jju nametypes}(j{7j>juh}(jx7hhhjZj_jdjijjjjjjj j j j jjjjjjj>jCjjjjj9j>j!j!j#j#jD%jI%j*j*j+j+jL-jQ-j/j/j0j0j*2j/2j3j3j5j5j>j~7j7j7jB9jG9j:j:j;j;j=j=jj>j?j?j@j@j+Bj0BjCjCjJFjOFjHjHjJjJjMjMjQjQjRjRjUjUjYjYjk[jp[j]j]jI_jN_j`j`j$bj)bjdjejgjgj.kj3kjmjmjpj pj~rjrjMtjRtjvjvj0xj5xjzjzj}j}j.j3u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.