Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572147 > unrolled thread

Re: [PATCH v5 3/3] thermal: zx2967: add thermal driver for ZTE's zx2967 family

Started byEduardo Valentin <edubezval@gmail.com>
First post2017-02-02 06:10 +0100
Last post2017-02-02 06:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 3/3] thermal: zx2967: add thermal driver for ZTE's  zx2967 family Eduardo Valentin <edubezval@gmail.com> - 2017-02-02 06:10 +0100

#1572147 — Re: [PATCH v5 3/3] thermal: zx2967: add thermal driver for ZTE's zx2967 family

FromEduardo Valentin <edubezval@gmail.com>
Date2017-02-02 06:10 +0100
SubjectRe: [PATCH v5 3/3] thermal: zx2967: add thermal driver for ZTE's zx2967 family
Message-ID<t6hOF-7HV-5@gated-at.bofh.it>
Hey Bao,

On Wed, Jan 18, 2017 at 12:42:02PM +0800, Baoyou Xie wrote:
> This patch adds thermal driver for ZTE's zx2967 family.
> 
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>

<cut>

> +
> +	/*
> +	 * Calculate temperature
> +	 *   922	initial value of calibration cure
> +	 *   1.951	slope of calibration cure
> +	 */
> +	*temp = DIV_ROUND_CLOSEST((val - 922) * 1000, 1951);

You can describe the offset and slope using DT and avoid this to be hard
coded in your driver. Besides, if you read offset and slope from DT,
your driver will be ready for any upcoming sensor addition that you may
want to support in future, given that would required slope and offset
change, per sensor, per chip version.

Can you please check if you can move these to DT?

BR,
> -- 
> 2.7.4
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web