Received: by 10.192.165.148 with SMTP id m20csp1975262imm; Thu, 26 Apr 2018 04:56:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LwD9TsDIB3nCsbH0SO9fpkPwOJ2Flim2UHqxS4C8bJQXlpifN+EPp5qTwa61yYpXsaHvN X-Received: by 10.99.177.5 with SMTP id r5mr26330371pgf.186.1524743771804; Thu, 26 Apr 2018 04:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524743771; cv=none; d=google.com; s=arc-20160816; b=sIoKeLjH2kBv3tkr6G2WXMHBy+U5LbENTTbhgZPIomHDU+qW5WhsLsUDjEwcXjrskW yN6eZjTG28VUsJtxB2TQcC77S9n/lI8QbPR8PB933ocGuU8bSHTQeVBsGK/eFVT3QwLx m/jLIMR3pFSa55u3KnrYRQtzEujEnlG603FIZlJiCkTBgSazlovQEP1lcQaLCTjN8HsG mnSVPBRPINg81kx6QKC64ivbTsOndlmFLUkHz7h20j+nMH81QtqAIDEOAObn7N5Pelwu gSv/03p+n0nW0lSB9IX+TYEqgPrMnFnGFDKyS0vitj1siqj5f2oH1spnCPXUrx/0d3KG 1/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=QhbJ03ICGianUyhUnkE0EOkybaM4Jmuuk+oK4Vpi5iI=; b=ZVPyNZUXC3Hw/mhKqG7WKMbC6gxvE5cx5VYJ7S/IlVYgIqjJJgPMtZNqRvY2AxS0HF NAEwhaQy9OJ3X31vAECFcguTgsmhsO1a9tWZ9ayyDiSKZO1UYfgr1P6Cb+VuJLJnqNxX QDr+XX8fWy+6A44VCWmLMrRMO/zJocfXFREpUnXTyiQUnXrZqd0VgQT9ajuwvWyCHxbD MeEu7UZkMXLuI4c2SilAXEK0+0tEgV85QYBC2Sm1c8pArUT2hIMpBSRkpNAn2116H1U5 TNiotXrMmTTGqB+zWEcvkdo0mp8mwtajaklblL4jZBUOK6nuYgqWRYXEdrTORkdmwnwE Rr7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=etwpwn3V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si15577848pgc.366.2018.04.26.04.55.56; Thu, 26 Apr 2018 04:56:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=etwpwn3V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756296AbeDZLxI (ORCPT + 99 others); Thu, 26 Apr 2018 07:53:08 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48501 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755792AbeDZLwr (ORCPT ); Thu, 26 Apr 2018 07:52:47 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180426115244epoutp014d0c5db5a1c7039143c59fbceaf7fef2~o_jGkaiNW0415504155epoutp01W; Thu, 26 Apr 2018 11:52:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180426115244epoutp014d0c5db5a1c7039143c59fbceaf7fef2~o_jGkaiNW0415504155epoutp01W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524743565; bh=QhbJ03ICGianUyhUnkE0EOkybaM4Jmuuk+oK4Vpi5iI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=etwpwn3VNuxq81JZpV+xullbH+E3IzeA3oXVhVfzpwcYmmYsuLPea46sa1eoNYk97 cGC0nabnQ9uVVU0VG6abRPnc9g2q1OuMUytfRg/XYCfnM/GfC/fB7noH/YSMYOkmNW hPMMgc80VH1Dju+kzXGL2C9Die2Ptm4pUNqCXY+I= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180426115244epcas2p1af6dc8c9eff8570a71a9055cacef05ff~o_jGYDocs2629226292epcas2p1M; Thu, 26 Apr 2018 11:52:44 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 46.A4.04132.C8DB1EA5; Thu, 26 Apr 2018 20:52:44 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180426115244epcas2p36d0d44d1a0b2c3c4edff33187046caac~o_jF31UMS0036100361epcas2p3Q; Thu, 26 Apr 2018 11:52:44 +0000 (GMT) X-AuditID: b6c32a46-145ff70000001024-e8-5ae1bd8ccbbe Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 32.3B.03817.C8DB1EA5; Thu, 26 Apr 2018 20:52:44 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P7S00GD7JMBQG00@mmp2.samsung.com>; Thu, 26 Apr 2018 20:52:43 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 18/18] thermal: exynos: remove trip reporting to user-space Date: Thu, 26 Apr 2018 13:51:33 +0200 Message-id: <1524743493-28113-19-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmmW7P3odRBj1vNCw2zljPajH/yjVW i8u75rBZfO49wmgx4/w+JosnD/vYHNg8ds66y+6xeM9LJo++LasYPT5vkgtgieKySUnNySxL LdK3S+DKWPRsG1PBKb6Kye1XmBsYZ/J0MXJwSAiYSHw7wd7FyMUhJLCDUWLb+zZGCOc7o8TP huesXYycYEUPlpyFSmxglDj8aicrhPOLUWLlp2nsIFVsAlYSE9tXMYLYIgJaEicubWcCKWIW mMMoMathNwtIQljAW+Lo7/fMIDaLgKrEjmmTwVbwCnhKfHnyAWqdnMTJYxBxTqD4hSNNLCCD JAR+skq8/nCUCaLIRWLdzxssELawxKvjW9ghbGmJZ6s2MkI0NDNKfNuxhxkiMYFRYs96IQjb WuLw8YtgG5gF+CQ6Dv9lh4QGr0RHG1SJh8S1J+eZIMKOEqf2u0J8DPTMpQNrmCYwSi1gZFjF KJZaUJybnlpsVGCkV5yYW1yal66XnJ+7iREcg1puOxiXnPM5xCjAwajEwxuw8EGUEGtiWXFl 7iFGCQ5mJRHe+NaHUUK8KYmVValF+fFFpTmpxYcYpTlYlMR5G3zPRAkJpCeWpGanphakFsFk mTg4pRoYF6/b+mTO1MWuXPYnWtkEvXd9u5ez5pnokSa7Rc4HC9Le7Ht+S/1XtcjXhADjtRef LuJ5yfiRTeVVo+s94/U3+3dMan+5aMIuN+s8L4V7nYfP8SU/1vlxZbu1SU+P2+Pio1P4y9Ue LqkvcAjm0/O/3vqsQIVXKVL33TlWvbk/28tVLTJX7+i0UGIpzkg01GIuKk4EAMr8UYK9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e+xoG7P3odRBptXsltsnLGe1WL+lWus Fpd3zWGz+Nx7hNFixvl9TBZPHvaxObB57Jx1l91j8Z6XTB59W1YxenzeJBfAEsVlk5Kak1mW WqRvl8CVsejZNqaCU3wVk9uvMDcwzuTpYuTkkBAwkXiw5CwjiC0ksI5R4u2noC5GLiD7F6PE gh8T2UESbAJWEhPbV4EViQhoSZy4tJ0JpIhZYA6jxPMVc5hAEsIC3hJHf79nBrFZBFQldkyb zApi8wp4Snx58oEVYpucxMljEHFOoPiFI00sEJs9JO73vWebwMizgJFhFaNkakFxbnpusVGB UV5quV5xYm5xaV66XnJ+7iZGYMhsO6zVv4Px8ZL4Q4wCHIxKPLwBCx9ECbEmlhVX5h5ilOBg VhLhjW99GCXEm5JYWZValB9fVJqTWnyIUZqDRUmclz//WKSQQHpiSWp2ampBahFMlomDU6qB seHq9Uu39R25b2+S3xbRvopHZ8lUw0tqHOwv/jIr7p5vYjLZa9bSZI6eXI0phttVGv/0HmKV aJT44Wm59abMzjn/eaebbtglPPu1C0tRq+Ghz8tLVJaeskqymcu/dunDkp6avsVnl52fzM4q /lNJrV2iodit0dT3jKKvYLLhn9/F6ReU5R5HKLEUZyQaajEXFScCAE840KgVAgAA X-CMS-MailID: 20180426115244epcas2p36d0d44d1a0b2c3c4edff33187046caac X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180426115244epcas2p36d0d44d1a0b2c3c4edff33187046caac X-RootMTR: 20180426115244epcas2p36d0d44d1a0b2c3c4edff33187046caac References: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove trip reporting to user-space - I'm not aware of any user-space program which relies on it and there is a thermal user-space governor which does it in proper way nowadays. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/samsung/exynos_tmu.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index ed02b40..f785e6a 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -216,33 +216,6 @@ struct exynos_tmu_data { void (*tmu_clear_irqs)(struct exynos_tmu_data *data); }; -static void exynos_report_trigger(struct exynos_tmu_data *p) -{ - char data[10], *envp[] = { data, NULL }; - struct thermal_zone_device *tz = p->tzd; - int temp; - unsigned int i; - - if (!tz) { - pr_err("No thermal zone device defined\n"); - return; - } - - thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); - - mutex_lock(&tz->lock); - /* Find the level for which trip happened */ - for (i = 0; i < of_thermal_get_ntrips(tz); i++) { - tz->ops->get_trip_temp(tz, i, &temp); - if (tz->last_temperature < temp) - break; - } - - snprintf(data, sizeof(data), "%u", i); - kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, envp); - mutex_unlock(&tz->lock); -} - /* * TMU treats temperature as a mapped temperature code. * The temperature is converted differently depending on the calibration type. @@ -814,7 +787,8 @@ static void exynos_tmu_work(struct work_struct *work) if (!IS_ERR(data->clk_sec)) clk_disable(data->clk_sec); - exynos_report_trigger(data); + thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED); + mutex_lock(&data->lock); clk_enable(data->clk); -- 1.9.1