Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1302470
| From | Leo Yan <leo.yan@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/4] thermal: power_allocator: change k_pu_ratio/k_po_ratio as percentage |
| Date | 2016-01-06 09:40 +0100 |
| Message-ID | <qNRNp-763-27@gated-at.bofh.it> (permalink) |
| References | <qNRNo-763-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Change k_pu_ratio/k_po_ratio as percentage value, so can set these values from sys file nodes with high resolution. Signed-off-by: Leo Yan <leo.yan@linaro.org> --- drivers/thermal/power_allocator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index 76d2b47..c5f36fa 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -156,10 +156,10 @@ static void estimate_pid_constants(struct thermal_zone_device *tz, return; if (!tz->tzp->k_po_ratio || force) - tz->tzp->k_po_ratio = 1; + tz->tzp->k_po_ratio = 100; if (!tz->tzp->k_pu_ratio || force) - tz->tzp->k_pu_ratio = 2; + tz->tzp->k_pu_ratio = 200; if (!tz->tzp->k_i || force) tz->tzp->k_i = int_to_frac(10) / 1000; @@ -169,9 +169,9 @@ static void estimate_pid_constants(struct thermal_zone_device *tz, */ tz->tzp->k_po = int_to_frac(tz->tzp->k_po_ratio * sustainable_power) / - temperature_threshold; + temperature_threshold / 100; tz->tzp->k_pu = int_to_frac(tz->tzp->k_pu_ratio * sustainable_power) / - temperature_threshold; + temperature_threshold / 100; } /** -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/4] thermal: re-calculate k_po/k_pu when update sustainable power Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:40 +0100 [PATCH v2 2/4] thermal: power_allocator: change k_pu_ratio/k_po_ratio as percentage Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:40 +0100 [PATCH v2 1/4] thermal: power_allocator: rework proportional parameter Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:40 +0100 [PATCH v2 3/4] thermal: add sys node for k_pu_ratio/k_po_ratio Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:40 +0100 [PATCH v2 4/4] thermal: power_allocator: document k_pu_ratio/k_po_ratio Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:40 +0100 Re: [PATCH v2 0/4] thermal: re-calculate k_po/k_pu when update sustainable power Leo Yan <leo.yan@linaro.org> - 2016-01-06 09:50 +0100
csiph-web