On Mon, Nov 28, 2016 at 07:12:02PM +0800, Caesar Wang wrote: > The temp_to_code function will return 0 when we set the temperature to a > invalid value (e.g. 61C, 62C, 63C....), that's unpractical. This patch > will prevent this case happening. That will return the max analog value to > indicate the temperature is invalid or over table temperature range. > > Signed-off-by: Caesar Wang <wxt at rock-chips.com> > --- > > Changes in v3: > - fix trivial thing for error message nd return value. > > Changes in v2: > - As Brian commnets that restructure this to pass error codes back to the > upper layers. > - Improve the commit message. > > Changes in v1: None > > drivers/thermal/rockchip_thermal.c | 48 ++++++++++++++++++++++---------------- > 1 file changed, 28 insertions(+), 20 deletions(-) Looks better now. Reviewed-by: Brian Norris <briannorris at chromium.org>