thermal: rockchip: fixes invalid temperature case
authorCaesar Wang <wxt@rock-chips.com>
Mon, 12 Dec 2016 11:05:33 +0000 (19:05 +0800)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 14 Dec 2016 04:32:03 +0000 (20:32 -0800)
commitd3530497f5c33530c50acb435b7d54e0a82d8032
treef3729d4381986fcfd3fd14528f780e105fb7d4cc
parentcdd8b3f7b779e39bda1a8057f287da065216720b
thermal: rockchip: fixes invalid temperature case

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@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rockchip_thermal.c