From patchwork Thu Apr 26 11:51:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10365767 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB670601BE for ; Thu, 26 Apr 2018 11:53:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB61D287B1 for ; Thu, 26 Apr 2018 11:53:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF8C428BB0; Thu, 26 Apr 2018 11:53:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68F9628A9D for ; Thu, 26 Apr 2018 11:53:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756227AbeDZLw5 (ORCPT ); Thu, 26 Apr 2018 07:52:57 -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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Daniel Lezcano --- 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);