Changeset 4133


Ignore:
Timestamp:
02/29/08 04:07:59 (5 years ago)
Author:
werner
Message:

fix-i2c.patch by Tim Niemeyer

fix-i2c-s3c2410-resume-race.patch:

  • drivers/i2c/busses/i2c-s3c2410.c (s3c2410_i2c_driver): add suspend callback also to 2410 driver
  • drivers/i2c/busses/i2c-s3c2410.c (s3c24xx_i2c_doxfer): print suspend count on rejection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch

    r4111 r4133  
    5353  
    5454        case STATE_START: 
    55 @@ -502,6 +512,12 @@ static int s3c24xx_i2c_doxfer(struct s3c 
     55@@ -502,6 +512,14 @@ static int s3c24xx_i2c_doxfer(struct s3c 
    5656        unsigned long timeout; 
    5757        int ret; 
    5858  
    5959+       if (i2c->suspended) { 
    60 +               dev_err(i2c->dev, "Hey I am still asleep, retry later\n"); 
     60+               dev_err(i2c->dev, 
     61+                   "Hey I am still asleep (suspended: %d), retry later\n", 
     62+                   i2c->suspended); 
    6163+               ret = -EAGAIN; 
    6264+               goto out; 
     
    6668        if (ret != 0) { 
    6769                dev_err(i2c->dev, "cannot get bus (error %d)\n", ret); 
    68 @@ -886,6 +902,17 @@ static int s3c24xx_i2c_remove(struct pla 
     70@@ -886,6 +904,17 @@ static int s3c24xx_i2c_remove(struct pla 
    6971 } 
    7072  
     
    8486 { 
    8587        struct s3c24xx_i2c *i2c = platform_get_drvdata(dev); 
    86 @@ -893,6 +920,8 @@ static int s3c24xx_i2c_resume(struct pla 
     88@@ -893,6 +922,8 @@ static int s3c24xx_i2c_resume(struct pla 
    8789        if (i2c != NULL) 
    8890                s3c24xx_i2c_init(i2c); 
     
    9395 } 
    9496  
    95 @@ -915,6 +944,7 @@ static struct platform_driver s3c2410_i2 
     97@@ -905,6 +936,7 @@ static int s3c24xx_i2c_resume(struct pla 
     98 static struct platform_driver s3c2410_i2c_driver = { 
     99        .probe          = s3c24xx_i2c_probe, 
     100        .remove         = s3c24xx_i2c_remove, 
     101+       .suspend        = s3c24xx_i2c_suspend, 
     102        .resume         = s3c24xx_i2c_resume, 
     103        .driver         = { 
     104                .owner  = THIS_MODULE, 
     105@@ -915,6 +947,7 @@ static struct platform_driver s3c2410_i2 
    96106 static struct platform_driver s3c2440_i2c_driver = { 
    97107        .probe          = s3c24xx_i2c_probe, 
Note: See TracChangeset for help on using the changeset viewer.