30 Sep, 2016

1 commit


02 Sep, 2016

1 commit


12 Apr, 2015

1 commit


11 Feb, 2015

1 commit

  • The driver currently only supports a single device per I2C bus since it uses
    the I2C bus number to set the SPI bus number. This makes it impossible to
    connect more than one chip to a single I2C bus.

    We don't want to use dynamic bus numbers unconditionally since this would
    result in every instantiation getting a different bus number starting with
    65,535 counting down unless devicetree is configured. If devicetree is
    configured, however, the SPI bus number is obtained from devicetree
    data. So we can use dynamic SPI bus numbers in this case.

    Reported-and-Tested-by: Marco Menchise
    Signed-off-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Guenter Roeck
     

22 Dec, 2014

1 commit


13 Mar, 2014

1 commit

  • Set master->max_speed_hz and master->min_speed_hz then spi core will handle
    checking transfer speed. So we can remove the same checking in this driver.

    This patch also remove testing if hz is 0 because spi->max_speed_hz will be
    default set to master->min_speed_hz if it was not set. So the transfer speed
    will never set to 0.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     

12 Feb, 2014

1 commit


03 Feb, 2014

1 commit

  • The checking for spi->mode is done in the implementation of spi_setup().
    Calling sc18is602_check_transfer(spi, NULL, 0) is pointless because
    the code is equivent to checking if spi->max_speed_hz is 0.
    Note, sc18is602_check_transfer actually allows spi->max_speed_hz is 0
    if t->speed_hz is set. So return error in sc18is602_setup() when
    spi->max_speed_hz is 0 does not make sense.

    Signed-off-by: Axel Lin
    Acked-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Axel Lin
     

23 Jan, 2014

1 commit


17 Jan, 2014

2 commits

  • Since commit 543bb25 "spi: add ability to validate xfer->bits_per_word in SPI
    core", the driver can set bits_per_word_mask for the master then the SPI core
    will reject transfers that attempt to use an unsupported bits_per_word value.
    So we can remove the bits_per_word checking in sc18is602_check_transfer() and
    let SPI core handle the checking.

    Signed-off-by: Axel Lin
    Acked-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Axel Lin
     
  • The implementation in spi_setup() already set spi->bits_per_word = 8 when
    spi->bits_per_word is 0 before calling spi->master->setup.
    So we don't need to do it again in setup() callback.

    Signed-off-by: Axel Lin
    Acked-by: Marek Vasut
    Acked-by: Barry Song
    Acked-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Axel Lin
     

04 Dec, 2013

1 commit


23 Aug, 2012

2 commits