linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linusw-gpio:gpio-descriptors-spi 5/11] drivers/spi/spi-mpc512x-psc.c:130:15: error: 'struct mpc512x_psc_spi_cs' has no member named 'gpiod'
@ 2022-02-01 11:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-01 11:33 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-gpio

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-spi
head:   a4efb11e4ae35a2251b5894b8f84fe7e92af4ab8
commit: bd855ae589a7966dbedbcee6c35292fea901d3cc [5/11] spi: mpc512x-psc: Convert to use GPIO descriptors
config: powerpc-randconfig-r011-20220130 (https://download.01.org/0day-ci/archive/20220201/202202011916.m45rxna9-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?id=bd855ae589a7966dbedbcee6c35292fea901d3cc
        git remote add linusw-gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
        git fetch --no-tags linusw-gpio gpio-descriptors-spi
        git checkout bd855ae589a7966dbedbcee6c35292fea901d3cc
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/spi/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/spi/spi-mpc512x-psc.c: In function 'mpc512x_psc_spi_activate_cs':
>> drivers/spi/spi-mpc512x-psc.c:130:15: error: 'struct mpc512x_psc_spi_cs' has no member named 'gpiod'
     130 |         if (cs->gpiod) {
         |               ^~
   drivers/spi/spi-mpc512x-psc.c: In function 'mpc512x_psc_spi_setup':
   drivers/spi/spi-mpc512x-psc.c:376:13: warning: unused variable 'ret' [-Wunused-variable]
     376 |         int ret;
         |             ^~~


vim +130 drivers/spi/spi-mpc512x-psc.c

    90	
    91	static void mpc512x_psc_spi_activate_cs(struct spi_device *spi)
    92	{
    93		struct mpc512x_psc_spi_cs *cs = spi->controller_state;
    94		struct mpc512x_psc_spi *mps = spi_master_get_devdata(spi->master);
    95		u32 sicr;
    96		u32 ccr;
    97		int speed;
    98		u16 bclkdiv;
    99	
   100		sicr = in_be32(psc_addr(mps, sicr));
   101	
   102		/* Set clock phase and polarity */
   103		if (spi->mode & SPI_CPHA)
   104			sicr |= 0x00001000;
   105		else
   106			sicr &= ~0x00001000;
   107	
   108		if (spi->mode & SPI_CPOL)
   109			sicr |= 0x00002000;
   110		else
   111			sicr &= ~0x00002000;
   112	
   113		if (spi->mode & SPI_LSB_FIRST)
   114			sicr |= 0x10000000;
   115		else
   116			sicr &= ~0x10000000;
   117		out_be32(psc_addr(mps, sicr), sicr);
   118	
   119		ccr = in_be32(psc_addr(mps, ccr));
   120		ccr &= 0xFF000000;
   121		speed = cs->speed_hz;
   122		if (!speed)
   123			speed = 1000000;	/* default 1MHz */
   124		bclkdiv = (mps->mclk_rate / speed) - 1;
   125	
   126		ccr |= (((bclkdiv & 0xff) << 16) | (((bclkdiv >> 8) & 0xff) << 8));
   127		out_be32(psc_addr(mps, ccr), ccr);
   128		mps->bits_per_word = cs->bits_per_word;
   129	
 > 130		if (cs->gpiod) {
   131			if (mps->cs_control)
   132				/* boardfile override */
   133				mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 1 : 0);
   134			else
   135				/* gpiolib will deal with the inversion */
   136				gpiod_set_value(spi->cs_gpiod, 1);
   137		}
   138	}
   139	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-01 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-01 11:33 [linusw-gpio:gpio-descriptors-spi 5/11] drivers/spi/spi-mpc512x-psc.c:130:15: error: 'struct mpc512x_psc_spi_cs' has no member named 'gpiod' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).