From fe5065ca0a3260b8bb7ff9ebb160a04a17a01454 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Mon, 13 Jul 2020 14:04:49 -0700 Subject: [PATCH] drivers: thermal: Change parameters in thermal zone configuration Change trip threshold, trip clear, passive polling delay and algorithm type parameter name in the thermal zone configuration output to set_temp, clr_temp, passive_delay and algo_type from trip_threshold, trip_threshold_clr, passive_polling_delay and policy. Change-Id: I5d531eaf0990202b7a0537e1d3a2ed3b145543ab Signed-off-by: Ram Chandrasekar --- drivers/thermal/thermal_debugfs.c | 8 ++++---- drivers/thermal/thermal_sysfs.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c index 30a040d7f489..de5123774c2e 100644 --- a/drivers/thermal/thermal_debugfs.c +++ b/drivers/thermal/thermal_debugfs.c @@ -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); diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 0efb21186a0b..b3b85aca479c 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -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;