Re: [PATCH v3 4/5] thermal: rockchip: optimize the conversion table

2016-12-12 Thread Caesar Wang
在 2016年11月30日 14:29, Eduardo Valentin 写道: Hey, On Mon, Nov 28, 2016 at 07:12:03PM +0800, Caesar Wang wrote: + num = abs(table->id[mid].code - table->id[mid + 1].code); + num *= temp - table->id[mid].temp; + denom = table->id[mid + 1].temp - table->id[mid].temp; isn't the

Re: [PATCH v3 4/5] thermal: rockchip: optimize the conversion table

2016-11-29 Thread Eduardo Valentin
Hey, On Mon, Nov 28, 2016 at 07:12:03PM +0800, Caesar Wang wrote: > + num = abs(table->id[mid].code - table->id[mid + 1].code); > + num *= temp - table->id[mid].temp; > + denom = table->id[mid + 1].temp - table->id[mid].temp; isn't the above 'mid + 1' off-by-one when mid ends bein

Re: [PATCH v3 4/5] thermal: rockchip: optimize the conversion table

2016-11-28 Thread Eduardo Valentin
On Mon, Nov 28, 2016 at 07:12:03PM +0800, Caesar Wang wrote: > In order to support the valid temperature can conver to analog value. > The rockchip thermal driver has not supported the all valid temperature > to convert the analog value. (e.g.: 61C, 62C, 63C) > > For example: > In some cases,

[PATCH v3 4/5] thermal: rockchip: optimize the conversion table

2016-11-28 Thread Caesar Wang
In order to support the valid temperature can conver to analog value. The rockchip thermal driver has not supported the all valid temperature to convert the analog value. (e.g.: 61C, 62C, 63C) For example: In some cases, we need adjust the trip point. $cd /sys/class/thermal/thermal_zone* $echo