Skip to contentSkip to conversation

spi_s3c24xx: really assign busnum

PATCH In review David Brownell 3 participants 4 messages Jul 27, 2008 – Jul 28, 2008 2 messages not in the archive

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

PATCH 1/1 spi_s3c24xx: really assign busnum

From: Ben Dooks <[email protected]>

The original "Pass the bus number we expect the S3C24XX SPI driver to attach to via the platform data." [1] patch was mis-sent, and missed two important parts of the diff, which was to actually set the bus_num field and add the relevant field to the platform data.

[1] git commit 50f426b55d919dd017af35bb6a08753d1f262920

---
 drivers/spi/spi_s3c24xx.c          |    1 +
 include/asm-arm/arch-s3c2410/spi.h |    1 +
 2 files changed, 2 insertions(+)
drivers/spi/spi_s3c24xx.c +1 -0
@@ -270,6 +270,7 @@ static int __init s3c24xx_spi_probe(stru
 	/* setup the master state. */
 
 	master->num_chipselect = hw->pdata->num_cs;
+	master->bus_num = pdata->bus_num;
 
 	/* setup the state for the bitbang driver */
 
include/asm-arm/arch-s3c2410/spi.h +1 -0
@@ -16,6 +16,7 @@
 struct s3c2410_spi_info {
 	unsigned long		 pin_cs;	/* simple gpio cs */
 	unsigned int		 num_cs;	/* total chipselects */
+	int			 bus_num;       /* bus number to use. */
 
 	void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · On Sun, 27 Jul 2008 15:40:04 -0700 David Brownell…

From: Ben Dooks <[email protected]>

The original "Pass the bus number we expect the S3C24XX SPI driver to attach to via the platform data." [1] patch was mis-sent, and missed two important parts of the diff, which was to actually set the bus_num field and add the relevant field to the platform data.

um, OK. I'd consider that changelog to be partial, because it doesn't describe the consequences of the bug.

It means that people who are scratching their heads over whether this should be in 2.6.26.x don't have enough info to go on.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

#4 lore raw
In reply to a message not in the archive
Quoted 4 lines · Andrew Morton
Quoted 2 lines · On Sun, 27 Jul 2008 15:40:04 -0700 David Brownell…

From: Ben Dooks <[email protected]>

Quoted 8 lines
Quoted 5 lines

The original "Pass the bus number we expect the S3C24XX SPI driver to attach to via the platform data." [1] patch was mis-sent, and missed two important parts of the diff, which was to actually set the bus_num field and add the relevant field to the platform data.

um, OK. I'd consider that changelog to be partial, because it doesn't describe the consequences of the bug.

Consequences: only bus number zero will ever be used by that SPI controller.

Quoted 2 lines

It means that people who are scratching their heads over whether this should be in 2.6.26.x don't have enough info to go on.

I'd let Ben suggest that one. This unfortunately sat in my queue for a while before I noticed it... else it could have made 2.6.26-final.

- Dave

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

#5 lore raw
In reply to a message not in the archive
Quoted 4 lines · Andrew Morton
Quoted 2 lines · On Sun, 27 Jul 2008 15:40:04 -0700 David Brownell…

From: Ben Dooks <[email protected]>

Quoted 8 lines
Quoted 5 lines

The original "Pass the bus number we expect the S3C24XX SPI driver to attach to via the platform data." [1] patch was mis-sent, and missed two important parts of the diff, which was to actually set the bus_num field and add the relevant field to the platform data.

um, OK. I'd consider that changelog to be partial, because it doesn't describe the consequences of the bug.

It does reference the original patch which describes the original itent of the change which unfortunately got broken when bringing forward to submission.

Quoted 2 lines

It means that people who are scratching their heads over whether this should be in 2.6.26.x don't have enough info to go on.

The only extra I can think of adding is:

The previous commit 50f426b55d919dd017af35bb6a08753d1f262920 promised to add a bus_num field, but failed to include the two hunks that added this field to include/asm-arm/arch-s3c2410/spi.h and then pass it to the spi core when creating the new master field in drivers/spi/spi_s3c24xx.c.

This should fix any confusion when looking for the non-existant bus_num field.

Signature · 11 lines
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/