From patchwork Tue Aug 22 08:04:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 9914421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5CD96603F9 for ; Tue, 22 Aug 2017 08:04:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CD8E287EC for ; Tue, 22 Aug 2017 08:04:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6172628815; Tue, 22 Aug 2017 08:04:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05099287EC for ; Tue, 22 Aug 2017 08:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932172AbdHVIEk (ORCPT ); Tue, 22 Aug 2017 04:04:40 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:35719 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932165AbdHVIEg (ORCPT ); Tue, 22 Aug 2017 04:04:36 -0400 Received: by mail-wr0-f178.google.com with SMTP id k46so43330555wre.2 for ; Tue, 22 Aug 2017 01:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qThkA+IbkkZiu/YMDl1aOR3FD6E3SK7fluoFYlM3+9I=; b=dBUHljHao1fRq243wZxXwSKs9NIxezjU/ABkUpxVqN8f6ebFcZI+nqzGISPX0kULvF w8z8vESbEed1aj7JfnyYbnCUyvuX3hDKGfiERM4BQLEQpFQp3D/GuSsHJm8URhiRrZRA XESs09bt4209DJ5z5RqgsgAULxyE0XmpX3/A8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qThkA+IbkkZiu/YMDl1aOR3FD6E3SK7fluoFYlM3+9I=; b=b3z8UeahHPNIOiFz3Qdxpy+KVPpzRHuHv2LUtVaoUZqcHVKeEtA2KfsLXzYtReBd6w 8bvZ8ai/T9FKnVIHr61ZiGfhfYn5J87T3FYgR9T+tK9fd3IqhUZCo9wHGF8eYeMNN1iy pjuwaCZhhAvXfl7zLp3a4q/H4OZNe2gAOEGVtzeo16Bp6xncsLYuJIVWTg5HAvf+FUk1 zJJftasNlcQVopzcfNOh9z1QfZ3+EdpVLjniVMsYoV4dhqowTfO4XgA0/PjukQtUEYu5 7miT+YKU4VmJrbwrP6ROsyej5uNyjxToinhqMly7f6bi4h38R5Law/ALZ4VsawxPAtLM +UMA== X-Gm-Message-State: AHYfb5hacvvCKT/2L3j0UBtH5nYJCF0SkzmGDvsXO3dTmShTMAqAOlZZ R+nRRHHOBmmZLFMQ X-Received: by 10.80.215.138 with SMTP id w10mr8944738edi.240.1503389075305; Tue, 22 Aug 2017 01:04:35 -0700 (PDT) Received: from leoy-ThinkPad-T440 (li524-22.members.linode.com. [176.58.122.22]) by smtp.gmail.com with ESMTPSA id b26sm7860295edb.68.2017.08.22.01.04.32 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 22 Aug 2017 01:04:34 -0700 (PDT) Date: Tue, 22 Aug 2017 16:04:27 +0800 From: Leo Yan To: Daniel Lezcano Cc: Zhang Rui , edubezval@gmail.com, "open list:THERMAL" , open list , kong.kongxinwei@hisilicon.com Subject: Re: [PATCH] thermal/drivers/hisi: Remove confusing error message Message-ID: <20170822080427.GB13910@leoy-ThinkPad-T440> References: <1499439833-32531-1-git-send-email-daniel.lezcano@linaro.org> <1502178956.4296.7.camel@intel.com> <46604862-fbb8-8ed1-8b0d-7a51543b3398@linaro.org> <1502196531.4296.41.camel@intel.com> <20170808132955.GB32732@leoy-ThinkPad-T440> <8f58bd6d-0561-7383-6be4-04ee3704099a@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8f58bd6d-0561-7383-6be4-04ee3704099a@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Daniel, On Mon, Aug 21, 2017 at 12:06:17PM +0200, Daniel Lezcano wrote: [...] > Hi Leo, > > a cleanest solution would be either: > > - add the 3 missing thermal sensors in the DT and default to the id 2 Yeah, so do you think below change works for you? ---8<--- ARM64: dts: hisilicon: add missed thermal sensors for Hi6220 The thermal driver tries to register four sensors but the DT only binds one sensor (sensor ID 2) with thermal zone, as result the thermal driver reports failure for missed thermal sensor binding. This patch adds missed thermal sensor for Hi6220, so can dismiss the booting failure log. > or > > - remove all the code assuming 4 sensors and deal with the one unique > sensor I personally prefer to avoid doing this, if only register one unique sensor this will let us have no flexiblity for trying multiple sensors on this platform. [...] Thanks, Leo Yan diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index eacbe0d..44c2bc7 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -833,6 +833,18 @@ thermal-zones { + local: local { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&tsensor 0>; + }; + + cls1: cls1 { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&tsensor 1>; + }; + cls0: cls0 { polling-delay = <1000>; polling-delay-passive = <100>; @@ -862,6 +874,12 @@ }; }; }; + + gpu: gpu { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&tsensor 3>; + }; };