]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
spi/spi-mpc512x-psc: init mode bits supported by the driver
authorAnatolij Gustschin <agust@denx.de>
Mon, 14 Jan 2013 20:27:00 +0000 (21:27 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 5 Feb 2013 14:44:12 +0000 (14:44 +0000)
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>
drivers/spi/spi-mpc512x-psc.c

index 88e544151f6f3c85db542544a221723a9ad3d566..89480b281d74715ad0eaa6cf63bf354546f99fc4 100644 (file)
@@ -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;