From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7919152967120245304==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFCv3 2/6] i2c: add I2C Address Translator (ATR) support Date: Mon, 07 Feb 2022 01:26:14 +0800 Message-ID: <202202070103.fFqVrrDP-lkp@intel.com> In-Reply-To: <20220206115939.3091265-3-luca@lucaceresoli.net> List-Id: --===============7919152967120245304== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Luca, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on media-tree/master] [also build test WARNING on wsa/i2c/for-next robh/for-next linux/master lin= us/master v5.17-rc2 next-20220204] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Luca-Ceresoli/i2c-core-let= -adapters-be-notified-of-client-attach-detach/20220206-220012 base: git://linuxtv.org/media_tree.git master config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220207/= 202202070103.fFqVrrDP-lkp(a)intel.com/config) compiler: arceb-elf-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/9fb70b22e4017684d0c6e00e3= 6fed5cf8dfcbde3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Luca-Ceresoli/i2c-core-let-adapter= s-be-notified-of-client-attach-detach/20220206-220012 git checkout 9fb70b22e4017684d0c6e00e36fed5cf8dfcbde3 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darc SHELL=3D/bin/bash drivers/i2c/ drivers/media/i2c/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/i2c/i2c-atr.c:3: warning: This comment starts with '/**', but is= n't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * I2C Address Translator vim +3 drivers/i2c/i2c-atr.c > 3 * I2C Address Translator 4 * 5 * Copyright (c) 2019 Luca Ceresoli 6 * 7 * An I2C Address Translator (ATR) is a device with an I2C slave par= ent 8 * ("upstream") port and N I2C master child ("downstream") ports, and 9 * forwards transactions from upstream to the appropriate downstream= port 10 * with a modified slave address. The address used on the parent bus= is 11 * called the "alias" and is (potentially) different from the physic= al 12 * slave address of the child bus. Address translation is done by the 13 * hardware. 14 * 15 * An ATR looks similar to an i2c-mux except: 16 * - the address on the parent and child busses can be different 17 * - there is normally no need to select the child port; the alias u= sed on 18 * the parent bus implies it 19 * 20 * The ATR functionality can be provided by a chip with many other 21 * features. This file provides a helper to implement an ATR within = your 22 * driver. 23 * 24 * The ATR creates a new I2C "child" adapter on each child bus. Addi= ng 25 * devices on the child bus ends up in invoking the driver code to s= elect 26 * an available alias. Maintaining an appropriate pool of available = aliases 27 * and picking one for each new device is up to the driver implement= er. The 28 * ATR maintains an table of currently assigned alias and uses it to= modify 29 * all I2C transactions directed to devices on the child buses. 30 * 31 * A typical example follows. 32 * 33 * Topology: 34 * 35 * Slave X @ 0x10 36 * .-----. | 37 * .-----. | |---+---- B 38 * | CPU |--A--| ATR | 39 * `-----' | |---+---- C 40 * `-----' | 41 * Slave Y @ 0x10 42 * 43 * Alias table: 44 * 45 * Client Alias 46 * ------------- 47 * X 0x20 48 * Y 0x30 49 * 50 * Transaction: 51 * 52 * - Slave X driver sends a transaction (on adapter B), slave addre= ss 0x10 53 * - ATR driver rewrites messages with address 0x20, forwards to ad= apter A 54 * - Physical I2C transaction on bus A, slave address 0x20 55 * - ATR chip propagates transaction on bus B with address translat= ed to 0x10 56 * - Slave X chip replies on bus B 57 * - ATR chip forwards reply on bus A 58 * - ATR driver rewrites messages with address 0x10 59 * - Slave X driver gets back the msgs[], with reply and address 0x= 10 60 * 61 * Usage: 62 * 63 * 1. In your driver (typically in the probe function) add an ATR by 64 * calling i2c_atr_new() passing your attach/detach callbacks 65 * 2. When the attach callback is called pick an appropriate alias, 66 * configure it in your chip and return the chosen alias in the 67 * alias_id parameter 68 * 3. When the detach callback is called, deconfigure the alias from 69 * your chip and put it back in the pool for later usage 70 * 71 * Originally based on i2c-mux.c 72 */ 73 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7919152967120245304==--