linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix
@ 2012-05-21 17:05 Florian Fainelli
       [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2012-05-21 17:05 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

Hi Grant,

These are 3 cleanups and fixes based on your spi/merge branch. I hope this
is not too later for the 3.4-rc cycle.

Florian Fainelli (3):
  spi/bcm63xx: remove driver version
  spi/bcm63xx: add missing spi_master_{resume,suspend} calls to PM
    callbacks
  spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()

 drivers/spi/spi-bcm63xx.c |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

-- 
1.7.9.5


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] spi/bcm63xx: remove driver version
       [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
@ 2012-05-21 17:05   ` Florian Fainelli
       [not found]     ` <1337619960-9672-2-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  2012-05-21 17:05   ` [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks Florian Fainelli
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2012-05-21 17:05 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

As Grant Likely reported, this does not make any sense in a mainline kernel
remove that driver version string.

Reported-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
---
 drivers/spi/spi-bcm63xx.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 7491971..478eddc 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -36,7 +36,6 @@
 #include <bcm63xx_dev_spi.h>
 
 #define PFX		KBUILD_MODNAME
-#define DRV_VER		"0.1.2"
 
 struct bcm63xx_spi {
 	struct completion	done;
@@ -420,8 +419,8 @@ static int __devinit bcm63xx_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
-	dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d) v%s\n",
-		 r->start, irq, bs->fifo_size, DRV_VER);
+	dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d)\n",
+		 r->start, irq, bs->fifo_size);
 
 	return 0;
 
-- 
1.7.9.5


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks
       [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  2012-05-21 17:05   ` [PATCH 1/3] spi/bcm63xx: remove driver version Florian Fainelli
@ 2012-05-21 17:05   ` Florian Fainelli
       [not found]     ` <1337619960-9672-3-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  2012-05-21 17:06   ` [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer() Florian Fainelli
  2012-06-27 22:26   ` [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix Florian Fainelli
  3 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2012-05-21 17:05 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

The PM callbacks implemented by the spi-bcm63xx driver don't call
spi_master_{resume,suspend}, fix that.

Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
---
 drivers/spi/spi-bcm63xx.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 478eddc..85b0361 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -461,6 +461,8 @@ static int bcm63xx_spi_suspend(struct device *dev)
 			platform_get_drvdata(to_platform_device(dev));
 	struct bcm63xx_spi *bs = spi_master_get_devdata(master);
 
+	spi_master_suspend(master);
+
 	clk_disable(bs->clk);
 
 	return 0;
@@ -474,6 +476,8 @@ static int bcm63xx_spi_resume(struct device *dev)
 
 	clk_enable(bs->clk);
 
+	spi_master_resume(master);
+
 	return 0;
 }
 
-- 
1.7.9.5


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()
       [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  2012-05-21 17:05   ` [PATCH 1/3] spi/bcm63xx: remove driver version Florian Fainelli
  2012-05-21 17:05   ` [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks Florian Fainelli
@ 2012-05-21 17:06   ` Florian Fainelli
       [not found]     ` <1337619960-9672-4-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
  2012-06-27 22:26   ` [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix Florian Fainelli
  3 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2012-05-21 17:06 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

Calling bcm63xx_spi_check_transfer() with a NULL argument does not do
anything useful that the core spi code is not doing already, remove
this superfluous call.

Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
---
 drivers/spi/spi-bcm63xx.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 85b0361..1307833 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -167,13 +167,6 @@ static int bcm63xx_spi_setup(struct spi_device *spi)
 		return -EINVAL;
 	}
 
-	ret = bcm63xx_spi_check_transfer(spi, NULL);
-	if (ret < 0) {
-		dev_err(&spi->dev, "setup: unsupported mode bits %x\n",
-			spi->mode & ~MODEBITS);
-		return ret;
-	}
-
 	dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n",
 		__func__, spi->mode & MODEBITS, spi->bits_per_word, 0);
 
-- 
1.7.9.5


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] spi/bcm63xx: remove driver version
       [not found]     ` <1337619960-9672-2-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
@ 2012-05-25 22:59       ` Grant Likely
  0 siblings, 0 replies; 8+ messages in thread
From: Grant Likely @ 2012-05-25 22:59 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

On Mon, 21 May 2012 19:05:58 +0200, Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> wrote:
> As Grant Likely reported, this does not make any sense in a mainline kernel
> remove that driver version string.
> 
> Reported-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-bcm63xx.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
> index 7491971..478eddc 100644
> --- a/drivers/spi/spi-bcm63xx.c
> +++ b/drivers/spi/spi-bcm63xx.c
> @@ -36,7 +36,6 @@
>  #include <bcm63xx_dev_spi.h>
>  
>  #define PFX		KBUILD_MODNAME
> -#define DRV_VER		"0.1.2"
>  
>  struct bcm63xx_spi {
>  	struct completion	done;
> @@ -420,8 +419,8 @@ static int __devinit bcm63xx_spi_probe(struct platform_device *pdev)
>  		goto out_clk_disable;
>  	}
>  
> -	dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d) v%s\n",
> -		 r->start, irq, bs->fifo_size, DRV_VER);
> +	dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d)\n",
> +		 r->start, irq, bs->fifo_size);
>  
>  	return 0;
>  
> -- 
> 1.7.9.5
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks
       [not found]     ` <1337619960-9672-3-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
@ 2012-05-25 23:00       ` Grant Likely
  0 siblings, 0 replies; 8+ messages in thread
From: Grant Likely @ 2012-05-25 23:00 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

On Mon, 21 May 2012 19:05:59 +0200, Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> wrote:
> The PM callbacks implemented by the spi-bcm63xx driver don't call
> spi_master_{resume,suspend}, fix that.
> 
> Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-bcm63xx.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
> index 478eddc..85b0361 100644
> --- a/drivers/spi/spi-bcm63xx.c
> +++ b/drivers/spi/spi-bcm63xx.c
> @@ -461,6 +461,8 @@ static int bcm63xx_spi_suspend(struct device *dev)
>  			platform_get_drvdata(to_platform_device(dev));
>  	struct bcm63xx_spi *bs = spi_master_get_devdata(master);
>  
> +	spi_master_suspend(master);
> +
>  	clk_disable(bs->clk);
>  
>  	return 0;
> @@ -474,6 +476,8 @@ static int bcm63xx_spi_resume(struct device *dev)
>  
>  	clk_enable(bs->clk);
>  
> +	spi_master_resume(master);
> +
>  	return 0;
>  }
>  
> -- 
> 1.7.9.5
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()
       [not found]     ` <1337619960-9672-4-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
@ 2012-05-25 23:00       ` Grant Likely
  0 siblings, 0 replies; 8+ messages in thread
From: Grant Likely @ 2012-05-25 23:00 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Florian Fainelli, jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

On Mon, 21 May 2012 19:06:00 +0200, Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> wrote:
> Calling bcm63xx_spi_check_transfer() with a NULL argument does not do
> anything useful that the core spi code is not doing already, remove
> this superfluous call.
> 
> Signed-off-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-bcm63xx.c |    7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
> index 85b0361..1307833 100644
> --- a/drivers/spi/spi-bcm63xx.c
> +++ b/drivers/spi/spi-bcm63xx.c
> @@ -167,13 +167,6 @@ static int bcm63xx_spi_setup(struct spi_device *spi)
>  		return -EINVAL;
>  	}
>  
> -	ret = bcm63xx_spi_check_transfer(spi, NULL);
> -	if (ret < 0) {
> -		dev_err(&spi->dev, "setup: unsupported mode bits %x\n",
> -			spi->mode & ~MODEBITS);
> -		return ret;
> -	}
> -
>  	dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n",
>  		__func__, spi->mode & MODEBITS, spi->bits_per_word, 0);
>  
> -- 
> 1.7.9.5
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix
       [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2012-05-21 17:06   ` [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer() Florian Fainelli
@ 2012-06-27 22:26   ` Florian Fainelli
  3 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2012-06-27 22:26 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w

Hi Grant,

FlorianOn Monday 21 May 2012 19:05:57  Fainelli wrote:
> Hi Grant,
> 
> These are 3 cleanups and fixes based on your spi/merge branch. I hope this
> is not too later for the 3.4-rc cycle.

You told me you applied these patches, where can I find them applied and pushed 
out? They do not seem to show up in your spi/merge nor spi/next branches at 
git.secretlab.ca

Thanks!

> 
> Florian Fainelli (3):
>   spi/bcm63xx: remove driver version
>   spi/bcm63xx: add missing spi_master_{resume,suspend} calls to PM
>     callbacks
>   spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()
> 
>  drivers/spi/spi-bcm63xx.c |   16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> 
-- 
Florian

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-27 22:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 17:05 [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix Florian Fainelli
     [not found] ` <1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2012-05-21 17:05   ` [PATCH 1/3] spi/bcm63xx: remove driver version Florian Fainelli
     [not found]     ` <1337619960-9672-2-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2012-05-25 22:59       ` Grant Likely
2012-05-21 17:05   ` [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks Florian Fainelli
     [not found]     ` <1337619960-9672-3-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2012-05-25 23:00       ` Grant Likely
2012-05-21 17:06   ` [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer() Florian Fainelli
     [not found]     ` <1337619960-9672-4-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2012-05-25 23:00       ` Grant Likely
2012-06-27 22:26   ` [PATCH 0/3] spi/bcm63xx: drivers cleanups and fix Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).