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/i2c/i2c-address-translatorsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/zh_TW/i2c/i2c-address-translatorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/it_IT/i2c/i2c-address-translatorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ja_JP/i2c/i2c-address-translatorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ko_KR/i2c/i2c-address-translatorsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/sp_SP/i2c/i2c-address-translatorsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhI/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators.rsthKubhsection)}(hhh](htitle)}(hI2C Address Translatorsh]hI2C Address Translators}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hfAuthor: Luca Ceresoli Author: Tomi Valkeinen h](hAuthor: Luca Ceresoli <}(hhhhhNhNubh reference)}(hluca@lucaceresoli.neth]hluca@lucaceresoli.net}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:luca@lucaceresoli.netuh1hhhubh> Author: Tomi Valkeinen <}(hhhhhNhNubh)}(htomi.valkeinen@ideasonboard.comh]htomi.valkeinen@ideasonboard.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refuri&mailto:tomi.valkeinen@ideasonboard.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK ubh)}(hXAn I2C Address Translator (ATR) is a device with an I2C slave parent ("upstream") port and N I2C master child ("downstream") ports, and forwards transactions from upstream to the appropriate downstream port with a modified slave address. The address used on the parent bus is called the "alias" and is (potentially) different from the physical slave address of the child bus. Address translation is done by the hardware.h]hXAn I2C Address Translator (ATR) is a device with an I2C slave parent (“upstream”) port and N I2C master child (“downstream”) ports, and forwards transactions from upstream to the appropriate downstream port with a modified slave address. The address used on the parent bus is called the “alias” and is (potentially) different from the physical slave address of the child bus. Address translation is done by the hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hAn ATR looks similar to an i2c-mux except: - the address on the parent and child busses can be different - there is normally no need to select the child port; the alias used on the parent bus implies it h](hterm)}(h*An ATR looks similar to an i2c-mux except:h]h*An ATR looks similar to an i2c-mux except:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j-hhhKhj)ubh definition)}(hhh]h bullet_list)}(hhh](h list_item)}(h;the address on the parent and child busses can be differenth]h)}(hjKh]h;the address on the parent and child busses can be different}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1jGhjDubjH)}(h`there is normally no need to select the child port; the alias used on the parent bus implies it h]h)}(h_there is normally no need to select the child port; the alias used on the parent bus implies ith]h_there is normally no need to select the child port; the alias used on the parent bus implies it}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj`ubah}(h]h ]h"]h$]h&]uh1jGhjDubeh}(h]h ]h"]h$]h&]bullet-uh1jBhhhKhj?ubah}(h]h ]h"]h$]h&]uh1j=hj)ubeh}(h]h ]h"]h$]h&]uh1j'hhhKhj$ubah}(h]h ]h"]h$]h&]uh1j"hjhhhNhNubh)}(hThe ATR functionality can be provided by a chip with many other features. The kernel i2c-atr provides a helper to implement an ATR within a driver.h]hThe ATR functionality can be provided by a chip with many other features. The kernel i2c-atr provides a helper to implement an ATR within a driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXThe ATR creates a new I2C "child" adapter on each child bus. Adding devices on the child bus ends up in invoking the driver code to select an available alias. Maintaining an appropriate pool of available aliases and picking one for each new device is up to the driver implementer. The ATR maintains a table of currently assigned alias and uses it to modify all I2C transactions directed to devices on the child buses.h]hXThe ATR creates a new I2C “child” adapter on each child bus. Adding devices on the child bus ends up in invoking the driver code to select an available alias. Maintaining an appropriate pool of available aliases and picking one for each new device is up to the driver implementer. The ATR maintains a table of currently assigned alias and uses it to modify all I2C transactions directed to devices on the child buses.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hA typical example follows.h]hA typical example follows.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjhhubh)}(h Topology::h]h Topology:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjhhubh literal_block)}(h Slave X @ 0x10 .-----. | .-----. | |---+---- B | CPU |--A--| ATR | `-----' | |---+---- C `-----' | Slave Y @ 0x10h]h Slave X @ 0x10 .-----. | .-----. | |---+---- B | CPU |--A--| ATR | `-----' | |---+---- C `-----' | Slave Y @ 0x10}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK(hjhhubh)}(h Alias table:h]h Alias table:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubh)}(hXA, B and C are three physical I2C busses, electrically independent from each other. The ATR receives the transactions initiated on bus A and propagates them on bus B or bus C or none depending on the device address in the transaction and based on the alias table.h]hXA, B and C are three physical I2C busses, electrically independent from each other. The ATR receives the transactions initiated on bus A and propagates them on bus B or bus C or none depending on the device address in the transaction and based on the alias table.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjhhubh)}(h Alias table:h]h Alias table:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hClienth]hClient}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubah}(h]h ]h"]h$]h&]uh1j.hjoubj/)}(hhh]h)}(h0x20h]h0x20}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1j.hjoubeh}(h]h ]h"]h$]h&]uh1j)hjlubj*)}(hhh](j/)}(hhh]h)}(hY (bus C, 0x10)h]hY (bus C, 0x10)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1j.hjubj/)}(hhh]h)}(h0x30h]h0x30}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1j.hjubeh}(h]h ]h"]h$]h&]uh1j)hjlubeh}(h]h ]h"]h$]h&]uh1jjhj ubeh}(h]h ]h"]h$]h&]colsKuh1j hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(h Transaction:h]h Transaction:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjhhubh block_quote)}(hX!- Slave X driver requests a transaction (on adapter B), slave address 0x10 - ATR driver finds slave X is on bus B and has alias 0x20, rewrites messages with address 0x20, forwards to adapter A - Physical I2C transaction on bus A, slave address 0x20 - ATR chip detects transaction on address 0x20, finds it in table, propagates transaction on bus B with address translated to 0x10, keeps clock stretched on bus A waiting for reply - Slave X chip (on bus B) detects transaction at its own physical address 0x10 and replies normally - ATR chip stops clock stretching and forwards reply on bus A, with address translated back to 0x20 - ATR driver receives the reply, rewrites messages with address 0x10 as they were initially - Slave X driver gets back the msgs[], with reply and address 0x10 h]jC)}(hhh](jH)}(hHSlave X driver requests a transaction (on adapter B), slave address 0x10h]h)}(hj h]hHSlave X driver requests a transaction (on adapter B), slave address 0x10}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(hsATR driver finds slave X is on bus B and has alias 0x20, rewrites messages with address 0x20, forwards to adapter Ah]h)}(hsATR driver finds slave X is on bus B and has alias 0x20, rewrites messages with address 0x20, forwards to adapter Ah]hsATR driver finds slave X is on bus B and has alias 0x20, rewrites messages with address 0x20, forwards to adapter A}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(h5Physical I2C transaction on bus A, slave address 0x20h]h)}(hj8h]h5Physical I2C transaction on bus A, slave address 0x20}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj6ubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(hATR chip detects transaction on address 0x20, finds it in table, propagates transaction on bus B with address translated to 0x10, keeps clock stretched on bus A waiting for replyh]h)}(hATR chip detects transaction on address 0x20, finds it in table, propagates transaction on bus B with address translated to 0x10, keeps clock stretched on bus A waiting for replyh]hATR chip detects transaction on address 0x20, finds it in table, propagates transaction on bus B with address translated to 0x10, keeps clock stretched on bus A waiting for reply}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjMubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(haSlave X chip (on bus B) detects transaction at its own physical address 0x10 and replies normallyh]h)}(haSlave X chip (on bus B) detects transaction at its own physical address 0x10 and replies normallyh]haSlave X chip (on bus B) detects transaction at its own physical address 0x10 and replies normally}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjeubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(haATR chip stops clock stretching and forwards reply on bus A, with address translated back to 0x20h]h)}(haATR chip stops clock stretching and forwards reply on bus A, with address translated back to 0x20h]haATR chip stops clock stretching and forwards reply on bus A, with address translated back to 0x20}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj}ubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(hYATR driver receives the reply, rewrites messages with address 0x10 as they were initiallyh]h)}(hYATR driver receives the reply, rewrites messages with address 0x10 as they were initiallyh]hYATR driver receives the reply, rewrites messages with address 0x10 as they were initially}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(hASlave X driver gets back the msgs[], with reply and address 0x10 h]h)}(h@Slave X driver gets back the msgs[], with reply and address 0x10h]h@Slave X driver gets back the msgs[], with reply and address 0x10}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]j~juh1jBhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhhhKDhjhhubh)}(hUsage:h]hUsage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjhhubj)}(hX1. In the driver (typically in the probe function) add an ATR by calling i2c_atr_new() passing attach/detach callbacks 2. When the attach callback is called pick an appropriate alias, configure it in the chip and return the chosen alias in the alias_id parameter 3. When the detach callback is called, deconfigure the alias from the chip and put the alias back in the pool for later usage h]henumerated_list)}(hhh](jH)}(hsIn the driver (typically in the probe function) add an ATR by calling i2c_atr_new() passing attach/detach callbacksh]h)}(hsIn the driver (typically in the probe function) add an ATR by calling i2c_atr_new() passing attach/detach callbacksh]hsIn the driver (typically in the probe function) add an ATR by calling i2c_atr_new() passing attach/detach callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(hWhen the attach callback is called pick an appropriate alias, configure it in the chip and return the chosen alias in the alias_id parameterh]h)}(hWhen the attach callback is called pick an appropriate alias, configure it in the chip and return the chosen alias in the alias_id parameterh]hWhen the attach callback is called pick an appropriate alias, configure it in the chip and return the chosen alias in the alias_id parameter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jGhjubjH)}(h{When the detach callback is called, deconfigure the alias from the chip and put the alias back in the pool for later usage h]h)}(hzWhen the detach callback is called, deconfigure the alias from the chip and put the alias back in the pool for later usageh]hzWhen the detach callback is called, deconfigure the alias from the chip and put the alias back in the pool for later usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKUhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h%I2C ATR functions and data structuresh]h%I2C ATR functions and data structures}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhK^ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlei2c_atr_ops (C struct) c.i2c_atr_opshNtauh1jZhjIhhhNhNubhdesc)}(hhh](hdesc_signature)}(h i2c_atr_opsh]hdesc_signature_line)}(hstruct i2c_atr_opsh](hdesc_sig_keyword)}(hstructh]hstruct}(hj~hhhNhNubah}(h]h ]kah"]h$]h&]uh1j|hjxhhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjxhhhjhKubh desc_name)}(h i2c_atr_opsh]h desc_sig_name)}(hjth]h i2c_atr_ops}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjxhhhjhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jvsphinx_line_type declaratorhjrhhhjhKubah}(h]jiah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jphjhKhjmhhubh desc_content)}(hhh]h)}(h(Callbacks from ATR to the device driver.h]h(Callbacks from ATR to the device driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjmhhhjhKubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jkhhhjIhNhNubh container)}(hX>**Definition**:: struct i2c_atr_ops { int (*attach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client, u16 alias); void (*detach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client); }; **Members** ``attach_client`` Notify the driver of a new device connected on a child bus, with the alias assigned to it. The driver must configure the hardware to use the alias. ``detach_client`` Notify the driver of a device getting disconnected. The driver must configure the hardware to stop using the alias.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjubj)}(hstruct i2c_atr_ops { int (*attach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client, u16 alias); void (*detach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client); };h]hstruct i2c_atr_ops { int (*attach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client, u16 alias); void (*detach_client)(struct i2c_atr *atr, u32 chan_id, const struct i2c_client *client); };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjubh)}(h **Members**h]j)}(hj/h]hMembers}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK!hjubj#)}(hhh](j()}(h``attach_client`` Notify the driver of a new device connected on a child bus, with the alias assigned to it. The driver must configure the hardware to use the alias. h](j.)}(h``attach_client``h]hliteral)}(hjNh]h attach_client}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjLubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjHubj>)}(hhh]h)}(hNotify the driver of a new device connected on a child bus, with the alias assigned to it. The driver must configure the hardware to use the alias.h]hNotify the driver of a new device connected on a child bus, with the alias assigned to it. The driver must configure the hardware to use the alias.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjfubah}(h]h ]h"]h$]h&]uh1j=hjHubeh}(h]h ]h"]h$]h&]uh1j'hjehKhjEubj()}(h``detach_client`` Notify the driver of a device getting disconnected. The driver must configure the hardware to stop using the alias.h](j.)}(h``detach_client``h]jQ)}(hjh]h detach_client}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjubj>)}(hhh]h)}(hsNotify the driver of a device getting disconnected. The driver must configure the hardware to stop using the alias.h]hsNotify the driver of a device getting disconnected. The driver must configure the hardware to stop using the alias.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhKhjEubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK hjIhhubh)}(hIAll these functions return 0 on success, a negative error code otherwise.h]hIAll these functions return 0 on success, a negative error code otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhjIhhubj[)}(hhh]h}(h]h ]h"]h$]h&]entries](jgi2c_atr_new (C function) c.i2c_atr_newhNtauh1jZhjIhhhNhNubjl)}(hhh](jq)}(h~struct i2c_atr * i2c_atr_new (struct i2c_adapter *parent, struct device *dev, const struct i2c_atr_ops *ops, int max_adapters)h]jw)}(h|struct i2c_atr *i2c_atr_new(struct i2c_adapter *parent, struct device *dev, const struct i2c_atr_ops *ops, int max_adapters)h](j})}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjhhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK5ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK5ubh)}(hhh]j)}(hi2c_atrh]hi2c_atr}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj,modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jE ASTIdentifier)}j@ i2c_atr_newsb c.i2c_atr_newasbuh1hhjhhhjhK5ubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK5ubhdesc_sig_punctuation)}(h*h]h*}(hjchhhNhNubah}(h]h ]pah"]h$]h&]uh1jahjhhhjhK5ubj)}(h i2c_atr_newh]j)}(hjPh]h i2c_atr_new}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhK5ubhdesc_parameterlist)}(ha(struct i2c_adapter *parent, struct device *dev, const struct i2c_atr_ops *ops, int max_adapters)h](hdesc_parameter)}(hstruct i2c_adapter *parenth](j})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h i2c_adapterh]h i2c_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjmodnameN classnameNjDjG)}jJ]jN c.i2c_atr_newasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hparenth]hparent}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct device *devh](j})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdeviceh]hdevice}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetj%modnameN classnameNjDjG)}jJ]jN c.i2c_atr_newasbuh1hhjubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hjOhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hdevh]hdev}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct i2c_atr_ops *opsh](j})}(hconsth]hconst}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjqubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubj})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjqubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubh)}(hhh]j)}(h i2c_atr_opsh]h i2c_atr_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjmodnameN classnameNjDjG)}jJ]jN c.i2c_atr_newasbuh1hhjqubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubjb)}(hjeh]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjqubj)}(hopsh]hops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint max_adaptersh](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h max_adaptersh]h max_adapters}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhK5ubeh}(h]h ]h"]h$]h&]hhjuh1jvjjhjhhhjhK5ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jphjhK5hjhhubj)}(hhh]h)}(h*Allocate and initialize an I2C ATR helper.h]h*Allocate and initialize an I2C ATR helper.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK(hjGhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK5ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjbjjbjjjuh1jkhhhjIhNhNubj)}(hX**Parameters** ``struct i2c_adapter *parent`` The parent (upstream) adapter ``struct device *dev`` The device acting as an ATR ``const struct i2c_atr_ops *ops`` Driver-specific callbacks ``int max_adapters`` Maximum number of child adapters **Description** The new ATR helper is connected to the parent adapter but has no child adapters. Call i2c_atr_add_adapter() to add some. Call i2c_atr_delete() to remove. **Return** pointer to the new ATR helper object, or ERR_PTRh](h)}(h**Parameters**h]j)}(hjlh]h Parameters}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK,hjfubj#)}(hhh](j()}(h=``struct i2c_adapter *parent`` The parent (upstream) adapter h](j.)}(h``struct i2c_adapter *parent``h]jQ)}(hjh]hstruct i2c_adapter *parent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK)hjubj>)}(hhh]h)}(hThe parent (upstream) adapterh]hThe parent (upstream) adapter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK)hjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhK)hjubj()}(h3``struct device *dev`` The device acting as an ATR h](j.)}(h``struct device *dev``h]jQ)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK*hjubj>)}(hhh]h)}(hThe device acting as an ATRh]hThe device acting as an ATR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK*hjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhK*hjubj()}(h<``const struct i2c_atr_ops *ops`` Driver-specific callbacks h](j.)}(h!``const struct i2c_atr_ops *ops``h]jQ)}(hjh]hconst struct i2c_atr_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK+hjubj>)}(hhh]h)}(hDriver-specific callbacksh]hDriver-specific callbacks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK+hj ubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hj hK+hjubj()}(h6``int max_adapters`` Maximum number of child adapters h](j.)}(h``int max_adapters``h]jQ)}(hj6 h]hint max_adapters}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1jPhj4 ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK,hj0 ubj>)}(hhh]h)}(h Maximum number of child adaptersh]h Maximum number of child adapters}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK hK,hjL ubah}(h]h ]h"]h$]h&]uh1j=hj0 ubeh}(h]h ]h"]h$]h&]uh1j'hjK hK,hjubeh}(h]h ]h"]h$]h&]uh1j"hjfubh)}(h**Description**h]j)}(hjq h]h Description}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK.hjfubh)}(hxThe new ATR helper is connected to the parent adapter but has no child adapters. Call i2c_atr_add_adapter() to add some.h]hxThe new ATR helper is connected to the parent adapter but has no child adapters. Call i2c_atr_add_adapter() to add some.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK.hjfubh)}(h Call i2c_atr_delete() to remove.h]h Call i2c_atr_delete() to remove.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK1hjfubh)}(h **Return**h]j)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK3hjfubh)}(h0pointer to the new ATR helper object, or ERR_PTRh]h0pointer to the new ATR helper object, or ERR_PTR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK3hjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubj[)}(hhh]h}(h]h ]h"]h$]h&]entries](jgi2c_atr_delete (C function)c.i2c_atr_deletehNtauh1jZhjIhhhNhNubjl)}(hhh](jq)}(h)void i2c_atr_delete (struct i2c_atr *atr)h]jw)}(h(void i2c_atr_delete(struct i2c_atr *atr)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK?ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hK?ubj)}(hi2c_atr_deleteh]j)}(hi2c_atr_deleteh]hi2c_atr_delete}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hK?ubj)}(h(struct i2c_atr *atr)h]j)}(hstruct i2c_atr *atrh](j})}(hjh]hstruct}(hj) hhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hj% ubj)}(h h]h }(hj6 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj% ubh)}(hhh]j)}(hi2c_atrh]hi2c_atr}(hjG hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD ubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjI modnameN classnameNjDjG)}jJ]jM)}j@j sbc.i2c_atr_deleteasbuh1hhj% ubj)}(h h]h }(hjg hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj% ubjb)}(hjeh]h*}(hju hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj% ubj)}(hatrh]hatr}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj% ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj! ubah}(h]h ]h"]h$]h&]hhuh1jhj hhhj hK?ubeh}(h]h ]h"]h$]h&]hhjuh1jvjjhj hhhj hK?ubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jphj hK?hj hhubj)}(hhh]h)}(hDelete an I2C ATR helper.h]hDelete an I2C ATR helper.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK9hj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hK?ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jkhhhjIhNhNubj)}(h**Parameters** ``struct i2c_atr *atr`` I2C ATR helper to be deleted. **Description** Precondition: all the adapters added with i2c_atr_add_adapter() must be removed by calling i2c_atr_del_adapter().h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK=hj ubj#)}(hhh]j()}(h6``struct i2c_atr *atr`` I2C ATR helper to be deleted. h](j.)}(h``struct i2c_atr *atr``h]jQ)}(hj h]hstruct i2c_atr *atr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jPhj ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK:hj ubj>)}(hhh]h)}(hI2C ATR helper to be deleted.h]hI2C ATR helper to be deleted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK:hj ubah}(h]h ]h"]h$]h&]uh1j=hj ubeh}(h]h ]h"]h$]h&]uh1j'hj hK:hj ubah}(h]h ]h"]h$]h&]uh1j"hj ubh)}(h**Description**h]j)}(hj( h]h Description}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKattach_client ` and :c:type:`i2c_atr_ops->detach_client ` callbacks for the driver to assign an alias to the device. The adapter's fwnode is set to **bus_handle**, or if **bus_handle** is NULL the function looks for a child node whose 'reg' property matches the chan_id under the i2c-atr device's 'i2c-atr' node. Call i2c_atr_del_adapter() to remove the adapter. **Return** 0 on success, a negative error code otherwise.h](h)}(h**Parameters**h]j)}(hjw h]h Parameters}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKFhjq ubj#)}(hhh](j()}(h$``struct i2c_atr *atr`` The I2C ATR h](j.)}(h``struct i2c_atr *atr``h]jQ)}(hj h]hstruct i2c_atr *atr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jPhj ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKChj ubj>)}(hhh]h)}(h The I2C ATRh]h The I2C ATR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKChj ubah}(h]h ]h"]h$]h&]uh1j=hj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKChj ubj()}(h``u32 chan_id`` Index of the new adapter (0 .. max_adapters-1). This value is passed to the callbacks in `struct i2c_atr_ops`. h](j.)}(h``u32 chan_id``h]jQ)}(hj h]h u32 chan_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jPhj ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKEhj ubj>)}(hhh]h)}(hoIndex of the new adapter (0 .. max_adapters-1). This value is passed to the callbacks in `struct i2c_atr_ops`.h](hZIndex of the new adapter (0 .. max_adapters-1). This value is passed to the callbacks in }(hj hhhNhNubhtitle_reference)}(h`struct i2c_atr_ops`h]hstruct i2c_atr_ops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKDhj ubah}(h]h ]h"]h$]h&]uh1j=hj ubeh}(h]h ]h"]h$]h&]uh1j'hj hKEhj ubj()}(h``struct device *adapter_parent`` The device used as the parent of the new i2c adapter, or NULL to use the i2c-atr device as the parent. h](j.)}(h!``struct device *adapter_parent``h]jQ)}(hjh]hstruct device *adapter_parent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKGhjubj>)}(hhh]h)}(hfThe device used as the parent of the new i2c adapter, or NULL to use the i2c-atr device as the parent.h]hfThe device used as the parent of the new i2c adapter, or NULL to use the i2c-atr device as the parent.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKFhj3ubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hj2hKGhj ubj()}(hn``struct fwnode_handle *bus_handle`` The fwnode handle that points to the adapter's i2c peripherals, or NULL. h](j.)}(h$``struct fwnode_handle *bus_handle``h]jQ)}(hjWh]h struct fwnode_handle *bus_handle}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjUubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKIhjQubj>)}(hhh]h)}(hHThe fwnode handle that points to the adapter's i2c peripherals, or NULL.h]hJThe fwnode handle that points to the adapter’s i2c peripherals, or NULL.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKHhjmubah}(h]h ]h"]h$]h&]uh1j=hjQubeh}(h]h ]h"]h$]h&]uh1j'hjlhKIhj ubeh}(h]h ]h"]h$]h&]uh1j"hjq ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKKhjq ubh)}(hX)After calling this function a new i2c bus will appear. Adding and removing devices on the downstream bus will result in calls to the :c:type:`i2c_atr_ops->attach_client ` and :c:type:`i2c_atr_ops->detach_client ` callbacks for the driver to assign an alias to the device.h](hAfter calling this function a new i2c bus will appear. Adding and removing devices on the downstream bus will result in calls to the }(hjhhhNhNubh)}(h2:c:type:`i2c_atr_ops->attach_client `h]jQ)}(hjh]hi2c_atr_ops->attach_client}(hjhhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]refdoci2c/i2c-address-translators refdomainjreftypetype refexplicitrefwarnjDjG)}jJ]sb reftarget i2c_atr_opsuh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKKhjubh and }(hjhhhNhNubh)}(h2:c:type:`i2c_atr_ops->detach_client `h]jQ)}(hjh]hi2c_atr_ops->detach_client}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjDjj i2c_atr_opsuh1hhjhKKhjubh; callbacks for the driver to assign an alias to the device.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKKhjq ubh)}(hThe adapter's fwnode is set to **bus_handle**, or if **bus_handle** is NULL the function looks for a child node whose 'reg' property matches the chan_id under the i2c-atr device's 'i2c-atr' node.h](h!The adapter’s fwnode is set to }(hjhhhNhNubj)}(h**bus_handle**h]h bus_handle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, or if }(hjhhhNhNubj)}(h**bus_handle**h]h bus_handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is NULL the function looks for a child node whose ‘reg’ property matches the chan_id under the i2c-atr device’s ‘i2c-atr’ node.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKPhjq ubh)}(h1Call i2c_atr_del_adapter() to remove the adapter.h]h1Call i2c_atr_del_adapter() to remove the adapter.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKThjq ubh)}(h **Return**h]j)}(hjHh]hReturn}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKVhjq ubh)}(h.0 on success, a negative error code otherwise.h]h.0 on success, a negative error code otherwise.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKVhjq ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubj[)}(hhh]h}(h]h ]h"]h$]h&]entries](jg i2c_atr_del_adapter (C function)c.i2c_atr_del_adapterhNtauh1jZhjIhhhNhNubjl)}(hhh](jq)}(h;void i2c_atr_del_adapter (struct i2c_atr *atr, u32 chan_id)h]jw)}(h:void i2c_atr_del_adapter(struct i2c_atr *atr, u32 chan_id)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKcubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKcubj)}(hi2c_atr_del_adapterh]j)}(hi2c_atr_del_adapterh]hi2c_atr_del_adapter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKcubj)}(h"(struct i2c_atr *atr, u32 chan_id)h](j)}(hstruct i2c_atr *atrh](j})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hi2c_atrh]hi2c_atr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjmodnameN classnameNjDjG)}jJ]jM)}j@jsbc.i2c_atr_del_adapterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hatrh]hatr}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h u32 chan_idh](h)}(hhh]j)}(hu32h]hu32}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjAmodnameN classnameNjDjG)}jJ]jc.i2c_atr_del_adapterasbuh1hhj8ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hchan_idh]hchan_id}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKcubeh}(h]h ]h"]h$]h&]hhjuh1jvjjhjhhhjhKcubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jphjhKchjhhubj)}(hhh]h)}(h|Remove a child ("downstream") I2C bus added by i2c_atr_add_adapter(). If no I2C bus has been added this function is a no-op.h]hRemove a child (“downstream”) I2C bus added by i2c_atr_add_adapter(). If no I2C bus has been added this function is a no-op.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK]hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKcubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jkhhhjIhNhNubj)}(h**Parameters** ``struct i2c_atr *atr`` The I2C ATR ``u32 chan_id`` Index of the adapter to be removed (0 .. max_adapters-1)h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKahjubj#)}(hhh](j()}(h$``struct i2c_atr *atr`` The I2C ATR h](j.)}(h``struct i2c_atr *atr``h]jQ)}(hjh]hstruct i2c_atr *atr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhK`hjubj>)}(hhh]h)}(h The I2C ATRh]h The I2C ATR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK`hjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhK`hjubj()}(hH``u32 chan_id`` Index of the adapter to be removed (0 .. max_adapters-1)h](j.)}(h``u32 chan_id``h]jQ)}(hjh]h u32 chan_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhj ubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKbhj ubj>)}(hhh]h)}(h8Index of the adapter to be removed (0 .. max_adapters-1)h]h8Index of the adapter to be removed (0 .. max_adapters-1)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKahj%ubah}(h]h ]h"]h$]h&]uh1j=hj ubeh}(h]h ]h"]h$]h&]uh1j'hj$hKbhjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubj[)}(hhh]h}(h]h ]h"]h$]h&]entries](jg$i2c_atr_set_driver_data (C function)c.i2c_atr_set_driver_datahNtauh1jZhjIhhhNhNubjl)}(hhh](jq)}(h>void i2c_atr_set_driver_data (struct i2c_atr *atr, void *data)h]jw)}(h=void i2c_atr_set_driver_data(struct i2c_atr *atr, void *data)h](j)}(hvoidh]hvoid}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKjubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhjwhKjubj)}(hi2c_atr_set_driver_datah]j)}(hi2c_atr_set_driver_datah]hi2c_atr_set_driver_data}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjehhhjwhKjubj)}(h!(struct i2c_atr *atr, void *data)h](j)}(hstruct i2c_atr *atrh](j})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hi2c_atrh]hi2c_atr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjmodnameN classnameNjDjG)}jJ]jM)}j@jsbc.i2c_atr_set_driver_dataasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hatrh]hatr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h void *datah](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hdatah]hdata}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjehhhjwhKjubeh}(h]h ]h"]h$]h&]hhjuh1jvjjhjahhhjwhKjubah}(h]j\ah ](jjeh"]h$]h&]jj)jhuh1jphjwhKjhj^hhubj)}(hhh]h)}(h0Set private driver data to the i2c-atr instance.h]h0Set private driver data to the i2c-atr instance.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKfhjhhhubah}(h]h ]h"]h$]h&]uh1jhj^hhhjwhKjubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jkhhhjIhNhNubj)}(hd**Parameters** ``struct i2c_atr *atr`` The I2C ATR ``void *data`` Pointer to the data to storeh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKjhjubj#)}(hhh](j()}(h$``struct i2c_atr *atr`` The I2C ATR h](j.)}(h``struct i2c_atr *atr``h]jQ)}(hjh]hstruct i2c_atr *atr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKghjubj>)}(hhh]h)}(h The I2C ATRh]h The I2C ATR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKghjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhKghjubj()}(h+``void *data`` Pointer to the data to storeh](j.)}(h``void *data``h]jQ)}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKihjubj>)}(hhh]h)}(hPointer to the data to storeh]hPointer to the data to store}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKhhjubah}(h]h ]h"]h$]h&]uh1j=hjubeh}(h]h ]h"]h$]h&]uh1j'hjhKihjubeh}(h]h ]h"]h$]h&]uh1j"hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubj[)}(hhh]h}(h]h ]h"]h$]h&]entries](jg$i2c_atr_get_driver_data (C function)c.i2c_atr_get_driver_datahNtauh1jZhjIhhhNhNubjl)}(hhh](jq)}(h4void * i2c_atr_get_driver_data (struct i2c_atr *atr)h]jw)}(h2void *i2c_atr_get_driver_data(struct i2c_atr *atr)h](j)}(hvoidh]hvoid}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;hhhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKrubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;hhhjMhKrubjb)}(hjeh]h*}(hj\hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj;hhhjMhKrubj)}(hi2c_atr_get_driver_datah]j)}(hi2c_atr_get_driver_datah]hi2c_atr_get_driver_data}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubah}(h]h ](jjeh"]h$]h&]hhuh1jhj;hhhjMhKrubj)}(h(struct i2c_atr *atr)h]j)}(hstruct i2c_atr *atrh](j})}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j|hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hi2c_atrh]hi2c_atr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej@ reftargetjmodnameN classnameNjDjG)}jJ]jM)}j@josbc.i2c_atr_get_driver_dataasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hatrh]hatr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(oh]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj;hhhjMhKrubeh}(h]h ]h"]h$]h&]hhjuh1jvjjhj7hhhjMhKrubah}(h]j2ah ](jjeh"]h$]h&]jj)jhuh1jphjMhKrhj4hhubj)}(hhh]h)}(hGet the stored drive data.h]hGet the stored drive data.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKmhj hhubah}(h]h ]h"]h$]h&]uh1jhj4hhhjMhKrubeh}(h]h ](jfunctioneh"]h$]h&]jjjj$jj$jjjuh1jkhhhjIhNhNubj)}(h]**Parameters** ``struct i2c_atr *atr`` The I2C ATR **Return** Pointer to the stored datah](h)}(h**Parameters**h]j)}(hj.h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKqhj(ubj#)}(hhh]j()}(h$``struct i2c_atr *atr`` The I2C ATR h](j.)}(h``struct i2c_atr *atr``h]jQ)}(hjMh]hstruct i2c_atr *atr}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jPhjKubah}(h]h ]h"]h$]h&]uh1j-hc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKnhjGubj>)}(hhh]h)}(h The I2C ATRh]h The I2C ATR}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhKnhjcubah}(h]h ]h"]h$]h&]uh1j=hjGubeh}(h]h ]h"]h$]h&]uh1j'hjbhKnhjDubah}(h]h ]h"]h$]h&]uh1j"hj(ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKphj(ubh)}(hPointer to the stored datah]hPointer to the stored data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/i2c/i2c-address-translators:96: ./include/linux/i2c-atr.hhKphj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjIhhhNhNubeh}(h]%i2c-atr-functions-and-data-structuresah ]h"]%i2c atr functions and data structuresah$]h&]uh1hhhhhhhhK^ubeh}(h]i2c-address-translatorsah ]h"]i2c address translatorsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj.footnote_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_handlerjerror_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}(jjjFjCjju nametypes}(jjFjuh}(jhjCjjjIjijrjjj j j` je jjj\jaj2j7u 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.