aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_s3c24xx.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-26 02:22:50 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-26 02:22:50 -0500
commit7fbb8759eff9a348efa5f352ffaa51c364837c4b (patch)
treed40cd3f47b9f667ba94d9613270132080dcb6a1a /drivers/spi/spi_s3c24xx.c
parent6003ab0bad4cc56f3c4fadf62a0d23a967b9c53b (diff)
parent13d428afc007fcfcd6deeb215618f54cf9c0cae6 (diff)
Merge commit 'v2.6.28-rc6' into core/debug
Diffstat (limited to 'drivers/spi/spi_s3c24xx.c')
-rw-r--r--drivers/spi/spi_s3c24xx.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 98abc73c1a1d..c252cbac00f1 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -247,6 +247,9 @@ static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw)
247 writeb(0xff, hw->regs + S3C2410_SPPRE); 247 writeb(0xff, hw->regs + S3C2410_SPPRE);
248 writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN); 248 writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN);
249 writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON); 249 writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON);
250
251 if (hw->pdata && hw->pdata->gpio_setup)
252 hw->pdata->gpio_setup(hw->pdata, 1);
250} 253}
251 254
252static int __init s3c24xx_spi_probe(struct platform_device *pdev) 255static int __init s3c24xx_spi_probe(struct platform_device *pdev)
@@ -412,6 +415,9 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
412{ 415{
413 struct s3c24xx_spi *hw = platform_get_drvdata(pdev); 416 struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
414 417
418 if (hw->pdata && hw->pdata->gpio_setup)
419 hw->pdata->gpio_setup(hw->pdata, 0);
420
415 clk_disable(hw->clk); 421 clk_disable(hw->clk);
416 return 0; 422 return 0;
417} 423}
@@ -430,7 +436,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
430#endif 436#endif
431 437
432MODULE_ALIAS("platform:s3c2410-spi"); 438MODULE_ALIAS("platform:s3c2410-spi");
433static struct platform_driver s3c24xx_spidrv = { 439static struct platform_driver s3c24xx_spi_driver = {
434 .remove = __exit_p(s3c24xx_spi_remove), 440 .remove = __exit_p(s3c24xx_spi_remove),
435 .suspend = s3c24xx_spi_suspend, 441 .suspend = s3c24xx_spi_suspend,
436 .resume = s3c24xx_spi_resume, 442 .resume = s3c24xx_spi_resume,
@@ -442,12 +448,12 @@ static struct platform_driver s3c24xx_spidrv = {
442 448
443static int __init s3c24xx_spi_init(void) 449static int __init s3c24xx_spi_init(void)
444{ 450{
445 return platform_driver_probe(&s3c24xx_spidrv, s3c24xx_spi_probe); 451 return platform_driver_probe(&s3c24xx_spi_driver, s3c24xx_spi_probe);
446} 452}
447 453
448static void __exit s3c24xx_spi_exit(void) 454static void __exit s3c24xx_spi_exit(void)
449{ 455{
450 platform_driver_unregister(&s3c24xx_spidrv); 456 platform_driver_unregister(&s3c24xx_spi_driver);
451} 457}
452 458
453module_init(s3c24xx_spi_init); 459module_init(s3c24xx_spi_init);