Skip to contentSkip to conversation

spi/bcm63xx: drivers cleanups and fix

PATCH Applied Florian Fainelli 2 participants 8 messages May 21, 2012 – Jun 27, 2012 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover spi/bcm63xx: drivers cleanups and fix

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(-)
Signature · 9 lines
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/

A message that is not in the archive (sent off-list or not yet received): 1337619960-9672-1-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org

#2 lore raw

PATCH 1/3 spi/bcm63xx: remove driver version

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

---
 drivers/spi/spi-bcm63xx.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-bcm63xx.c +2 -3
index 7491971..478eddc 100644
@@ -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;
 
Signature · 9 lines
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/

A message that is not in the archive (sent off-list or not yet received): 1337619960-9672-2-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org

Applied
#4 lore raw

Re: [PATCH 1/3] spi/bcm63xx: remove driver version

Quoted 5 lines · Florian Fainelli

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

Applied, thanks.

g.

Quoted 30 lines
---
 drivers/spi/spi-bcm63xx.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-bcm63xx.c +2 -3
index 7491971..478eddc 100644
@@ -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;
 
Signature · 1 line
1.7.9.5
Signature · 9 lines
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/
#5 lore raw

PATCH 2/3 spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks

In reply to a message not in the archive

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

---
 drivers/spi/spi-bcm63xx.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/spi/spi-bcm63xx.c +4 -0
index 478eddc..85b0361 100644
@@ -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;
 }
 
Signature · 9 lines
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/

A message that is not in the archive (sent off-list or not yet received): 1337619960-9672-3-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org

Applied
#7 lore raw

Re: [PATCH 2/3] spi/bcm63xx: add missing spi_master_{resume, suspend} calls to PM callbacks

Quoted 4 lines · Florian Fainelli

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

Applied, thanks.

g.

Quoted 29 lines
---
 drivers/spi/spi-bcm63xx.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/spi/spi-bcm63xx.c +4 -0
index 478eddc..85b0361 100644
@@ -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;
 }
 
Signature · 1 line
1.7.9.5
Signature · 9 lines
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/
#8 lore raw

PATCH 3/3 spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()

In reply to a message not in the archive

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.

---
 drivers/spi/spi-bcm63xx.c |    7 -------
 1 file changed, 7 deletions(-)
drivers/spi/spi-bcm63xx.c +0 -7
index 85b0361..1307833 100644
@@ -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);
 
Signature · 9 lines
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/

A message that is not in the archive (sent off-list or not yet received): 1337619960-9672-4-git-send-email-florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org

Applied
#10 lore raw

Re: [PATCH 3/3] spi/bcm63xx: remove useless call to bcm63xx_spi_check_transfer()

Quoted 5 lines · Florian Fainelli

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.

Applied, thanks.

g.

Quoted 25 lines
---
 drivers/spi/spi-bcm63xx.c |    7 -------
 1 file changed, 7 deletions(-)
drivers/spi/spi-bcm63xx.c +0 -7
index 85b0361..1307833 100644
@@ -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);
 
Signature · 1 line
1.7.9.5
Signature · 9 lines
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/
#11 lore raw
In reply to a message not in the archive

Hi Grant,

Quoted 4 lines · 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!

Quoted 11 lines

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(-)
Signature · 8 lines
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/