All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] i3c: add slave mode support
  2023-10-18 21:58   ` Frank Li
  (?)
@ 2023-10-23  1:20 ` kernel test robot
  -1 siblings, 0 replies; 37+ messages in thread
From: kernel test robot @ 2023-10-21  7:50 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "git am base is a link in commit message"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20231018215809.3477437-2-Frank.Li@nxp.com>
References: <20231018215809.3477437-2-Frank.Li@nxp.com>
TO: Frank Li <Frank.Li@nxp.com>
TO: miquel.raynal@bootlin.com
TO: conor.culhane@silvaco.com
TO: alexandre.belloni@bootlin.com
TO: robh+dt@kernel.org
TO: krzysztof.kozlowski+dt@linaro.org
TO: conor+dt@kernel.org
TO: corbet@lwn.net
TO: joe@perches.com
TO: Frank.Li@nxp.com
TO: linux-i3c@lists.infradead.org
TO: devicetree@vger.kernel.org
TO: linux-kernel@vger.kernel.org
TO: linux-doc@vger.kernel.org
CC: gregkh@linuxfoundation.org
CC: imx@lists.linux.dev
CC: jirislaby@kernel.org
CC: linux-serial@vger.kernel.org

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.6-rc6 next-20231020]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-slave-mode-support/20231019-055940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20231018215809.3477437-2-Frank.Li%40nxp.com
patch subject: [PATCH 1/5] i3c: add slave mode support
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: microblaze-allyesconfig (https://download.01.org/0day-ci/archive/20231021/202310211527.TeVTMxA7-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231021/202310211527.TeVTMxA7-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202310211527.TeVTMxA7-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/i3c/slave.c:11:
   include/linux/i3c/slave.h: In function 'i3c_slave_ctrl_alloc_request':
   include/linux/i3c/slave.h:272:23: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
     272 |                 req = kzalloc(sizeof(*req), gfp_flags);
         |                       ^~~~~~~
>> include/linux/i3c/slave.h:272:21: warning: assignment to 'struct i3c_request *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     272 |                 req = kzalloc(sizeof(*req), gfp_flags);
         |                     ^
   include/linux/i3c/slave.h: In function 'i3c_slave_ctrl_free_request':
   include/linux/i3c/slave.h:298:17: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     298 |                 kfree(req);
         |                 ^~~~~
         |                 kvfree
   In file included from drivers/i3c/slave.c:13:
   include/linux/slab.h: At top level:
>> include/linux/slab.h:227:6: warning: conflicting types for 'kfree'; have 'void(const void *)'
     227 | void kfree(const void *objp);
         |      ^~~~~
   include/linux/i3c/slave.h:298:17: note: previous implicit declaration of 'kfree' with type 'void(const void *)'
     298 |                 kfree(req);
         |                 ^~~~~
   include/linux/slab.h:718:37: error: conflicting types for 'kzalloc'; have 'void *(size_t,  gfp_t)' {aka 'void *(unsigned int,  unsigned int)'}
     718 | static inline __alloc_size(1) void *kzalloc(size_t size, gfp_t flags)
         |                                     ^~~~~~~
   include/linux/i3c/slave.h:272:23: note: previous implicit declaration of 'kzalloc' with type 'int()'
     272 |                 req = kzalloc(sizeof(*req), gfp_flags);
         |                       ^~~~~~~
   cc1: some warnings being treated as errors


vim +272 include/linux/i3c/slave.h

a63b2858bd837d Frank Li 2023-10-18  256  
a63b2858bd837d Frank Li 2023-10-18  257  /**
a63b2858bd837d Frank Li 2023-10-18  258   * i3c_slave_ctrl_alloc_request() - Alloc an I3C transfer
a63b2858bd837d Frank Li 2023-10-18  259   * @ctrl: I3C slave controller device
a63b2858bd837d Frank Li 2023-10-18  260   * gfp_flags: additional gfp flags used when allocating the buffers
a63b2858bd837d Frank Li 2023-10-18  261   *
a63b2858bd837d Frank Li 2023-10-18  262   * Returns: Zero for success, or an error code in case of failure
a63b2858bd837d Frank Li 2023-10-18  263   */
a63b2858bd837d Frank Li 2023-10-18  264  static inline struct i3c_request *
a63b2858bd837d Frank Li 2023-10-18  265  i3c_slave_ctrl_alloc_request(struct i3c_slave_ctrl *ctrl, gfp_t gfp_flags)
a63b2858bd837d Frank Li 2023-10-18  266  {
a63b2858bd837d Frank Li 2023-10-18  267  	struct i3c_request *req = NULL;
a63b2858bd837d Frank Li 2023-10-18  268  
a63b2858bd837d Frank Li 2023-10-18  269  	if (ctrl && ctrl->ops && ctrl->ops->alloc_request)
a63b2858bd837d Frank Li 2023-10-18  270  		req = ctrl->ops->alloc_request(ctrl, gfp_flags);
a63b2858bd837d Frank Li 2023-10-18  271  	else
a63b2858bd837d Frank Li 2023-10-18 @272  		req = kzalloc(sizeof(*req), gfp_flags);
a63b2858bd837d Frank Li 2023-10-18  273  
a63b2858bd837d Frank Li 2023-10-18  274  	if (req)
a63b2858bd837d Frank Li 2023-10-18  275  		req->ctrl = ctrl;
a63b2858bd837d Frank Li 2023-10-18  276  
a63b2858bd837d Frank Li 2023-10-18  277  	return req;
a63b2858bd837d Frank Li 2023-10-18  278  }
a63b2858bd837d Frank Li 2023-10-18  279  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: [PATCH 3/5] i3c: slave: add svc slave controller support
  2023-10-18 21:58   ` Frank Li
  (?)
@ 2023-10-23  1:29 ` kernel test robot
  -1 siblings, 0 replies; 37+ messages in thread
From: kernel test robot @ 2023-10-20 11:51 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "git am base is a link in commit message"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20231018215809.3477437-4-Frank.Li@nxp.com>
References: <20231018215809.3477437-4-Frank.Li@nxp.com>
TO: Frank Li <Frank.Li@nxp.com>
TO: miquel.raynal@bootlin.com
TO: conor.culhane@silvaco.com
TO: alexandre.belloni@bootlin.com
TO: robh+dt@kernel.org
TO: krzysztof.kozlowski+dt@linaro.org
TO: conor+dt@kernel.org
TO: corbet@lwn.net
TO: joe@perches.com
TO: Frank.Li@nxp.com
TO: linux-i3c@lists.infradead.org
TO: devicetree@vger.kernel.org
TO: linux-kernel@vger.kernel.org
TO: linux-doc@vger.kernel.org
CC: gregkh@linuxfoundation.org
CC: imx@lists.linux.dev
CC: jirislaby@kernel.org
CC: linux-serial@vger.kernel.org

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.6-rc6 next-20231020]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-slave-mode-support/20231019-055940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20231018215809.3477437-4-Frank.Li%40nxp.com
patch subject: [PATCH 3/5] i3c: slave: add svc slave controller support
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20231020/202310201945.nRKjcul0-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310201945.nRKjcul0-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202310201945.nRKjcul0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/i3c/slave/svc-i3c-slave.c:211:39: warning: no previous prototype for 'svc_i3c_get_features' [-Wmissing-prototypes]
     211 | const struct i3c_slave_ctrl_features *svc_i3c_get_features(struct i3c_slave_ctrl *ctrl)
         |                                       ^~~~~~~~~~~~~~~~~~~~
>> drivers/i3c/slave/svc-i3c-slave.c:666:5: warning: no previous prototype for 'svc_i3c_fifo_status' [-Wmissing-prototypes]
     666 | int svc_i3c_fifo_status(struct i3c_slave_ctrl *ctrl, bool tx)
         |     ^~~~~~~~~~~~~~~~~~~


vim +/svc_i3c_get_features +211 drivers/i3c/slave/svc-i3c-slave.c

10d1fc84a07d32 Frank Li 2023-10-18  210  
10d1fc84a07d32 Frank Li 2023-10-18 @211  const struct i3c_slave_ctrl_features *svc_i3c_get_features(struct i3c_slave_ctrl *ctrl)
10d1fc84a07d32 Frank Li 2023-10-18  212  {
10d1fc84a07d32 Frank Li 2023-10-18  213  	struct svc_i3c_slave *svc;
10d1fc84a07d32 Frank Li 2023-10-18  214  
10d1fc84a07d32 Frank Li 2023-10-18  215  	svc = dev_get_drvdata(&ctrl->dev);
10d1fc84a07d32 Frank Li 2023-10-18  216  
10d1fc84a07d32 Frank Li 2023-10-18  217  	if (!svc)
10d1fc84a07d32 Frank Li 2023-10-18  218  		return NULL;
10d1fc84a07d32 Frank Li 2023-10-18  219  
10d1fc84a07d32 Frank Li 2023-10-18  220  	return &svc->features;
10d1fc84a07d32 Frank Li 2023-10-18  221  }
10d1fc84a07d32 Frank Li 2023-10-18  222  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: [PATCH 1/5] i3c: add slave mode support
  2023-10-18 21:58   ` Frank Li
  (?)
@ 2023-10-23  1:11 ` kernel test robot
  -1 siblings, 0 replies; 37+ messages in thread
From: kernel test robot @ 2023-10-20 10:36 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "git am base is a link in commit message"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20231018215809.3477437-2-Frank.Li@nxp.com>
References: <20231018215809.3477437-2-Frank.Li@nxp.com>
TO: Frank Li <Frank.Li@nxp.com>
TO: miquel.raynal@bootlin.com
TO: conor.culhane@silvaco.com
TO: alexandre.belloni@bootlin.com
TO: robh+dt@kernel.org
TO: krzysztof.kozlowski+dt@linaro.org
TO: conor+dt@kernel.org
TO: corbet@lwn.net
TO: joe@perches.com
TO: Frank.Li@nxp.com
TO: linux-i3c@lists.infradead.org
TO: devicetree@vger.kernel.org
TO: linux-kernel@vger.kernel.org
TO: linux-doc@vger.kernel.org
CC: gregkh@linuxfoundation.org
CC: imx@lists.linux.dev
CC: jirislaby@kernel.org
CC: linux-serial@vger.kernel.org

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.6-rc6 next-20231020]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-slave-mode-support/20231019-055940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20231018215809.3477437-2-Frank.Li%40nxp.com
patch subject: [PATCH 1/5] i3c: add slave mode support
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20231020/202310201829.Hgq2x9nm-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310201829.Hgq2x9nm-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202310201829.Hgq2x9nm-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/i3c/slave.c:166: warning: Function parameter or member 'ctrl' not described in 'devm_i3c_slave_ctrl_destroy'
>> drivers/i3c/slave.c:166: warning: Excess function parameter 'ops' description in 'devm_i3c_slave_ctrl_destroy'
>> drivers/i3c/slave.c:166: warning: Excess function parameter 'owner' description in 'devm_i3c_slave_ctrl_destroy'
>> drivers/i3c/slave.c:228: warning: expecting prototype for i3c_slave_ctrl(). Prototype was for i3c_slave_ctrl_get() instead
>> drivers/i3c/slave.c:420: warning: Function parameter or member 'fd' not described in 'i3c_slave_func_unregister_driver'
>> drivers/i3c/slave.c:420: warning: Excess function parameter 'driver' description in 'i3c_slave_func_unregister_driver'


vim +166 drivers/i3c/slave.c

a63b2858bd837d Frank Li 2023-10-18  154  
a63b2858bd837d Frank Li 2023-10-18  155  /**
a63b2858bd837d Frank Li 2023-10-18  156   * devm_i3c_slave_ctrl_destroy() - destroy the slave controller device
a63b2858bd837d Frank Li 2023-10-18  157   * @dev: device that is creating the new slave controller device
a63b2858bd837d Frank Li 2023-10-18  158   * @ops: function pointers for performing slave controller operations
a63b2858bd837d Frank Li 2023-10-18  159   * @owner: the owner of the module that creates the slave controller device
a63b2858bd837d Frank Li 2023-10-18  160   *
a63b2858bd837d Frank Li 2023-10-18  161   * Invoke to create a new slave controller device and add it to i3c_slave class. While at that, it
a63b2858bd837d Frank Li 2023-10-18  162   * also associates the device with the i3c_slave using devres. On driver detach, release function is
a63b2858bd837d Frank Li 2023-10-18  163   * invoked on the devres data, then devres data is freed.
a63b2858bd837d Frank Li 2023-10-18  164   */
a63b2858bd837d Frank Li 2023-10-18  165  void devm_i3c_slave_ctrl_destroy(struct device *dev, struct i3c_slave_ctrl *ctrl)
a63b2858bd837d Frank Li 2023-10-18 @166  {
a63b2858bd837d Frank Li 2023-10-18  167  	int r;
a63b2858bd837d Frank Li 2023-10-18  168  
a63b2858bd837d Frank Li 2023-10-18  169  	r = devres_destroy(dev, devm_i3c_slave_ctrl_release, devm_i3c_slave_ctrl_match,
a63b2858bd837d Frank Li 2023-10-18  170  			   ctrl);
a63b2858bd837d Frank Li 2023-10-18  171  	dev_WARN_ONCE(dev, r, "couldn't find I3C controller resource\n");
a63b2858bd837d Frank Li 2023-10-18  172  }
a63b2858bd837d Frank Li 2023-10-18  173  EXPORT_SYMBOL_GPL(devm_i3c_slave_ctrl_destroy);
a63b2858bd837d Frank Li 2023-10-18  174  
a63b2858bd837d Frank Li 2023-10-18  175  /**
a63b2858bd837d Frank Li 2023-10-18  176   * i3c_slave_ctrl_destroy() - destroy the slave controller device
a63b2858bd837d Frank Li 2023-10-18  177   * @ctrl: the slave controller device that has to be destroyed
a63b2858bd837d Frank Li 2023-10-18  178   *
a63b2858bd837d Frank Li 2023-10-18  179   * Invoke to destroy the I3C slave device
a63b2858bd837d Frank Li 2023-10-18  180   */
a63b2858bd837d Frank Li 2023-10-18  181  void i3c_slave_ctrl_destroy(struct i3c_slave_ctrl *ctrl)
a63b2858bd837d Frank Li 2023-10-18  182  {
a63b2858bd837d Frank Li 2023-10-18  183  	i3c_slave_cfs_remove_ctrl_group(ctrl->group);
a63b2858bd837d Frank Li 2023-10-18  184  	device_unregister(&ctrl->dev);
a63b2858bd837d Frank Li 2023-10-18  185  }
a63b2858bd837d Frank Li 2023-10-18  186  EXPORT_SYMBOL_GPL(i3c_slave_ctrl_destroy);
a63b2858bd837d Frank Li 2023-10-18  187  
a63b2858bd837d Frank Li 2023-10-18  188  /**
a63b2858bd837d Frank Li 2023-10-18  189   * i3c_slave_ctrl_add_func() - bind I3C slave function to an slave controller
a63b2858bd837d Frank Li 2023-10-18  190   * @ctrl: the controller device to which the slave function should be added
a63b2858bd837d Frank Li 2023-10-18  191   * @func: the slave function to be added
a63b2858bd837d Frank Li 2023-10-18  192   *
a63b2858bd837d Frank Li 2023-10-18  193   * An I3C slave device can have only one functions.
a63b2858bd837d Frank Li 2023-10-18  194   */
a63b2858bd837d Frank Li 2023-10-18  195  int i3c_slave_ctrl_add_func(struct i3c_slave_ctrl *ctrl, struct i3c_slave_func *func)
a63b2858bd837d Frank Li 2023-10-18  196  {
a63b2858bd837d Frank Li 2023-10-18  197  	if (ctrl->func)
a63b2858bd837d Frank Li 2023-10-18  198  		return -EBUSY;
a63b2858bd837d Frank Li 2023-10-18  199  
a63b2858bd837d Frank Li 2023-10-18  200  	ctrl->func = func;
a63b2858bd837d Frank Li 2023-10-18  201  	func->ctrl = ctrl;
a63b2858bd837d Frank Li 2023-10-18  202  
a63b2858bd837d Frank Li 2023-10-18  203  	return 0;
a63b2858bd837d Frank Li 2023-10-18  204  }
a63b2858bd837d Frank Li 2023-10-18  205  EXPORT_SYMBOL_GPL(i3c_slave_ctrl_add_func);
a63b2858bd837d Frank Li 2023-10-18  206  
a63b2858bd837d Frank Li 2023-10-18  207  /**
a63b2858bd837d Frank Li 2023-10-18  208   * i3c_slave_ctrl_remove_func() - unbind I3C slave function to an slave controller
a63b2858bd837d Frank Li 2023-10-18  209   * @ctrl: the controller device to which the slave function should be removed
a63b2858bd837d Frank Li 2023-10-18  210   * @func: the slave function to be removed
a63b2858bd837d Frank Li 2023-10-18  211   *
a63b2858bd837d Frank Li 2023-10-18  212   * An I3C slave device can have only one functions.
a63b2858bd837d Frank Li 2023-10-18  213   */
a63b2858bd837d Frank Li 2023-10-18  214  void i3c_slave_ctrl_remove_func(struct i3c_slave_ctrl *ctrl, struct i3c_slave_func *func)
a63b2858bd837d Frank Li 2023-10-18  215  {
a63b2858bd837d Frank Li 2023-10-18  216  	ctrl->func = NULL;
a63b2858bd837d Frank Li 2023-10-18  217  }
a63b2858bd837d Frank Li 2023-10-18  218  EXPORT_SYMBOL_GPL(i3c_slave_ctrl_remove_func);
a63b2858bd837d Frank Li 2023-10-18  219  
a63b2858bd837d Frank Li 2023-10-18  220  /**
a63b2858bd837d Frank Li 2023-10-18  221   * i3c_slave_ctrl() - get the I3C slave controller
a63b2858bd837d Frank Li 2023-10-18  222   * @name: device name of the slave controller
a63b2858bd837d Frank Li 2023-10-18  223   *
a63b2858bd837d Frank Li 2023-10-18  224   * Invoke to get struct i3c_slave_ctrl * corresponding to the device name of the
a63b2858bd837d Frank Li 2023-10-18  225   * slave controller
a63b2858bd837d Frank Li 2023-10-18  226   */
a63b2858bd837d Frank Li 2023-10-18  227  struct i3c_slave_ctrl *i3c_slave_ctrl_get(const char *name)
a63b2858bd837d Frank Li 2023-10-18 @228  {
a63b2858bd837d Frank Li 2023-10-18  229  	int ret = -EINVAL;
a63b2858bd837d Frank Li 2023-10-18  230  	struct i3c_slave_ctrl *ctrl;
a63b2858bd837d Frank Li 2023-10-18  231  	struct device *dev;
a63b2858bd837d Frank Li 2023-10-18  232  	struct class_dev_iter iter;
a63b2858bd837d Frank Li 2023-10-18  233  
a63b2858bd837d Frank Li 2023-10-18  234  	class_dev_iter_init(&iter, i3c_slave_ctrl_class, NULL, NULL);
a63b2858bd837d Frank Li 2023-10-18  235  	while ((dev = class_dev_iter_next(&iter))) {
a63b2858bd837d Frank Li 2023-10-18  236  		if (strcmp(name, dev_name(dev)))
a63b2858bd837d Frank Li 2023-10-18  237  			continue;
a63b2858bd837d Frank Li 2023-10-18  238  
a63b2858bd837d Frank Li 2023-10-18  239  		ctrl = to_i3c_slave_ctrl(dev);
a63b2858bd837d Frank Li 2023-10-18  240  		if (!try_module_get(ctrl->ops->owner)) {
a63b2858bd837d Frank Li 2023-10-18  241  			ret = -EINVAL;
a63b2858bd837d Frank Li 2023-10-18  242  			goto err;
a63b2858bd837d Frank Li 2023-10-18  243  		}
a63b2858bd837d Frank Li 2023-10-18  244  
a63b2858bd837d Frank Li 2023-10-18  245  		class_dev_iter_exit(&iter);
a63b2858bd837d Frank Li 2023-10-18  246  		get_device(&ctrl->dev);
a63b2858bd837d Frank Li 2023-10-18  247  		return ctrl;
a63b2858bd837d Frank Li 2023-10-18  248  	}
a63b2858bd837d Frank Li 2023-10-18  249  
a63b2858bd837d Frank Li 2023-10-18  250  err:
a63b2858bd837d Frank Li 2023-10-18  251  	class_dev_iter_exit(&iter);
a63b2858bd837d Frank Li 2023-10-18  252  	return ERR_PTR(ret);
a63b2858bd837d Frank Li 2023-10-18  253  }
a63b2858bd837d Frank Li 2023-10-18  254  EXPORT_SYMBOL_GPL(i3c_slave_ctrl_get);
a63b2858bd837d Frank Li 2023-10-18  255  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 37+ messages in thread
* [PATCH 0/5] I3C slave mode support
@ 2023-10-18 21:58 ` Frank Li
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Li @ 2023-10-18 21:58 UTC (permalink / raw)
  To: miquel.raynal, conor.culhane, alexandre.belloni, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, corbet, joe, Frank.Li,
	linux-i3c, devicetree, linux-kernel, linux-doc
  Cc: gregkh, imx, jirislaby, linux-serial

This  patch introduces support for I3C slave mode, which is referenced
with a PCIe Endpoint system. It also establishes a configuration framework
(configfs) for the I3C slave controller driver and the I3C slave function
driver

Typic usage as

The user can configure the i3c-slave-tty device using configfs entry. In
order to change the vendorid, the following commands can be used

        # echo 0x011b > functions/tty/func1/vendor_id
        # echo 0x1000 > functions/tty/func1/part_id
        # echo 0x6 > functions/tty/t/bcr

Binding i3c-slave-tty Device to slave Controller
------------------------------------------------

In order for the slave function device to be useful, it has to be bound to
a I3C slave controller driver. Use the configfs to bind the function
device to one of the controller driver present in the system::

        # ln -s functions/pci_epf_test/func1 controllers/44330000.i3c-slave/

Host side:
        cat /dev/ttyI3C0
Slave side:
        echo abc >/dev/ttyI3C0

Master side patch:
https://lore.kernel.org/imx/20231018211111.3437929-1-Frank.Li@nxp.com/T/#u

Frank Li (5):
  i3c: add slave mode support
  dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-slave
  i3c: slave: add svc slave controller support
  i3c: slave: func: add tty driver
  Documentation: i3c: Add I3C slave mode controller and function

 .../bindings/i3c/silvaco,i3c-master.yaml      |   8 +-
 Documentation/driver-api/i3c/index.rst        |   1 +
 .../driver-api/i3c/slave/i3c-slave-cfs.rst    | 109 +++
 .../driver-api/i3c/slave/i3c-slave.rst        | 189 +++++
 .../driver-api/i3c/slave/i3c-tty-function.rst | 103 +++
 .../driver-api/i3c/slave/i3c-tty-howto.rst    | 109 +++
 Documentation/driver-api/i3c/slave/index.rst  |  13 +
 drivers/i3c/Kconfig                           |  30 +
 drivers/i3c/Makefile                          |   4 +
 drivers/i3c/func/Kconfig                      |   9 +
 drivers/i3c/func/Makefile                     |   3 +
 drivers/i3c/func/tty.c                        | 548 ++++++++++++
 drivers/i3c/i3c-cfs.c                         | 389 +++++++++
 drivers/i3c/slave.c                           | 453 ++++++++++
 drivers/i3c/slave/Kconfig                     |   9 +
 drivers/i3c/slave/Makefile                    |   4 +
 drivers/i3c/slave/svc-i3c-slave.c             | 795 ++++++++++++++++++
 include/linux/i3c/slave.h                     | 503 +++++++++++
 18 files changed, 3276 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-slave-cfs.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-slave.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-tty-function.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-tty-howto.rst
 create mode 100644 Documentation/driver-api/i3c/slave/index.rst
 create mode 100644 drivers/i3c/func/Kconfig
 create mode 100644 drivers/i3c/func/Makefile
 create mode 100644 drivers/i3c/func/tty.c
 create mode 100644 drivers/i3c/i3c-cfs.c
 create mode 100644 drivers/i3c/slave.c
 create mode 100644 drivers/i3c/slave/Kconfig
 create mode 100644 drivers/i3c/slave/Makefile
 create mode 100644 drivers/i3c/slave/svc-i3c-slave.c
 create mode 100644 include/linux/i3c/slave.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2023-11-03 18:52 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-21  7:50 [PATCH 1/5] i3c: add slave mode support kernel test robot
2023-10-23  1:20 ` kernel test robot
2023-10-23  1:20 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-10-20 11:51 [PATCH 3/5] i3c: slave: add svc slave controller support kernel test robot
2023-10-23  1:29 ` kernel test robot
2023-10-23  1:29 ` kernel test robot
2023-10-20 10:36 [PATCH 1/5] i3c: add slave mode support kernel test robot
2023-10-23  1:11 ` kernel test robot
2023-10-23  1:11 ` kernel test robot
2023-10-18 21:58 [PATCH 0/5] I3C " Frank Li
2023-10-18 21:58 ` Frank Li
2023-10-18 21:58 ` [PATCH 1/5] i3c: add " Frank Li
2023-10-18 21:58   ` Frank Li
2023-10-19  7:00   ` Krzysztof Kozlowski
2023-10-19  7:00     ` Krzysztof Kozlowski
2023-10-19 15:02     ` Frank Li
2023-10-19 15:02       ` Frank Li
2023-10-19 15:46       ` Greg KH
2023-10-19 15:46         ` Greg KH
2023-10-19 17:06         ` Greg KH
2023-10-19 17:06           ` Greg KH
2023-10-18 21:58 ` [PATCH 2/5] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-slave Frank Li
2023-10-18 21:58   ` Frank Li
2023-10-19  7:00   ` Krzysztof Kozlowski
2023-10-19  7:00     ` Krzysztof Kozlowski
2023-10-19 12:07   ` Rob Herring
2023-10-19 12:07     ` Rob Herring
2023-10-18 21:58 ` [PATCH 3/5] i3c: slave: add svc slave controller support Frank Li
2023-10-18 21:58   ` Frank Li
2023-10-18 21:58 ` [PATCH 4/5] i3c: slave: func: add tty driver Frank Li
2023-10-18 21:58   ` Frank Li
2023-10-19  7:21   ` Jiri Slaby
2023-10-19  7:21     ` Jiri Slaby
2023-10-18 21:58 ` [PATCH 5/5] Documentation: i3c: Add I3C slave mode controller and function Frank Li
2023-10-18 21:58   ` Frank Li
2023-10-18 22:07   ` Frank Li
2023-10-18 22:07     ` Frank Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.