From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH 1/7] thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796 Date: Tue, 7 Mar 2017 20:51:22 +0100 Message-ID: <20170307195122.GA2554@tetsubishi> References: <20170306200401.29923-1-niklas.soderlund+renesas@ragnatech.se> <20170306200401.29923-2-niklas.soderlund+renesas@ragnatech.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20170306200401.29923-2-niklas.soderlund+renesas@ragnatech.se> Sender: linux-renesas-soc-owner@vger.kernel.org To: Niklas =?utf-8?Q?S=C3=B6derlund?= Cc: linux-pm@vger.kernel.org, Wolfram Sang , linux-renesas-soc@vger.kernel.org, Zhang Rui , Eduardo Valentin List-Id: linux-pm@vger.kernel.org On Mon, Mar 06, 2017 at 09:03:55PM +0100, Niklas Söderlund wrote: > The .thermal_init needs to be delayed a short amount of to allow for the > TEMP register to contain something useful. If it's not delayed theses > warnings are common during boot: > > thermal thermal_zone0: failed to read out thermal zone (-5) > thermal thermal_zone1: failed to read out thermal zone (-5) > thermal thermal_zone2: failed to read out thermal zone (-5) > > The warnings are triggered by the first call to .get_temp while the TEMP > register contains 0 and rcar_gen3_thermal_get_temp() returns -EIO since > a TEMP value of 0 will result in a temperature reading which is out of > specifications. > > This should have been done in the initial commit which adds the driver > as the same issue was found and corrected for r8a7795. > > Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang