Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753270AbdI0P4o (ORCPT ); Wed, 27 Sep 2017 11:56:44 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:48261 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407AbdI0P4m (ORCPT ); Wed, 27 Sep 2017 11:56:42 -0400 X-Google-Smtp-Source: AOwi7QB8G20szmvJSBM0D/MvszGK5V59kNIZA2V2EuNfTxk0s9rJ4kaMRN3pppoX+3/hIKd0w+sYlw== Date: Wed, 27 Sep 2017 17:56:37 +0200 From: Daniel Lezcano To: Keerthy Cc: edubezval@gmail.com, leo.yan@linaro.org, Zhang Rui , "open list:THERMAL" , open list Subject: Re: [PATCH] thermal/drivers/hisi: Switch to interrupt mode Message-ID: <20170927155637.GC2196@mai> References: <1506470049-12597-1-git-send-email-daniel.lezcano@linaro.org> <1bfd974e-3dc1-e99b-d0dd-50102cee762d@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1bfd974e-3dc1-e99b-d0dd-50102cee762d@ti.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 46 On Wed, Sep 27, 2017 at 01:56:20PM +0530, Keerthy wrote: > > > On Wednesday 27 September 2017 05:24 AM, Daniel Lezcano wrote: > > At this moment, we have both the interrupt setup and the polling enabled. The > > interrupt does nothing more than forcing an update while the temperature is > > polled every second. > > > > We can do much better than that, threshold is set to 65C in the DT and the > > passive ooling device enters in the dance when 75C is reached. We need to > > /s/ooling/cooling > > > sample the temperature at 65C in order to let the IPA gather enough values for > > the PID computation. If the SoC is running at a temperature below 65C, we will > > be constantly polling for nothing. > > > > This patch disables the sensor when the temperature is below the temperature > > temperature below 65C you mean? Yeah ... :/ > > and enables it when passing the threshold. It resuls the sensor thermal sensor > > /s/resuls/results > > > driver will have no activity most of the time. > > By chance you miss the interrupt you will never have cooling on again? Mmh, I'm not sure it is possible to miss an interrupt with this driver but if it is the case, there are different scenario. - The temperature is increasing and reaches the reset value: then the board reboots - The temperature increases above 65C and then decreases, and increases again, the interrupt will fire and the driver will work as expected Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog