Merge "power: reset: msm: add support to select both dumps"
This commit is contained in:
commit
821524723a
1 changed files with 13 additions and 4 deletions
|
@ -47,7 +47,7 @@
|
||||||
#define SCM_EDLOAD_MODE 0X01
|
#define SCM_EDLOAD_MODE 0X01
|
||||||
#define SCM_DLOAD_CMD 0x10
|
#define SCM_DLOAD_CMD 0x10
|
||||||
#define SCM_DLOAD_MINIDUMP 0X20
|
#define SCM_DLOAD_MINIDUMP 0X20
|
||||||
|
#define SCM_DLOAD_BOTHDUMPS (SCM_DLOAD_MINIDUMP | SCM_DLOAD_FULLDUMP)
|
||||||
|
|
||||||
static int restart_mode;
|
static int restart_mode;
|
||||||
static void *restart_reason;
|
static void *restart_reason;
|
||||||
|
@ -488,7 +488,8 @@ static ssize_t show_dload_mode(struct kobject *kobj, struct attribute *attr,
|
||||||
char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
return scnprintf(buf, PAGE_SIZE, "DLOAD dump type: %s\n",
|
return scnprintf(buf, PAGE_SIZE, "DLOAD dump type: %s\n",
|
||||||
(dload_type == SCM_DLOAD_MINIDUMP) ? "mini" : "full");
|
(dload_type == SCM_DLOAD_BOTHDUMPS) ? "both" :
|
||||||
|
((dload_type == SCM_DLOAD_MINIDUMP) ? "mini" : "full"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t store_dload_mode(struct kobject *kobj, struct attribute *attr,
|
static size_t store_dload_mode(struct kobject *kobj, struct attribute *attr,
|
||||||
|
@ -502,8 +503,16 @@ static size_t store_dload_mode(struct kobject *kobj, struct attribute *attr,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
dload_type = SCM_DLOAD_MINIDUMP;
|
dload_type = SCM_DLOAD_MINIDUMP;
|
||||||
} else {
|
} else if (sysfs_streq(buf, "both")) {
|
||||||
pr_err("Invalid value. Use 'full' or 'mini'\n");
|
if (!minidump_enabled) {
|
||||||
|
pr_err("Minidump not enabled, setting fulldump only\n");
|
||||||
|
dload_type = SCM_DLOAD_FULLDUMP;
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
dload_type = SCM_DLOAD_BOTHDUMPS;
|
||||||
|
} else{
|
||||||
|
pr_err("Invalid Dump setup request..\n");
|
||||||
|
pr_err("Supported dumps:'full', 'mini', or 'both'\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue