Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754711AbbEKUE1 (ORCPT ); Mon, 11 May 2015 16:04:27 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:34066 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbbEKUEX (ORCPT ); Mon, 11 May 2015 16:04:23 -0400 From: Eduardo Valentin To: Rui Zhang , hongtao.jia@freescale.com, kong.kongxinwei@hisilicon.com Cc: Linux PM , LKML , Linux ACPI , Eduardo Valentin Subject: [PATCH 0/2] thermal: add support to slope and offset Date: Mon, 11 May 2015 20:04:15 -0700 Message-Id: <1431399857-13943-1-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.3.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 39 Hello all, This is a patch series to add support to slope and offset constants of a linear extrapolation model. This type of model is very common across different platforms, and many drivers are attempting to have its support. The basic idea is to have this mapping in the thermal core, as part of thermal_zone_params. In this series, I also add a simple support to read them from DT, i.e.: /* hotspot = 1 * adc + 6000 */ coefficients = <1 6000>; I am copying some of the driver writers that attempted to use this feature, but by adding their own property. Please, check if this change is enough to properly map your slope and offset requirement. Remember, they will be added in your thermal zone DT node, instead of in your sensor DT node. BR, Eduardo Valentin (2): thermal: support slope and offset coefficients thermal: of-thermal: add support for reading coefficients property Documentation/thermal/sysfs-api.txt | 16 ++++++++++++++++ drivers/thermal/of-thermal.c | 26 ++++++++++++++++++++++++-- drivers/thermal/thermal_core.c | 4 ++++ include/linux/thermal.h | 11 +++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) -- 2.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/