* Re: [PATCH] spi/pl022: Fix error print while setting bits/word on pl022
[not found] ` <1334642325-29159-1-git-send-email-vinit.shenoy-qxv4g6HH51o@public.gmane.org>
@ 2012-04-17 5:57 ` Viresh Kumar
2012-04-17 6:24 ` Shubhrajyoti Datta
1 sibling, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2012-04-17 5:57 UTC (permalink / raw)
To: Vinit Kamalaksha SHENOY
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ
On 4/17/2012 11:28 AM, Vinit Kamalaksha SHENOY 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.shenoy-qxv4g6HH51o@public.gmane.org>
> ---
> 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");
> status = -ENOTSUPP;
> goto err_config_params;
> }
Reviewed-by: Viresh Kumar <viresh.kumar-qxv4g6HH51o@public.gmane.org>
--
viresh
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] spi/pl022: Fix error print while setting bits/word on pl022
@ 2012-04-17 5:58 Vinit Shenoy
[not found] ` <1334642325-29159-1-git-send-email-vinit.shenoy-qxv4g6HH51o@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Vinit Shenoy @ 2012-04-17 5:58 UTC (permalink / raw)
To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ, Vinit Shenoy
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.shenoy-qxv4g6HH51o@public.gmane.org>
---
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");
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] spi/pl022: Fix error print while setting bits/word on pl022
[not found] ` <1334642325-29159-1-git-send-email-vinit.shenoy-qxv4g6HH51o@public.gmane.org>
2012-04-17 5:57 ` Viresh Kumar
@ 2012-04-17 6:24 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2csRwyGYgQ27bXjX=m6pqFoZFim=y3Qzv_DCQvyR5G0brg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Shubhrajyoti Datta @ 2012-04-17 6:24 UTC (permalink / raw)
To: Vinit Shenoy
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ
Hi Vinit ,
A minor comment/ suggestion.
On Tue, Apr 17, 2012 at 11:28 AM, Vinit Shenoy <vinit.shenoy-qxv4g6HH51o@public.gmane.org> 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.shenoy-qxv4g6HH51o@public.gmane.org>
> ---
> 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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] spi/pl022: Fix error print while setting bits/word on pl022
[not found] ` <CAM=Q2csRwyGYgQ27bXjX=m6pqFoZFim=y3Qzv_DCQvyR5G0brg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-04-17 7:04 ` Vinit Kamalaksha SHENOY
0 siblings, 0 replies; 4+ messages in thread
From: Vinit Kamalaksha SHENOY @ 2012-04-17 7:04 UTC (permalink / raw)
To: Shubhrajyoti Datta
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
spear-devel
> From: Shubhrajyoti Datta [mailto:omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> Sent: Tuesday, April 17, 2012 11:55 AM
> 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;
> }
There are still few issues present here :(
Let me float V2.
--
vinit
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-17 7:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 5:58 [PATCH] spi/pl022: Fix error print while setting bits/word on pl022 Vinit Shenoy
[not found] ` <1334642325-29159-1-git-send-email-vinit.shenoy-qxv4g6HH51o@public.gmane.org>
2012-04-17 5:57 ` Viresh Kumar
2012-04-17 6:24 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2csRwyGYgQ27bXjX=m6pqFoZFim=y3Qzv_DCQvyR5G0brg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-17 7:04 ` Vinit Kamalaksha SHENOY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.