From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Valentin Subject: Re: [PATCHv5 5/5] thermal: rcar_gen3_thermal: Add delay in .thermal_init on r8a7795 Date: Mon, 12 Dec 2016 19:31:26 -0800 Message-ID: <20161213033125.GA11329@localhost.localdomain> References: <20161212141805.14946-1-niklas.soderlund@ragnatech.se> <20161212141805.14946-6-niklas.soderlund@ragnatech.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20161212141805.14946-6-niklas.soderlund@ragnatech.se> Sender: linux-renesas-soc-owner@vger.kernel.org To: Niklas =?iso-8859-1?Q?S=F6derlund?= Cc: linux-pm@vger.kernel.org, Wolfram Sang , Khiem Nguyen , Kuninori Morimoto , linux-renesas-soc@vger.kernel.org, Zhang Rui , Geert Uytterhoeven , Niklas =?iso-8859-1?Q?S=F6derlund?= List-Id: linux-pm@vger.kernel.org On Mon, Dec 12, 2016 at 03:18:05PM +0100, Niklas Söderlund wrote: > From: Niklas Söderlund > > The .thermal_init needs to be delayed a short amount of time after > setting REG_GEN3_CTSR 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. I think this one can be folded on patch 2/5.