Browse Source

spi/spi-mpc512x-psc: init mode bits supported by the driver

The driver should setup mode bits it supports, otherwise
adding an SPI device might fail even if the driver supports
the requested SPI mode.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Anatolij Gustschin 12 năm trước cách đây
mục cha
commit
c88dd349b5
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      drivers/spi/spi-mpc512x-psc.c

+ 1 - 0
drivers/spi/spi-mpc512x-psc.c

@@ -438,6 +438,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
 		master->num_chipselect = pdata->max_chipselect;
 	}
 
+	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
 	master->setup = mpc512x_psc_spi_setup;
 	master->transfer = mpc512x_psc_spi_transfer;
 	master->cleanup = mpc512x_psc_spi_cleanup;