Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114791
b: refs/heads/master
c: cf46b97
h: refs/heads/master
i:
  114789: c9a3b53
  114787: e26b5c6
  114783: dff4718
v: v3
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Oct 16, 2008
1 parent 66a4f94 commit 1174212
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9b90e39cbc5c4d6ef60022fd1f25d541df0aad1
refs/heads/master: cf46b973f72ddf9d1e17d6fde9aa14f61aa1afed
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-s3c2410/include/mach/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct s3c2410_spi_info {
unsigned int num_cs; /* total chipselects */
int bus_num; /* bus number to use. */

void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
};

Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/spi/spi_s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw)
writeb(0xff, hw->regs + S3C2410_SPPRE);
writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);

if (hw->pdata && hw->pdata->gpio_setup)
hw->pdata->gpio_setup(hw->pdata, 1);
}

static int __init s3c24xx_spi_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -412,6 +415,9 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
{
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);

if (hw->pdata && hw->pdata->gpio_setup)
hw->pdata->gpio_setup(hw->pdata, 0);

clk_disable(hw->clk);
return 0;
}
Expand Down

0 comments on commit 1174212

Please sign in to comment.