Thread (20 messages) 20 messages, 4 authors, 2016-12-12

Re: [PATCH v3 3/5] thermal: rockchip: fixes invalid temperature case

From: Brian Norris <briannorris@chromium.org>
Date: 2016-11-28 18:48:03
Also in: linux-rockchip, lkml

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 <redacted>
---

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@chromium.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help