From patchwork Mon Jan 19 11:44:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 5658231 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 49A849F2ED for ; Mon, 19 Jan 2015 11:44:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B50D20361 for ; Mon, 19 Jan 2015 11:44:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BB1820351 for ; Mon, 19 Jan 2015 11:44:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbbASLod (ORCPT ); Mon, 19 Jan 2015 06:44:33 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:42746 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbbASLoc (ORCPT ); Mon, 19 Jan 2015 06:44:32 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIF0021N9Y6GO60@mailout3.samsung.com>; Mon, 19 Jan 2015 20:44:30 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-24-54bcee1e2e73 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E4.AE.20081.E1EECB45; Mon, 19 Jan 2015 20:44:30 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NIF000BO9XINH80@mmp1.samsung.com>; Mon, 19 Jan 2015 20:44:30 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Zhang Rui , Kukjin Kim , Kukjin Kim Cc: Linux PM list , "linux-samsung-soc@vger.kernel.org" , Bartlomiej Zolnierkiewicz , Lukasz Majewski , Amit Daniel Kachhap , Abhilash Kesavan , Abhilash Kesavan , Kyungmin Park , Chanwoo Choi , Lukasz Majewski Subject: [PATCH 2/2] thermal: of: Enable thermal_zoneX when sensor is correctly added Date: Mon, 19 Jan 2015 12:44:04 +0100 Message-id: <1421667844-13627-3-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1421667844-13627-1-git-send-email-l.majewski@samsung.com> References: <1421667844-13627-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBLMWRmVeSWpSXmKPExsVy+t9jAV25d3tCDJp/S1s8XrOYyaLhaojF xhnrWS2uf3nOajH/yjVWizV/lSx6F1xls+h//JrZ4mzTG3aLN4+4Ld483Mxo8bn3CKPFjPP7 mCyePOxjc+Dz2DnrLrvH4j0vmTw2repk81g37S2zR9+WVYwenzfJBbBFcdmkpOZklqUW6dsl cGUc3HeEveACe8WdHbOYGhjXsHUxcnJICJhI7Dx6nAnCFpO4cG89WFxIYBGjxM2TQDYXkN3F JDFn0zEWkASbgJ7E57tPwRpEBCYwSvxfFQ1SxCzwjFliz9ftzCAJYYFwifZ17ewgNouAqsS3 6e+Bmjk4eAXcJL79LYRYpijR/WwC2DJOAXeJlhlfmSAWu0ns+HqbaQIj7wJGhlWMoqkFyQXF Sem5hnrFibnFpXnpesn5uZsYweH5TGoH48oGi0OMAhyMSjy8HAF7QoRYE8uKK3MPMUpwMCuJ 8DJeAArxpiRWVqUW5ccXleakFh9ilOZgURLnVbJvCxESSE8sSc1OTS1ILYLJMnFwSjUwzpCx 7J6eIvmd/6fkjwPnX/XKrFgy9fiq53X5CWksPns44pt/8Av9vbPOJlTCfLk3h9C+o4f0V63e Vn36fZkXu2pdZuzSY2WiMsZXYmYEypfrRq/sqIiMalzo/EDrnGLuLtW4qfE2K2fnLXdZyrr6 o3t68L3tfFXP/83RvTzZM/V7snjQ4S1PlViKMxINtZiLihMB6/pTXEsCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Up till now the thermal_zone mode was by default "disabled". With this patch the default behavior was changed to "enable". One can read the mode at: /sys/class/thermal/thermal_zone0/mode Reported-by: Abhilash Kesavan Signed-off-by: Lukasz Majewski Tested-by: Javi Merino --- drivers/thermal/of-thermal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index d717f3d..668fb1b 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -497,6 +497,9 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, if (sensor_specs.np == sensor_np && id == sensor_id) { tzd = thermal_zone_of_add_sensor(child, sensor_np, data, ops); + if (!IS_ERR(tzd)) + tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); + of_node_put(sensor_specs.np); of_node_put(child); goto exit;