From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wangtao (Kevin, Kirin)" Subject: Re: [PATCH V2] thermal/drivers/hisi: Switch to interrupt mode Date: Wed, 11 Oct 2017 09:54:28 +0800 Message-ID: References: <1bfd974e-3dc1-e99b-d0dd-50102cee762d@ti.com> <1506575625-20388-1-git-send-email-daniel.lezcano@linaro.org> <4ce2e445-d846-e032-5677-36dcbce7bed4@arm.com> <313949ce-e0d6-da66-7809-a963f704f75f@linaro.org> <464262af-206d-b8b8-2971-d894586d7edd@linaro.org> <89c960b0-404e-5a87-3c03-845ea36615cf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from szxga04-in.huawei.com ([45.249.212.190]:7963 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212AbdJKByo (ORCPT ); Tue, 10 Oct 2017 21:54:44 -0400 In-Reply-To: <89c960b0-404e-5a87-3c03-845ea36615cf@linaro.org> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Daniel Lezcano , Valentin Schneider , linux-pm@vger.kernel.org, ionela.voinescu@arm.com, Leo Yan , Kevin Wangtao On 2017/10/11 1:28, Daniel Lezcano wrote: > On 10/10/2017 19:19, Valentin Schneider wrote: >> >> >> On 10/10/2017 06:13 PM, Daniel Lezcano wrote: >>> On 10/10/2017 19:01, Valentin Schneider wrote: >>>> On 10/10/2017 05:51 PM, Daniel Lezcano wrote: >>>>> Ok, so apparently there are multiple alarms level in the driver for the >>>>> hikey960 [1]. So I prefer to drop this patch for now and take the >>>>> hikey960 thermal support first and we can sort out the issue later. >>>>> >>>>> For my information, can you show me the DT snippet you have for the >>>>> thermal zones? >>>> Sure thing: >>>> >>>> thermal-zones { >>>> >>>> cls0: cls0 { >>>> polling-delay = <1000>; >>>> polling-delay-passive = <100>; >>>> sustainable-power = <4500>; >>>> >>>> /* sensor ID */ >>>> thermal-sensors = <&tsensor 1>; >>>> >>>> trips { >>>> threshold: trip-point@0 { >>>> temperature = <65000>; >>>> hysteresis = <1000>; >>>> type = "passive"; >>>> }; >>>> >>>> target: trip-point@1 { >>>> temperature = <75000>; >>>> hysteresis = <1000>; >>>> type = "passive"; >>>> }; >>>> }; >>> That's strange, regarding your traces: >>> >>> " >>> [ 118.107357] hisi_thermal fff30000.tsensor: THERMAL ALARM: 70495 > >>> 65000 >>> [ 119.182531] hisi_thermal fff30000.tsensor: THERMAL ALARM: 76235 > >>> 65000 >>> [ 119.361964] hisi_thermal fff30000.tsensor: THERMAL ALARM: 70495 > >>> 65000 >>> [ 119.907865] hisi_thermal fff30000.tsensor: THERMAL ALARM: 75620 > >>> 65000 >>> [ 119.959076] hisi_thermal fff30000.tsensor: THERMAL ALARM: 70700 > >>> 65000 >>> " >>> >>> I was expecting to see more trip points. Did you test the driver with a >>> 70000 trip point? >> >> No, I didn't change any setting other than the tsensor index to make >> things work. Mind you, in Kevin's patch series the thermal alarm is >> setup with a 4 degrees "lag", i.e. alarms will only be re-triggered if >> temperature increases/decreases of at least 4 degrees (which explains >> the traces). This should be a trip point 75000, cross 75000 triger an interrupt and drop below 71000 triger another interrupt, the multi alarm interrupt is not suitable for ipa as you discussed before, we should drop the patch of multi alarm support. > > Mmh, the behavior regarding the interrupt is slightly different with the > hi960, perhaps a bit fuzzy regarding how it is handled now. Anyway, we > can live with that now and go further to fix that later, the result is > the same. > >