Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491848
| From | Lukasz Luba <lukasz.luba@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] of: thermal: Fixed governor at each thermal zone |
| Date | 2016-09-27 14:00 +0200 |
| Message-ID | <slZdf-D0-1@gated-at.bofh.it> (permalink) |
| References | <siVzb-7iW-1@gated-at.bofh.it> <slPGV-37J-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 27/09/16 02:46, Zhang Rui wrote: > On 一, 2016-09-19 at 10:18 +0900, Inhyuk Kang wrote: >> It is necessary to be added governor at each thermal_zone. >> Because some governors should be operated in the during the kernel >> booting >> in order to avoid heating problem. >> >> Default governor cannot be covered all thermal zones policy because >> some thermal zones want to apply different one. >> For example, the power allocator governor operates differently with >> step wise governor. >> Hence, it is better to parse governor parameter from the device tree. >> >> Signed-off-by: Inhyuk Kang <hugh.kang@lge.com> >> > The patch looks okay to me. > Eduardo, what do you think of this patch? Hi Rui, Beside the fact which Javi pointed out in his email, there is an issue in the patch itself. The idea behind the patch is good, but the patch should have some improvements, i.e: - strncpy instead of strcpy, - if the governor name is not found in the registered governor's list by __find_governor (and then null is set) we should probably switch to default governor, - add DT documentation, Regards, Lukasz > > thanks, > rui >> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of- >> thermal.c >> index b8e509c..382c440 100644 >> --- a/drivers/thermal/of-thermal.c >> +++ b/drivers/thermal/of-thermal.c >> @@ -970,6 +970,7 @@ int __init of_parse_thermal_zones(void) >> struct thermal_zone_device *zone; >> struct thermal_zone_params *tzp; >> int i, mask = 0; >> + const char *governor; >> u32 prop; >> >> tz = thermal_of_build_thermal_zone(child); >> @@ -996,6 +997,9 @@ int __init of_parse_thermal_zones(void) >> if (!of_property_read_u32(child, "sustainable- >> power", &prop)) >> tzp->sustainable_power = prop; >> >> + if (!of_property_read_string(child, "governor-name", >> &governor)) >> + strcpy(tzp->governor_name, governor); >> + >> for (i = 0; i < tz->ntrips; i++) >> mask |= 1 << i; >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] of: thermal: Fixed governor at each thermal zone Zhang Rui <rui.zhang@intel.com> - 2016-09-27 03:50 +0200
Re: [PATCH] of: thermal: Fixed governor at each thermal zone Javi Merino <javi.merino@arm.com> - 2016-09-27 13:30 +0200
Re: [PATCH] of: thermal: Fixed governor at each thermal zone Lukasz Luba <lukasz.luba@arm.com> - 2016-09-27 14:00 +0200
Re: [PATCH] of: thermal: Fixed governor at each thermal zone Eduardo Valentin <edubezval@gmail.com> - 2016-09-27 15:30 +0200
Re: [PATCH] of: thermal: Fixed governor at each thermal zone Zhang Rui <rui.zhang@intel.com> - 2016-09-28 03:40 +0200
RE: [PATCH] of: thermal: Fixed governor at each thermal zone 강인혁/책임연구원/SW Platform(연)AOT팀(hugh.kang@lge.com) <hugh.kang@lge.com> - 2016-09-28 09:20 +0200
csiph-web