Revert "Revert "MALI: midgard: support sharing regulator with other devices""
[firefly-linux-kernel-4.4.55.git] / drivers / power / bq27510_battery.c
index 331d68d4568b260420d5b9a3a567b5447d75c373..e53beee6efd465bf547fa2014fb3418642c8f29e 100755 (executable)
@@ -91,7 +91,7 @@ static enum power_supply_property rk29_ac_props[] = {
 };
 
 static ssize_t battery_proc_write(struct file *file,const char __user *buffer,
-                        unsigned long count,void *data)
+                        size_t count, loff_t *ppos)
 {
        char c;
        int rc;
@@ -102,6 +102,12 @@ static ssize_t battery_proc_write(struct file *file,const char __user *buffer,
        rc = get_user(c,buffer);
        if(rc)
                return rc;
+       
+       //added by zwp,c='8' means check whether we need to download firmware to bq27xxx,return 0 means yes.
+       if(c == '8'){
+               printk("%s,bq27510 need to download firmware\n",__FUNCTION__);
+       }
+       
        if(c == '1')
                virtual_battery_enable = 1;
        else if(c == '2')