From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [v7] i2c: imx: support slave mode for imx I2C driver
Date: Mon, 19 Oct 2020 23:46:33 +0800 [thread overview]
Message-ID: <202010192324.lFBH5RRI-lkp@intel.com> (raw)
In-Reply-To: <20201016082435.11593-1-biwen.li@oss.nxp.com>
[-- Attachment #1: Type: text/plain, Size: 6710 bytes --]
Hi Biwen,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.9]
[cannot apply to wsa/i2c/for-next next-20201016]
[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/Biwen-Li/i2c-imx-support-slave-mode-for-imx-I2C-driver/20201016-163639
base: bbf5c979011a099af5dc76498918ed7df445635b
config: arm-imx_v6_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/afe1305a21d6e88b2c015cf62f84893cd9c462d5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Biwen-Li/i2c-imx-support-slave-mode-for-imx-I2C-driver/20201016-163639
git checkout afe1305a21d6e88b2c015cf62f84893cd9c462d5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/i2c/busses/i2c-imx.c: In function 'i2c_imx_slave_isr':
>> drivers/i2c/busses/i2c-imx.c:667:4: error: implicit declaration of function 'i2c_slave_event' [-Werror=implicit-function-declaration]
667 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
| ^~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-imx.c:667:36: error: 'I2C_SLAVE_READ_REQUESTED' undeclared (first use in this function)
667 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c:667:36: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/i2c/busses/i2c-imx.c:677:36: error: 'I2C_SLAVE_WRITE_REQUESTED' undeclared (first use in this function)
677 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-imx.c:688:36: error: 'I2C_SLAVE_WRITE_RECEIVED' undeclared (first use in this function)
688 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-imx.c:692:36: error: 'I2C_SLAVE_STOP' undeclared (first use in this function); did you mean 'I2C_M_STOP'?
692 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_STOP, &value);
| ^~~~~~~~~~~~~~
| I2C_M_STOP
>> drivers/i2c/busses/i2c-imx.c:698:35: error: 'I2C_SLAVE_READ_PROCESSED' undeclared (first use in this function)
698 | i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_PROCESSED, &value);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c: At top level:
>> drivers/i2c/busses/i2c-imx.c:1301:3: error: 'const struct i2c_algorithm' has no member named 'reg_slave'
1301 | .reg_slave = i2c_imx_reg_slave,
| ^~~~~~~~~
>> drivers/i2c/busses/i2c-imx.c:1301:15: warning: excess elements in struct initializer
1301 | .reg_slave = i2c_imx_reg_slave,
| ^~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c:1301:15: note: (near initialization for 'i2c_imx_algo')
>> drivers/i2c/busses/i2c-imx.c:1302:3: error: 'const struct i2c_algorithm' has no member named 'unreg_slave'
1302 | .unreg_slave = i2c_imx_unreg_slave,
| ^~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c:1302:17: warning: excess elements in struct initializer
1302 | .unreg_slave = i2c_imx_unreg_slave,
| ^~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-imx.c:1302:17: note: (near initialization for 'i2c_imx_algo')
cc1: some warnings being treated as errors
vim +/i2c_slave_event +667 drivers/i2c/busses/i2c-imx.c
656
657 static irqreturn_t i2c_imx_slave_isr(struct imx_i2c_struct *i2c_imx,
658 unsigned int status, unsigned int ctl)
659 {
660 u8 value;
661
662 if (status & I2SR_IAL) { /* Arbitration lost */
663 i2c_imx_clr_al_bit(status | I2SR_IIF, i2c_imx);
664 } else if (status & I2SR_IAAS) { /* Addressed as a slave */
665 if (status & I2SR_SRW) { /* Master wants to read from us*/
666 dev_dbg(&i2c_imx->adapter.dev, "read requested");
> 667 i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
668
669 /* Slave transmit */
670 ctl |= I2CR_MTX;
671 imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
672
673 /* Send data */
674 imx_i2c_write_reg(value, i2c_imx, IMX_I2C_I2DR);
675 } else { /* Master wants to write to us */
676 dev_dbg(&i2c_imx->adapter.dev, "write requested");
> 677 i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
678
679 /* Slave receive */
680 ctl &= ~I2CR_MTX;
681 imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
682 /* Dummy read */
683 imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
684 }
685 } else if (!(ctl & I2CR_MTX)) { /* Receive mode */
686 if (status & I2SR_IBB) { /* No STOP signal detected */
687 value = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
> 688 i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
689 } else { /* STOP signal is detected */
690 dev_dbg(&i2c_imx->adapter.dev,
691 "STOP signal detected");
> 692 i2c_slave_event(i2c_imx->slave, I2C_SLAVE_STOP, &value);
693 }
694 } else if (!(status & I2SR_RXAK)) { /* Transmit mode received ACK */
695 ctl |= I2CR_MTX;
696 imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
697
> 698 i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_PROCESSED, &value);
699
700 imx_i2c_write_reg(value, i2c_imx, IMX_I2C_I2DR);
701 } else { /* Transmit mode received NAK */
702 ctl &= ~I2CR_MTX;
703 imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
704 imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
705 }
706
707 return IRQ_HANDLED;
708 }
709
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39787 bytes --]
prev parent reply other threads:[~2020-10-19 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 8:24 [v7] i2c: imx: support slave mode for imx I2C driver Biwen Li
2020-10-16 8:24 ` Biwen Li
2020-10-19 15:43 ` kernel test robot
2020-10-19 15:46 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202010192324.lFBH5RRI-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.