€•4)Œ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/i2c/old-module-parameters”Œ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/i2c/old-module-parameters”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/it_IT/i2c/old-module-parameters”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/ja_JP/i2c/old-module-parameters”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ-/translations/ko_KR/i2c/old-module-parameters”Œ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/i2c/old-module-parameters”Œ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Œ@I2C device driver binding control from user-space in old kernels”h]”hŒ@I2C device driver binding control from user-space in old kernels”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒG/var/lib/git/docbuild/linux/Documentation/i2c/old-module-parameters.rst”h KubhŒnote”“”)”}”(hŒ¢Note: this section is only relevant if you are handling some old code found in kernel 2.6. If you work with more recent kernels, you can safely skip this section.”h]”hŒ paragraph”“”)”}”(hŒ¢Note: this section is only relevant if you are handling some old code found in kernel 2.6. If you work with more recent kernels, you can safely skip this section.”h]”hŒ¢Note: this section is only relevant if you are handling some old code found in kernel 2.6. If you work with more recent kernels, you can safely skip this section.”…””}”(hh¿hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h Khh¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hh£hžhhŸh¶h Nubh¾)”}”(hX§Up to kernel 2.6.32, many I2C drivers used helper macros provided by which created standard module parameters to let the user control how the driver would probe I2C buses and attach to devices. These parameters were known as ``probe`` (to let the driver probe for an extra address), ``force`` (to forcibly attach the driver to a given device) and ``ignore`` (to prevent a driver from probing a given address).”h]”(hŒïUp to kernel 2.6.32, many I2C drivers used helper macros provided by which created standard module parameters to let the user control how the driver would probe I2C buses and attach to devices. These parameters were known as ”…””}”(hhÓhžhhŸNh NubhŒliteral”“”)”}”(hŒ ``probe``”h]”hŒprobe”…””}”(hhÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhÓubhŒ1 (to let the driver probe for an extra address), ”…””}”(hhÓhžhhŸNh NubhÜ)”}”(hŒ ``force``”h]”hŒforce”…””}”(hhïhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhÓubhŒ7 (to forcibly attach the driver to a given device) and ”…””}”(hhÓhžhhŸNh NubhÜ)”}”(hŒ ``ignore``”h]”hŒignore”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhÓubhŒ4 (to prevent a driver from probing a given address).”…””}”(hhÓhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h K hh£hžhubh¾)”}”(hX^With the conversion of the I2C subsystem to the standard device driver binding model, it became clear that these per-module parameters were no longer needed, and that a centralized implementation was possible. The new, sysfs-based interface is described in Documentation/i2c/instantiating-devices.rst, section "Method 4: Instantiate from user-space".”h]”hXbWith the conversion of the I2C subsystem to the standard device driver binding model, it became clear that these per-module parameters were no longer needed, and that a centralized implementation was possible. The new, sysfs-based interface is described in Documentation/i2c/instantiating-devices.rst, section “Method 4: Instantiate from user-spaceâ€.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h Khh£hžhubh¾)”}”(hŒGBelow is a mapping from the old module parameters to the new interface.”h]”hŒGBelow is a mapping from the old module parameters to the new interface.”…””}”(hj'hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒ#Attaching a driver to an I2C device”h]”hŒ#Attaching a driver to an I2C device”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj5hžhhŸh¶h Kubh¾)”}”(hŒ Old method (module parameters)::”h]”hŒOld method (module parameters):”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h Khj5hžhubhŒ literal_block”“”)”}”(hŒk# modprobe probe=1,0x2d # modprobe force=1,0x2d # modprobe force_=1,0x2d”h]”hŒk# modprobe probe=1,0x2d # modprobe force=1,0x2d # modprobe force_=1,0x2d”…””}”hjVsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jThŸh¶h Khj5hžhubh¾)”}”(hŒNew method (sysfs interface)::”h]”hŒNew method (sysfs interface):”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h K#hj5hžhubjU)”}”(hŒ<# echo 0x2d > /sys/bus/i2c/devices/i2c-1/new_device”h]”hŒ<# echo 0x2d > /sys/bus/i2c/devices/i2c-1/new_device”…””}”hjtsbah}”(h]”h ]”h"]”h$]”h&]”jdjeuh1jThŸh¶h K%hj5hžhubeh}”(h]”Œ#attaching-a-driver-to-an-i2c-device”ah ]”h"]”Œ#attaching a driver to an i2c device”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ3Preventing a driver from attaching to an I2C device”h]”hŒ3Preventing a driver from attaching to an I2C device”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjŠhžhhŸh¶h K(ubh¾)”}”(hŒ Old method (module parameters)::”h]”hŒOld method (module parameters):”…””}”(hj›hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h K*hjŠhžhubjU)”}”(hŒ!# modprobe ignore=1,0x2f”h]”hŒ!# modprobe ignore=1,0x2f”…””}”hj©sbah}”(h]”h ]”h"]”h$]”h&]”jdjeuh1jThŸh¶h K,hjŠhžhubh¾)”}”(hŒNew method (sysfs interface)::”h]”hŒNew method (sysfs interface):”…””}”(hj·hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h K.hjŠhžhubjU)”}”(hŒM# echo dummy 0x2f > /sys/bus/i2c/devices/i2c-1/new_device # modprobe ”h]”hŒM# echo dummy 0x2f > /sys/bus/i2c/devices/i2c-1/new_device # modprobe ”…””}”hjÅsbah}”(h]”h ]”h"]”h$]”h&]”jdjeuh1jThŸh¶h K0hjŠhžhubh¾)”}”(hXoOf course, it is important to instantiate the ``dummy`` device before loading the driver. The dummy device will be handled by i2c-core itself, preventing other drivers from binding to it later on. If there is a real device at the problematic address, and you want another driver to bind to it, then simply pass the name of the device in question instead of ``dummy``.”h]”(hŒ.Of course, it is important to instantiate the ”…””}”(hjÓhžhhŸNh NubhÜ)”}”(hŒ ``dummy``”h]”hŒdummy”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÓubhX. device before loading the driver. The dummy device will be handled by i2c-core itself, preventing other drivers from binding to it later on. If there is a real device at the problematic address, and you want another driver to bind to it, then simply pass the name of the device in question instead of ”…””}”(hjÓhžhhŸNh NubhÜ)”}”(hŒ ``dummy``”h]”hŒdummy”…””}”(hjíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÓubhŒ.”…””}”(hjÓhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h½hŸh¶h K3hjŠhžhubeh}”(h]”Œ3preventing-a-driver-from-attaching-to-an-i2c-device”ah ]”h"]”Œ3preventing a driver from attaching to an i2c device”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K(ubeh}”(h]”Œ@i2c-device-driver-binding-control-from-user-space-in-old-kernels”ah ]”h"]”Œ@i2c device driver binding control from user-space in old kernels”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”j8Œ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”}”(jjj‡j„j juŒ nametypes”}”(j‰j‡‰j ‰uh}”(jh£j„j5jjŠ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”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.