tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-spi head: 0ea1828d74e37216988a9e46cfd3db602607eba8 commit: 0ea1828d74e37216988a9e46cfd3db602607eba8 [4/4] stab at fixing cs gpios config: x86_64-randconfig-x013-201835 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 0ea1828d74e37216988a9e46cfd3db602607eba8 # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers//spi/spi-fsl-spi.c: In function 'fsl_spi_setup': >> drivers//spi/spi-fsl-spi.c:464:26: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? if (gpio_is_valid(spi->cs_gpio)) { ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:467:31: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? retval = gpio_request(spi->cs_gpio, ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:473:40: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? retval = gpio_direction_output(spi->cs_gpio, desel); ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:475:20: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? gpio_free(spi->cs_gpio); ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:478:19: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? } else if (spi->cs_gpio != -ENOENT) { ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:479:13: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? if (spi->cs_gpio < 0) ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:480:17: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? return spi->cs_gpio; ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c: In function 'fsl_spi_cleanup': drivers//spi/spi-fsl-spi.c:500:60: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? if (mpc8xxx_spi->type == TYPE_GRLIB && gpio_is_valid(spi->cs_gpio)) ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:501:18: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? gpio_free(spi->cs_gpio); ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c: In function 'fsl_spi_grlib_cs_control': drivers//spi/spi-fsl-spi.c:568:25: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? if (gpio_is_valid(spi->cs_gpio)) { ^~~~~~~ cs_gpiod drivers//spi/spi-fsl-spi.c:569:23: error: 'struct spi_device' has no member named 'cs_gpio'; did you mean 'cs_gpiod'? gpio_set_value(spi->cs_gpio, on); ^~~~~~~ cs_gpiod vim +464 drivers//spi/spi-fsl-spi.c c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 420 b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 421 static int fsl_spi_setup(struct spi_device *spi) ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 422 { 575c5807f drivers/spi/spi_mpc8xxx.c Anton Vorontsov 2009-06-18 423 struct mpc8xxx_spi *mpc8xxx_spi; b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 424 struct fsl_spi_reg *reg_base; ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 425 int retval; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 426 u32 hw_mode; d9f267481 drivers/spi/spi-fsl-spi.c Axel Lin 2014-08-31 427 struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 428 ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 429 if (!spi->max_speed_hz) ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 430 return -EINVAL; ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 431 c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 432 if (!cs) { d9f267481 drivers/spi/spi-fsl-spi.c Axel Lin 2014-08-31 433 cs = kzalloc(sizeof(*cs), GFP_KERNEL); c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 434 if (!cs) c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 435 return -ENOMEM; d9f267481 drivers/spi/spi-fsl-spi.c Axel Lin 2014-08-31 436 spi_set_ctldata(spi, cs); c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 437 } 575c5807f drivers/spi/spi_mpc8xxx.c Anton Vorontsov 2009-06-18 438 mpc8xxx_spi = spi_master_get_devdata(spi->master); ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 439 b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 440 reg_base = mpc8xxx_spi->reg_base; b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 441 883931612 drivers/spi/spi_mpc8xxx.c Thomas Weber 2010-03-16 442 hw_mode = cs->hw_mode; /* Save original settings */ b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 443 cs->hw_mode = mpc8xxx_spi_read_reg(®_base->mode); c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 444 /* mask out bits we are going to set */ c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 445 cs->hw_mode &= ~(SPMODE_CP_BEGIN_EDGECLK | SPMODE_CI_INACTIVEHIGH c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 446 | SPMODE_REV | SPMODE_LOOP); c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 447 c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 448 if (spi->mode & SPI_CPHA) c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 449 cs->hw_mode |= SPMODE_CP_BEGIN_EDGECLK; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 450 if (spi->mode & SPI_CPOL) c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 451 cs->hw_mode |= SPMODE_CI_INACTIVEHIGH; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 452 if (!(spi->mode & SPI_LSB_FIRST)) c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 453 cs->hw_mode |= SPMODE_REV; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 454 if (spi->mode & SPI_LOOP) c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 455 cs->hw_mode |= SPMODE_LOOP; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 456 b36ece832 drivers/spi/spi_fsl_spi.c Mingkai Hu 2010-10-12 457 retval = fsl_spi_setup_transfer(spi, NULL); c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 458 if (retval < 0) { c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 459 cs->hw_mode = hw_mode; /* Restore settings */ ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 460 return retval; c9bfcb315 drivers/spi/spi_mpc83xx.c Joakim Tjernlund 2008-05-12 461 } f482cd0ff drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 462 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 463 if (mpc8xxx_spi->type == TYPE_GRLIB) { 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 @464 if (gpio_is_valid(spi->cs_gpio)) { 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 465 int desel; 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 466 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 467 retval = gpio_request(spi->cs_gpio, 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 468 dev_name(&spi->dev)); 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 469 if (retval) 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 470 return retval; 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 471 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 472 desel = !(spi->mode & SPI_CS_HIGH); 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 473 retval = gpio_direction_output(spi->cs_gpio, desel); 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 474 if (retval) { 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 475 gpio_free(spi->cs_gpio); 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 476 return retval; 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 477 } 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 478 } else if (spi->cs_gpio != -ENOENT) { 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 479 if (spi->cs_gpio < 0) 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 480 return spi->cs_gpio; 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 481 return -EINVAL; 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 482 } 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 483 /* When spi->cs_gpio == -ENOENT, a hole in the phandle list 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 484 * indicates to use native chipselect if present, or allow for 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 485 * an always selected chip 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 486 */ 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 487 } 76a7498f6 drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 488 f482cd0ff drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 489 /* Initialize chipselect - might be active for SPI_CS_HIGH mode */ f482cd0ff drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 490 fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE); f482cd0ff drivers/spi/spi-fsl-spi.c Andreas Larsson 2013-02-15 491 ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 492 return 0; ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 493 } ccf06998f drivers/spi/spi_mpc83xx.c Kumar Gala 2006-05-20 494 :::::: The code at line 464 was first introduced by commit :::::: 76a7498f691f4c315dba0747141eeee3ceb740dc spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores :::::: TO: Andreas Larsson <andreas@xxxxxxxxxxx> :::::: CC: Grant Likely <grant.likely@xxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip