From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 999D5C3A5A0 for ; Sun, 19 Apr 2020 13:52:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F518206F9 for ; Sun, 19 Apr 2020 13:52:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PR3RZqvC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F518206F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=piie.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:To:Subject: Message-ID:From:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zr+D55kdrR3X5BLKObD2EViLBYfy31X7L0o3K5NZHg0=; b=PR3RZqvC4tSTuT B/UI+riQTzRIifwleTZAVO6ycX15QbgdH9c8wlHKHu3BFCtsFfJZluSk0gPqkhbsFiYJfYLjaDZvU G9lW91M1YEbJJSrwhjNmJWJFTBitiMm1n9Mdx5JLAMfDtdGWL3SWPI8ZeVzTm4ufEy0B2PrQ6hyGX MBaTgkrdwWoK1dBlnfj692CYIp12GHClpVzsuo7USLe9ldiL/1oF8o7CsSNATWNFsDTlyduMJEbd6 0s76yBytMcFck63YUSFzOEw6qFW+lgARnWwiyZc2bZvDTHRdi7iLxSPEeGhnkqHbqkey1oHffw2c/ 61PCsfvV8p4p+27L6SOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQANA-0002Mz-Ui; Sun, 19 Apr 2020 13:52:37 +0000 Received: from piie.net ([80.82.223.85]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQALg-0000vl-2s for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 13:51:06 +0000 Received: from mail.piie.net (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by piie.net (Postfix) with ESMTPSA id BC23C1613; Sun, 19 Apr 2020 15:50:35 +0200 (CEST) Mime-Version: 1.0 Date: Sun, 19 Apr 2020 13:50:35 +0000 X-Mailer: RainLoop/1.11.3 From: "=?utf-8?B?UGV0ZXIgS8Okc3RsZQ==?=" Message-ID: Subject: Re: [RFC v3 1/2] thermal: core: Let thermal zone device's mode be stored in its struct To: "Andrzej Pietrasiewicz" , linux-pm@vger.kernel.org In-Reply-To: <20200417162020.19980-2-andrzej.p@collabora.com> References: <20200417162020.19980-2-andrzej.p@collabora.com> <9ac3b37a-8746-b8ee-70e1-9c876830ac83@linaro.org> <20200417162020.19980-1-andrzej.p@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_065104_447569_BB6D1D7E X-CRM114-Status: UNSURE ( 5.10 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: platform-driver-x86@vger.kernel.org, Shawn Guo , kernel@collabora.com, Fabio Estevam , Amit Kucheria , Daniel Lezcano , linux-acpi@vger.kernel.org, NXP Linux Team , Darren Hart , Zhang Rui , Gayatri Kammela , Len Brown , Barlomiej Zolnierkiewicz , Sascha Hauer , Ido Schimmel , Jiri Pirko , Thomas Gleixner , Allison Randal , linux-arm-kernel@lists.infradead.org, Support Opensource , netdev@vger.kernel.org, "Rafael J . Wysocki" , Pengutronix Kernel Team , Enrico Weigelt , "David S . Miller" , Andy Shevchenko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 17. April 2020 18:20, "Andrzej Pietrasiewicz" schrieb: > Thermal zone devices' mode is stored in individual drivers. This patch > changes it so that mode is stored in struct thermal_zone_device instead. > > As a result all driver-specific variables storing the mode are not needed > and are removed. Consequently, the get_mode() implementations have nothing > to operate on and need to be removed, too. > > Some thermal framework specific functions are introduced: > > thermal_zone_device_get_mode() > thermal_zone_device_set_mode() > thermal_zone_device_enable() > thermal_zone_device_disable() > > thermal_zone_device_get_mode() and its "set" counterpart take tzd's lock > and the "set" calls driver's set_mode() if provided, so the latter must > not take this lock again. At the end of the "set" > thermal_zone_device_update() is called so drivers don't need to repeat this > invocation in their specific set_mode() implementations. > > The scope of the above 4 functions is purposedly limited to the thermal > framework and drivers are not supposed to call them. This encapsulation > does not fully work at the moment for some drivers, though: > > - platform/x86/acerhdf.c Acked-by: Peter Kaestle [...] -- --peter; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel