Merge "drivers: thermal: Change parameters in thermal zone configuration"

This commit is contained in:
qctecmdr 2020-07-14 12:50:29 -07:00 • committed by Gerrit - the friendly Code Review server
commit 2f9b2b4199
2 changed files with 8 additions and 8 deletions

View file

@ -156,7 +156,7 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr,
if (!trip_buf_end)
return -EINVAL;
temp_buf = strnstr(buf, "trip_threshold", count);
temp_buf = strnstr(buf, "set_temp", count);
if (!temp_buf)
goto eval_device;
if (!tz->ops->set_trip_temp)
@ -166,7 +166,7 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr,
if (!temp_buf_end)
return -EINVAL;
hyst_buf = strnstr(buf, "trip_threshold_clr", count);
hyst_buf = strnstr(buf, "clr_temp", count);
if (hyst_buf) {
if (!tz->ops->set_trip_hyst)
return -EPERM;
@ -257,7 +257,7 @@ static int parse_delay(struct thermal_zone_device *tz, char *buf,
return -EINVAL;
tz->polling_delay = delay;
} else {
if (sscanf(buf, "passive_polling_delay %d", &delay) != 1)
if (sscanf(buf, "passive_delay %d", &delay) != 1)
return -EINVAL;
tz->passive_delay = delay;
}
@ -303,7 +303,7 @@ static int parse_config(struct thermal_zone_device *tz, char *buf_ptr,
count = next_buf - curr_buf;
else
count = buf_end - curr_buf + 1;
if (strnstr(curr_buf, "passive_polling_delay", count))
if (strnstr(curr_buf, "passive_delay", count))
ret = parse_delay(tz, curr_buf, count, false);
else if (strnstr(curr_buf, "polling_delay", count))
ret = parse_delay(tz, curr_buf, count, true);

View file

@ -56,12 +56,12 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf)
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "sensor %s\n",
tz->type);
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "policy %s\n",
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "algo_type %s\n",
tz->governor->name);
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
"polling_delay %d\n", tz->polling_delay);
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
"passive_polling_delay %d\n",
"passive_delay %d\n",
tz->passive_delay);
if (!tz->trips || !tz->ops->get_trip_temp)
return offset;
@ -98,10 +98,10 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf)
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
"trip %s\n", buf_trip);
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
"trip_threshold %s\n", buf_temp);
"set_temp %s\n", buf_temp);
if (buf2_offset)
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
"trip_threshold_clr %s\n", buf_hyst);
"clr_temp %s\n", buf_hyst);
buf_size = 0;
buf_offset = 0;