Hi Vinit , A minor comment/ suggestion. On Tue, Apr 17, 2012 at 11:28 AM, Vinit Shenoy <vinit.she...@st.com> wrote: > pl022 ssp controller supports word lengths from 4 to 16 bits. > The kernel error message says: > "a standard pl022 can only handle 1 <= n <= 16 bit words". > > Fixed above range to 4 <= n <= 16. > > Signed-off-by: Vinit Shenoy <vinit.she...@st.com> > --- > drivers/spi/spi-pl022.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c > index 09c925a..905752f 100644 > --- a/drivers/spi/spi-pl022.c > +++ b/drivers/spi/spi-pl022.c > @@ -1848,7 +1848,7 @@ static int pl022_setup(struct spi_device *spi) > "illegal data size for this controller!\n"); > dev_err(&spi->dev, > "a standard pl022 can only handle " > - "1 <= n <= 16 bit words\n"); > + "4 <= n <= 16 bit words\n"); However this print will not executed for sizes < 4 Can we have something like. [1]
> status = -ENOTSUPP; > goto err_config_params; > } > -- > 1.7.3.4 > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > spi-devel-general mailing list > spi-devel-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/spi-devel-general [1] diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 09c925a..6444a5e 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1823,11 +1823,7 @@ static int pl022_setup(struct spi_device *spi) } else chip->cs_control = chip_info->cs_control; - if (bits <= 3) { - /* PL022 doesn't support less than 4-bits */ - status = -ENOTSUPP; - goto err_config_params; - } else if (bits <= 8) { + if (bits <= 8 && bits > 3) { dev_dbg(&spi->dev, "4 <= n <=8 bits per word\n"); chip->n_bytes = 1; chip->read = READING_U8; @@ -1848,7 +1844,7 @@ static int pl022_setup(struct spi_device *spi) "illegal data size for this controller!\n"); dev_err(&spi->dev, "a standard pl022 can only handle " - "1 <= n <= 16 bit words\n"); + "4 <= n <= 16 bit words\n"); status = -ENOTSUPP; goto err_config_params; } ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general