Re: [PATCH V2 10/18] i2c: imx-lpi2c: add bus recovery feature
From: kernel test robot <hidden>
Date: 2021-04-07 00:34:45
Also in:
linux-arm-kernel, linux-i2c, oe-kbuild-all
Hi Clark, Thank you for the patch! Yet something to improve: [auto build test ERROR on shawnguo/for-next] [also build test ERROR on next-20210406] [cannot apply to wsa/i2c/for-next robh/for-next v5.12-rc6] [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/Clark-Wang/i2c-imx-lpi2c-New-features-and-bug-fixes/20210406-193539 base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next config: nios2-randconfig-r003-20210406 (attached as .config) compiler: nios2-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 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/5853de64dd40e1cc71f0adede924934aee4c4f0e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Clark-Wang/i2c-imx-lpi2c-New-features-and-bug-fixes/20210406-193539 git checkout 5853de64dd40e1cc71f0adede924934aee4c4f0e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All errors (new ones prefixed by >>): drivers/i2c/busses/i2c-imx-lpi2c.c: In function 'lpi2c_imx_init_recovery_info':
quoted
drivers/i2c/busses/i2c-imx-lpi2c.c:583:21: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
583 | rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
| ^~~~~~~~~~~~~~
| devm_gpio_freequoted
drivers/i2c/busses/i2c-imx-lpi2c.c:583:55: error: 'GPIOD_IN' undeclared (first use in this function); did you mean 'GPIOF_IN'?
583 | rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
| ^~~~~~~~
| GPIOF_IN
drivers/i2c/busses/i2c-imx-lpi2c.c:583:55: note: each undeclared identifier is reported only once for each function it appears inquoted
drivers/i2c/busses/i2c-imx-lpi2c.c:584:55: error: 'GPIOD_OUT_HIGH_OPEN_DRAIN' undeclared (first use in this function)
584 | rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +583 drivers/i2c/busses/i2c-imx-lpi2c.c
560
561 /*
562 * We switch SCL and SDA to their GPIO function and do some bitbanging
563 * for bus recovery. These alternative pinmux settings can be
564 * described in the device tree by a separate pinctrl state "gpio". If
565 * this is missing this is not a big problem, the only implication is
566 * that we can't do bus recovery.
567 */
568 static int lpi2c_imx_init_recovery_info(struct lpi2c_imx_struct *lpi2c_imx,
569 struct platform_device *pdev)
570 {
571 struct i2c_bus_recovery_info *rinfo = &lpi2c_imx->rinfo;
572
573 lpi2c_imx->pinctrl = devm_pinctrl_get(&pdev->dev);
574 if (!lpi2c_imx->pinctrl || IS_ERR(lpi2c_imx->pinctrl)) {
575 dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
576 return PTR_ERR(lpi2c_imx->pinctrl);
577 }
578
579 lpi2c_imx->pinctrl_pins_default = pinctrl_lookup_state(lpi2c_imx->pinctrl,
580 PINCTRL_STATE_DEFAULT);
581 lpi2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(lpi2c_imx->pinctrl,
582 "gpio");
> 583 rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
> 584 rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
585
586 if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER ||
587 PTR_ERR(rinfo->scl_gpiod) == -EPROBE_DEFER) {
588 return -EPROBE_DEFER;
589 } else if (IS_ERR(rinfo->sda_gpiod) ||
590 IS_ERR(rinfo->scl_gpiod) ||
591 IS_ERR(lpi2c_imx->pinctrl_pins_default) ||
592 IS_ERR(lpi2c_imx->pinctrl_pins_gpio)) {
593 dev_dbg(&pdev->dev, "recovery information incomplete\n");
594 return 0;
595 }
596
597 dev_info(&pdev->dev, "using scl%s for recovery\n",
598 rinfo->sda_gpiod ? ",sda" : "");
599
600 rinfo->prepare_recovery = lpi2c_imx_prepare_recovery;
601 rinfo->unprepare_recovery = lpi2c_imx_unprepare_recovery;
602 rinfo->recover_bus = i2c_generic_scl_recovery;
603 lpi2c_imx->adapter.bus_recovery_info = rinfo;
604
605 return 0;
606 }
607
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 29278 bytes