rk3288:keep camera pwen high alwaysly to avoid leakage of lcdc electricity
authorzyh <zyh@rock-chips.com>
Thu, 17 Apr 2014 10:16:21 +0000 (18:16 +0800)
committerzyh <zyh@rock-chips.com>
Thu, 17 Apr 2014 10:16:21 +0000 (18:16 +0800)
drivers/media/video/rk_camsys/camsys_internal.h

index e652aec383e63ea92a53dfd82c9939975b197ecd..2e5a577cf181fd63ebfe7b3fee668dd6812d1987 100755 (executable)
@@ -290,9 +290,13 @@ static inline int camsys_sysctl_extdev(camsys_extdev_t *extdev, camsys_sysctrl_t
                 gpio_set_value(gpio->io, gpio->active);
                 camsys_trace(1,"Sysctl %d success, gpio(%d) set %d",devctl->ops, gpio->io, gpio->active);
             } else {
-                gpio_direction_output(gpio->io, !gpio->active);
-                gpio_set_value(gpio->io, !gpio->active);
-                camsys_trace(1,"Sysctl %d success, gpio(%d) set %d",devctl->ops, gpio->io, !gpio->active);
+               if(CamSys_PwrEn != devctl->ops){
+                       gpio_direction_output(gpio->io, !gpio->active);
+                       gpio_set_value(gpio->io, !gpio->active);
+                       camsys_trace(1,"Sysctl %d success, gpio(%d) set %d",devctl->ops, gpio->io, !gpio->active);
+                       }else{
+                       camsys_trace(1,"don't poweroff CamSys_PwrEn now \n");
+                       }
             }
         } else {
             camsys_err("Sysctl %d failed, because gpio is NULL!",devctl->ops);