€•ýkŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/driver-api/usb/callbacks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUSB core callbacks”h]”hŒUSB core callbacks”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒF/var/lib/git/docbuild/linux/Documentation/driver-api/usb/callbacks.rst”h´Kubh¶)”}”(hhh]”(h»)”}”(hŒWhat callbacks will usbcore do?”h]”hŒWhat callbacks will usbcore do?”…””}”(hhÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhËh²hh³hÊh´KubhŒ paragraph”“”)”}”(hXOUsbcore will call into a driver through callbacks defined in the driver structure and through the completion handler of URBs a driver submits. Only the former are in the scope of this document. These two kinds of callbacks are completely independent of each other. Information on the completion callback can be found in :ref:`usb-urb`.”h]”(hX@Usbcore will call into a driver through callbacks defined in the driver structure and through the completion handler of URBs a driver submits. Only the former are in the scope of this document. These two kinds of callbacks are completely independent of each other. Information on the completion callback can be found in ”…””}”(hhÞh²hh³Nh´Nubh)”}”(hŒ:ref:`usb-urb`”h]”hŒinline”“”)”}”(hhèh]”hŒusb-urb”…””}”(hhìh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hêhhæubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œdriver-api/usb/callbacks”Œ refdomain”h÷Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œusb-urb”uh1hh³hÊh´KhhÞubhŒ.”…””}”(hhÞh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hŒ2The callbacks defined in the driver structure are:”h]”hŒ2The callbacks defined in the driver structure are:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K hhËh²hubhŒenumerated_list”“”)”}”(hhh]”hŒ list_item”“”)”}”(hŒHotplugging callbacks: ”h]”hÝ)”}”(hŒHotplugging callbacks:”h]”hŒHotplugging callbacks:”…””}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hj%h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j#hhËh²hh³hÊh´KubhŒ block_quote”“”)”}”(hX,- @probe: Called to see if the driver is willing to manage a particular interface on a device. - @disconnect: Called when the interface is no longer accessible, usually because its device has been (or is being) disconnected or the driver module is being unloaded. ”h]”hŒ bullet_list”“”)”}”(hhh]”(j))”}”(hŒg@probe: Called to see if the driver is willing to manage a particular interface on a device. ”h]”hŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ]@probe: Called to see if the driver is willing to manage a particular interface on a device. ”h]”(hŒterm”“”)”}”(hŒ@probe:”h]”hŒ@probe:”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´KhjcubhŒ definition”“”)”}”(hhh]”hÝ)”}”(hŒTCalled to see if the driver is willing to manage a particular interface on a device.”h]”hŒTCalled to see if the driver is willing to manage a particular interface on a device.”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhjcubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´Khj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjXubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjUubj))”}”(hŒ¶@disconnect: Called when the interface is no longer accessible, usually because its device has been (or is being) disconnected or the driver module is being unloaded. ”h]”j])”}”(hhh]”jb)”}”(hŒ§@disconnect: Called when the interface is no longer accessible, usually because its device has been (or is being) disconnected or the driver module is being unloaded. ”h]”(jh)”}”(hŒ @disconnect:”h]”hŒ @disconnect:”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Khj©ubjx)”}”(hhh]”hÝ)”}”(hŒ™Called when the interface is no longer accessible, usually because its device has been (or is being) disconnected or the driver module is being unloaded.”h]”hŒ™Called when the interface is no longer accessible, usually because its device has been (or is being) disconnected or the driver module is being unloaded.”…””}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj»ubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´Khj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjUubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jSh³hÊh´KhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jMh³hÊh´KhhËh²hubj$)”}”(hhh]”j))”}”(hŒOdd backdoor through usbfs: ”h]”hÝ)”}”(hŒOdd backdoor through usbfs:”h]”hŒOdd backdoor through usbfs:”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjõubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjòh²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jHjIjJhjKjLŒstart”Kuh1j#hhËh²hh³hÊh´KubjN)”}”(hX- @ioctl: Used for drivers that want to talk to userspace through the "usbfs" filesystem. This lets devices provide ways to expose information to user space regardless of where they do (or don't) show up otherwise in the filesystem. ”h]”jT)”}”(hhh]”j))”}”(hŒü@ioctl: Used for drivers that want to talk to userspace through the "usbfs" filesystem. This lets devices provide ways to expose information to user space regardless of where they do (or don't) show up otherwise in the filesystem. ”h]”j])”}”(hhh]”jb)”}”(hŒè@ioctl: Used for drivers that want to talk to userspace through the "usbfs" filesystem. This lets devices provide ways to expose information to user space regardless of where they do (or don't) show up otherwise in the filesystem. ”h]”(jh)”}”(hŒ@ioctl:”h]”hŒ@ioctl:”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K hj"ubjx)”}”(hhh]”hÝ)”}”(hŒßUsed for drivers that want to talk to userspace through the "usbfs" filesystem. This lets devices provide ways to expose information to user space regardless of where they do (or don't) show up otherwise in the filesystem.”h]”hŒåUsed for drivers that want to talk to userspace through the “usbfs†filesystem. This lets devices provide ways to expose information to user space regardless of where they do (or don’t) show up otherwise in the filesystem.”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhj"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjubah}”(h]”h ]”h"]”h$]”h&]”jêjëuh1jSh³hÊh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jMh³hÊh´KhhËh²hubj$)”}”(hhh]”j))”}”(hŒ!Power management (PM) callbacks: ”h]”hÝ)”}”(hŒ Power management (PM) callbacks:”h]”hŒ Power management (PM) callbacks:”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K"hjlubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjih²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jHjIjJhjKjLjKuh1j#hhËh²hh³hÊh´K"ubjN)”}”(hŒê- @suspend: Called when the device is going to be suspended. - @resume: Called when the device is being resumed. - @reset_resume: Called when the suspended device has been reset instead of being resumed. ”h]”jT)”}”(hhh]”(j))”}”(hŒ@@suspend: Called when the device is going to be suspended. ”h]”j])”}”(hhh]”jb)”}”(hŒ;@suspend: Called when the device is going to be suspended. ”h]”(jh)”}”(hŒ @suspend:”h]”hŒ @suspend:”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K%hj˜ubjx)”}”(hhh]”hÝ)”}”(hŒ0Called when the device is going to be suspended.”h]”hŒ0Called when the device is going to be suspended.”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K%hjªubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhj˜ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K%hj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjŽubj))”}”(hŒ7@resume: Called when the device is being resumed. ”h]”j])”}”(hhh]”jb)”}”(hŒ2@resume: Called when the device is being resumed. ”h]”(jh)”}”(hŒ@resume:”h]”hŒ@resume:”…””}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K(hjÚubjx)”}”(hhh]”hÝ)”}”(hŒ(Called when the device is being resumed.”h]”hŒ(Called when the device is being resumed.”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K(hjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K(hj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjŽubj))”}”(hŒc@reset_resume: Called when the suspended device has been reset instead of being resumed. ”h]”j])”}”(hhh]”jb)”}”(hŒY@reset_resume: Called when the suspended device has been reset instead of being resumed. ”h]”(jh)”}”(hŒ@reset_resume:”h]”hŒ@reset_resume:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K,hjubjx)”}”(hhh]”hÝ)”}”(hŒICalled when the suspended device has been reset instead of being resumed.”h]”hŒICalled when the suspended device has been reset instead of being resumed.”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K+hj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K,hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjŽubeh}”(h]”h ]”h"]”h$]”h&]”jêjëuh1jSh³hÊh´K$hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jMh³hÊh´K$hhËh²hubj$)”}”(hhh]”j))”}”(hŒDevice level operations: ”h]”hÝ)”}”(hŒDevice level operations:”h]”hŒDevice level operations:”…””}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K.hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjch²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jHjIjJhjKjLjKuh1j#hhËh²hh³hÊh´K.ubjN)”}”(hŒ€- @pre_reset: Called when the device is about to be reset. - @post_reset: Called after the device has been reset ”h]”jT)”}”(hhh]”(j))”}”(hŒ>@pre_reset: Called when the device is about to be reset. ”h]”j])”}”(hhh]”jb)”}”(hŒ9@pre_reset: Called when the device is about to be reset. ”h]”(jh)”}”(hŒ @pre_reset:”h]”hŒ @pre_reset:”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K1hj’ubjx)”}”(hhh]”hÝ)”}”(hŒ,Called when the device is about to be reset.”h]”hŒ,Called when the device is about to be reset.”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K1hj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K1hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjˆubj))”}”(hŒ9@post_reset: Called after the device has been reset ”h]”j])”}”(hhh]”jb)”}”(hŒ4@post_reset: Called after the device has been reset ”h]”(jh)”}”(hŒ @post_reset:”h]”hŒ @post_reset:”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K4hjÔubjx)”}”(hhh]”hÝ)”}”(hŒ&Called after the device has been reset”h]”hŒ&Called after the device has been reset”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K4hjæubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhjÔubeh}”(h]”h ]”h"]”h$]”h&]”uh1jah³hÊh´K4hjÑubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjˆubeh}”(h]”h ]”h"]”h$]”h&]”jêjëuh1jSh³hÊh´K0hj„ubah}”(h]”h ]”h"]”h$]”h&]”uh1jMh³hÊh´K0hhËh²hubhÝ)”}”(hŒ²The ioctl interface (2) should be used only if you have a very good reason. Sysfs is preferred these days. The PM callbacks are covered separately in :ref:`usb-power-management`.”h]”(hŒ–The ioctl interface (2) should be used only if you have a very good reason. Sysfs is preferred these days. The PM callbacks are covered separately in ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:ref:`usb-power-management`”h]”hë)”}”(hj%h]”hŒusb-power-management”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”(höŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hêhj#ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j1Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œusb-power-management”uh1hh³hÊh´K6hjubhŒ.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K6hhËh²hubeh}”(h]”Œwhat-callbacks-will-usbcore-do”ah ]”h"]”Œwhat callbacks will usbcore do?”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒCalling conventions”h]”hŒCalling conventions”…””}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjUh²hh³hÊh´K;ubhÝ)”}”(hX1All callbacks are mutually exclusive. There's no need for locking against other USB callbacks. All callbacks are called from a task context. You may sleep. However, it is important that all sleeps have a small fixed upper limit in time. In particular you must not call out to user space and await results.”h]”hX3All callbacks are mutually exclusive. There’s no need for locking against other USB callbacks. All callbacks are called from a task context. You may sleep. However, it is important that all sleeps have a small fixed upper limit in time. In particular you must not call out to user space and await results.”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K=hjUh²hubeh}”(h]”Œcalling-conventions”ah ]”h"]”Œcalling conventions”ah$]”h&]”uh1hµhh·h²hh³hÊh´K;ubh¶)”}”(hhh]”(h»)”}”(hŒHotplugging callbacks”h]”hŒHotplugging callbacks”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj|h²hh³hÊh´KDubhÝ)”}”(hŒ„These callbacks are intended to associate and disassociate a driver with an interface. A driver's bond to an interface is exclusive.”h]”hŒ†These callbacks are intended to associate and disassociate a driver with an interface. A driver’s bond to an interface is exclusive.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KFhj|h²hubh¶)”}”(hhh]”(h»)”}”(hŒThe probe() callback”h]”hŒThe probe() callback”…””}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj›h²hh³hÊh´KJubhŒ literal_block”“”)”}”(hŒXint (*probe) (struct usb_interface *intf, const struct usb_device_id *id);”h]”hŒXint (*probe) (struct usb_interface *intf, const struct usb_device_id *id);”…””}”hj®sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j¬h³hÊh´KNhj›h²hubhÝ)”}”(hX¡Accept or decline an interface. If you accept the device return 0, otherwise -ENODEV or -ENXIO. Other error codes should be used only if a genuine error occurred during initialisation which prevented a driver from accepting a device that would else have been accepted. You are strongly encouraged to use usbcore's facility, usb_set_intfdata(), to associate a data structure with an interface, so that you know which internal state and identity you associate with a particular interface. The device will not be suspended and you may do IO to the interface you are called for and endpoint 0 of the device. Device initialisation that doesn't take too long is a good idea here.”h]”hX¥Accept or decline an interface. If you accept the device return 0, otherwise -ENODEV or -ENXIO. Other error codes should be used only if a genuine error occurred during initialisation which prevented a driver from accepting a device that would else have been accepted. You are strongly encouraged to use usbcore’s facility, usb_set_intfdata(), to associate a data structure with an interface, so that you know which internal state and identity you associate with a particular interface. The device will not be suspended and you may do IO to the interface you are called for and endpoint 0 of the device. Device initialisation that doesn’t take too long is a good idea here.”…””}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KQhj›h²hubeh}”(h]”Œthe-probe-callback”ah ]”h"]”Œthe probe() callback”ah$]”h&]”uh1hµhj|h²hh³hÊh´KJubh¶)”}”(hhh]”(h»)”}”(hŒThe disconnect() callback”h]”hŒThe disconnect() callback”…””}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÔh²hh³hÊh´K]ubj­)”}”(hŒ0void (*disconnect) (struct usb_interface *intf);”h]”hŒ0void (*disconnect) (struct usb_interface *intf);”…””}”hjåsbah}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1j¬h³hÊh´KahjÔh²hubhÝ)”}”(hX{This callback is a signal to break any connection with an interface. You are not allowed any IO to a device after returning from this callback. You also may not do any other operation that may interfere with another driver bound to the interface, eg. a power management operation. Outstanding operations on the device must be completed or aborted before this callback may return.”h]”hX{This callback is a signal to break any connection with an interface. You are not allowed any IO to a device after returning from this callback. You also may not do any other operation that may interfere with another driver bound to the interface, eg. a power management operation. Outstanding operations on the device must be completed or aborted before this callback may return.”…””}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KchjÔh²hubhÝ)”}”(hXIf you are called due to a physical disconnection, all your URBs will be killed by usbcore. Note that in this case disconnect will be called some time after the physical disconnection. Thus your driver must be prepared to deal with failing IO even prior to the callback.”h]”hXIf you are called due to a physical disconnection, all your URBs will be killed by usbcore. Note that in this case disconnect will be called some time after the physical disconnection. Thus your driver must be prepared to deal with failing IO even prior to the callback.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KjhjÔh²hubeh}”(h]”Œthe-disconnect-callback”ah ]”h"]”Œthe disconnect() callback”ah$]”h&]”uh1hµhj|h²hh³hÊh´K]ubeh}”(h]”Œhotplugging-callbacks”ah ]”h"]”Œhotplugging callbacks”ah$]”h&]”uh1hµhh·h²hh³hÊh´KDubh¶)”}”(hhh]”(h»)”}”(hŒDevice level callbacks”h]”hŒDevice level callbacks”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´Kpubh¶)”}”(hhh]”(h»)”}”(hŒ pre_reset”h]”hŒ pre_reset”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj0h²hh³hÊh´Ksubj­)”}”(hŒ-int (*pre_reset)(struct usb_interface *intf);”h]”hŒ-int (*pre_reset)(struct usb_interface *intf);”…””}”hjAsbah}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1j¬h³hÊh´Kwhj0h²hubhÝ)”}”(hXA driver or user space is triggering a reset on the device which contains the interface passed as an argument. Cease IO, wait for all outstanding URBs to complete, and save any device state you need to restore. No more URBs may be submitted until the post_reset method is called.”h]”hXA driver or user space is triggering a reset on the device which contains the interface passed as an argument. Cease IO, wait for all outstanding URBs to complete, and save any device state you need to restore. No more URBs may be submitted until the post_reset method is called.”…””}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kyhj0h²hubhÝ)”}”(hŒ^If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you are in atomic context.”h]”hŒ^If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you are in atomic context.”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj0h²hubeh}”(h]”Œ pre-reset”ah ]”h"]”Œ pre_reset”ah$]”h&]”uh1hµhjh²hh³hÊh´Ksubh¶)”}”(hhh]”(h»)”}”(hŒ post_reset”h]”hŒ post_reset”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjsh²hh³hÊh´Kƒubj­)”}”(hŒ.int (*post_reset)(struct usb_interface *intf);”h]”hŒ.int (*post_reset)(struct usb_interface *intf);”…””}”hj„sbah}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1j¬h³hÊh´K‡hjsh²hubhÝ)”}”(hŒZThe reset has completed. Restore any saved device state and begin using the device again.”h]”hŒZThe reset has completed. Restore any saved device state and begin using the device again.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K‰hjsh²hubhÝ)”}”(hŒ^If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you are in atomic context.”h]”hŒ^If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you are in atomic context.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KŒhjsh²hubeh}”(h]”Œ post-reset”ah ]”h"]”Œ post_reset”ah$]”h&]”uh1hµhjh²hh³hÊh´Kƒubeh}”(h]”Œdevice-level-callbacks”ah ]”h"]”Œdevice level callbacks”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kpubh¶)”}”(hhh]”(h»)”}”(hŒCall sequences”h]”hŒCall sequences”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¾h²hh³hÊh´KubhÝ)”}”(hŒ_No callbacks other than probe will be invoked for an interface that isn't bound to your driver.”h]”hŒaNo callbacks other than probe will be invoked for an interface that isn’t bound to your driver.”…””}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K’hj¾h²hubhÝ)”}”(hŒ²Probe will never be called for an interface bound to a driver. Hence following a successful probe, disconnect will be called before there is another probe for the same interface.”h]”hŒ²Probe will never be called for an interface bound to a driver. Hence following a successful probe, disconnect will be called before there is another probe for the same interface.”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K•hj¾h²hubhÝ)”}”(hŒâOnce your driver is bound to an interface, disconnect can be called at any time except in between pre_reset and post_reset. pre_reset is always followed by post_reset, even if the reset failed or the device has been unplugged.”h]”hŒâOnce your driver is bound to an interface, disconnect can be called at any time except in between pre_reset and post_reset. pre_reset is always followed by post_reset, even if the reset failed or the device has been unplugged.”…””}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K™hj¾h²hubhÝ)”}”(hŒJsuspend is always followed by one of: resume, reset_resume, or disconnect.”h]”hŒJsuspend is always followed by one of: resume, reset_resume, or disconnect.”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kžhj¾h²hubeh}”(h]”Œcall-sequences”ah ]”h"]”Œcall sequences”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubeh}”(h]”Œusb-core-callbacks”ah ]”h"]”Œusb core callbacks”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j:Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjRjOjyjvjjjÑjÎjjj»j¸jpjmj³j°j j uŒ nametypes”}”(j‰jR‰jy‰j‰jщj‰j»‰jp‰j³‰j ‰uh}”(jh·jOhËjvjUjj|jÎj›jjÔj¸jjmj0j°jsj j¾uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”(hŒsystem_message”“”)”}”(hhh]”hÝ)”}”(hŒ:Enumerated list start value not ordinal-1: "2" (ordinal 2)”h]”hŒ>Enumerated list start value not ordinal-1: “2†(ordinal 2)”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhjžubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÊŒline”Kuh1jœhhËh²hh³hÊh´Kubj)”}”(hhh]”hÝ)”}”(hŒ:Enumerated list start value not ordinal-1: "3" (ordinal 3)”h]”hŒ>Enumerated list start value not ordinal-1: “3†(ordinal 3)”…””}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhjºubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j·Œsource”hÊŒline”Kuh1jœhhËh²hh³hÊh´K"ubj)”}”(hhh]”hÝ)”}”(hŒ:Enumerated list start value not ordinal-1: "4" (ordinal 4)”h]”hŒ>Enumerated list start value not ordinal-1: “4†(ordinal 4)”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhjÕubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”j·Œsource”hÊŒline”Kuh1jœhhËh²hh³hÊh´K.ubeŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.