The patch titled
S3C24XX: ensure we only configure valid GPIOs
has been removed from the -mm tree. Its filename was
s3c24xx-ensure-we-only-configure-valid-gpios.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: S3C24XX: ensure we only configure valid GPIOs
From: Ben Dooks <[EMAIL PROTECTED]>
If we specify an GPIO which cannot be used for the purpose, then assume
that the GPIO is not to be used and do not try and configure it. This can
be the case where the SPI bus is TX only.
Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/spi/spi_s3c24xx_gpio.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff -puN
drivers/spi/spi_s3c24xx_gpio.c~s3c24xx-ensure-we-only-configure-valid-gpios
drivers/spi/spi_s3c24xx_gpio.c
---
a/drivers/spi/spi_s3c24xx_gpio.c~s3c24xx-ensure-we-only-configure-valid-gpios
+++ a/drivers/spi/spi_s3c24xx_gpio.c
@@ -96,6 +96,7 @@ static void s3c2410_spigpio_chipselect(s
static int s3c2410_spigpio_probe(struct platform_device *dev)
{
+ struct s3c2410_spigpio_info *info;
struct spi_master *master;
struct s3c2410_spigpio *sp;
int ret;
@@ -113,7 +114,7 @@ static int s3c2410_spigpio_probe(struct
platform_set_drvdata(dev, sp);
/* copy in the plkatform data */
- sp->info = dev->dev.platform_data;
+ info = sp->info = dev->dev.platform_data;
/* setup spi bitbang adaptor */
sp->bitbang.master = spi_master_get(master);
@@ -124,13 +125,18 @@ static int s3c2410_spigpio_probe(struct
sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2;
sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3;
- /* set state of spi pins */
- s3c2410_gpio_setpin(sp->info->pin_clk, 0);
- s3c2410_gpio_setpin(sp->info->pin_mosi, 0);
-
- s3c2410_gpio_cfgpin(sp->info->pin_clk, S3C2410_GPIO_OUTPUT);
- s3c2410_gpio_cfgpin(sp->info->pin_mosi, S3C2410_GPIO_OUTPUT);
- s3c2410_gpio_cfgpin(sp->info->pin_miso, S3C2410_GPIO_INPUT);
+ /* set state of spi pins, always assume that the clock is
+ * available, but do check the MOSI and MISO. */
+ s3c2410_gpio_setpin(info->pin_clk, 0);
+ s3c2410_gpio_cfgpin(info->pin_clk, S3C2410_GPIO_OUTPUT);
+
+ if (info->pin_mosi < S3C2410_GPH10) {
+ s3c2410_gpio_setpin(info->pin_mosi, 0);
+ s3c2410_gpio_cfgpin(info->pin_mosi, S3C2410_GPIO_OUTPUT);
+ }
+
+ if (info->pin_miso != S3C2410_GPA0 && info->pin_miso < S3C2410_GPH10)
+ s3c2410_gpio_cfgpin(info->pin_miso, S3C2410_GPIO_INPUT);
ret = spi_bitbang_start(&sp->bitbang);
if (ret)
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
git-mtd.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html