Skip to contentSkip to conversation

spi_s3c24xx_gpio: Introduce csid parameter to chip_select callback

PATCH New Balaji Rao 1 participant 1 message Feb 28, 2009

Subsystems (4)
lore
Share & tools
lore

Balaji Rao

author
#0 lore raw

PATCH 1/1 spi_s3c24xx_gpio: Introduce csid parameter to chip_select callback

In a multiple slave configuration, it is required to know which chip_select to assert.

---
 arch/arm/mach-s3c2410/include/mach/spi-gpio.h |    2 +-
 drivers/spi/spi_s3c24xx_gpio.c                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-s3c2410/include/mach/spi-gpio.h +1 -1
index 980a099..8189768 100644
@@ -21,7 +21,7 @@ struct s3c2410_spigpio_info {
 	int			 num_chipselect;
 	int			 bus_num;
 
-	void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
+	void (*chip_select)(struct s3c2410_spigpio_info *spi, int csid, int cs);
 };
 
 
drivers/spi/spi_s3c24xx_gpio.c +1 -1
index f2447a5..006e7e7 100644
@@ -91,7 +91,7 @@ static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value)
 	struct s3c2410_spigpio *sg = spidev_to_sg(dev);
 
 	if (sg->info && sg->info->chip_select)
-		(sg->info->chip_select)(sg->info, value);
+		(sg->info->chip_select)(sg->info, dev->chip_select, value);
 }
 
 static int s3c2410_spigpio_probe(struct platform_device *dev)