Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp855563ybg; Tue, 28 Jul 2020 22:37:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznm25XfYMwjUM0zUFBjc6y032mJoNr0m3yr1LN1O76zPPKRZgcYxgyZiTgeqZ9yj/ytK+U X-Received: by 2002:aa7:d693:: with SMTP id d19mr30548235edr.317.1596001057169; Tue, 28 Jul 2020 22:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596001057; cv=none; d=google.com; s=arc-20160816; b=ILOhZpzMU2HG4ENdMLpZzLmI4xhgB23MHjL72/8RfdJCyz/QcrVze1L5XOeL0N1lpk Mw9kaRJDgEXf6bUSeV7I+ujYY78N1MbFM5C7hN+vnaQomXCyLD7kBZrIKut7WbnT+9R9 H48Igvnu0Fdds1gNqRhTFOBHnNYDFDewpXt6vEzy3BeKLrK8trcuXpMqVLs498v14eLD LynnH0wyc11NU2SRmDDLhGDRUVHh2Y8s6RaOsuucbNzVepkFz/DKFOZP/lCB7oIJYlmV OvLOOisNuFajQexnouwW0ELqQjnuxRXp5bIdC7IIg70YwWkX4vHemclo5FRCk3G7Hs/a vD0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OhJGf0UOhBnAaBM4uo+RC5KnIOLIwVjqf9Yxhm4B4Us=; b=uWH7z+horRJY+MLD2lA0nCFm3BSpY6pS+2wajrT95QtFkCpKwRo+CWx2kxocHwKnbz XhWSu7be89wQXuMDgoCYLCzCbYmyOKTMy2rgpZtwJ6zEaiGVDN0G3Fcz2YenCOY85cVH inToaVUzwrvoOyvPOrBcZ/YeOJOpgJtfM5IVbwSiNaYV2YfT642nbDmsr5mf70oWs9fg l6yTnON3az++T4ScKteX8abNN69XnuPuKDj/Y3J8gma83CHqVmFD082e84t8yGuzzUaJ dfITQmWVMVQS8QJzJHevnMJg60Jo4yVokNR/eMcqIXZuWZ3/4F2kOuNqEOVZEPO6/pSn DJmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ki7SYqvP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si653688edp.89.2020.07.28.22.37.14; Tue, 28 Jul 2020 22:37:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ki7SYqvP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726367AbgG2FhE (ORCPT + 99 others); Wed, 29 Jul 2020 01:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbgG2FhD (ORCPT ); Wed, 29 Jul 2020 01:37:03 -0400 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B825C0619D2 for ; Tue, 28 Jul 2020 22:37:02 -0700 (PDT) Received: by mail-vs1-xe42.google.com with SMTP id 1so6789408vsl.1 for ; Tue, 28 Jul 2020 22:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OhJGf0UOhBnAaBM4uo+RC5KnIOLIwVjqf9Yxhm4B4Us=; b=Ki7SYqvPryyMJ98JQEvZxaCYHLlVDrak2Lq67YCyNV/y0dYOx+svgog4yoDdTaoIIZ 9jecpy4jsbqv9HdOGPlYVyWNBU+BRkVbRxLt8m5QJZ9jc0KqewG6rDpKFuy71txYkg61 rikZ4RkT3QJ+4J5A1p0QN+zIqwkzoviZlkzGtEiRMnHjdfKbTuaXjuASsgl92Pvtb9dO 14SnZHFAjp+CdYxcIW5BqQJS3wSKw1snvEfZxM+9t9unij+pzXPTUt6I0RMvtEuT77aC 2T/UbZ9KS0n4mMp/HyXYl/Z8cWD+CWJeIF39bKzJSHJkrAGjJd8hG8L0UV1xcrtrjOVs fcFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OhJGf0UOhBnAaBM4uo+RC5KnIOLIwVjqf9Yxhm4B4Us=; b=ToZWubxxkSQ98ZkzAJbGPIS5eG3iOTU+Y3b+EdsL3pgRelbHXzy12PY21bW8Dct0W0 Ap22OigRyQ9Qa52p4KxT885Vyr/rtSAtbU96e1lwDl+zGFpwk8Oixj4Jqhyy0LKAAAvH Kt/l3kktSyc7pKKH6AUfD445B0zfEuyRqLSFjIgxNYz7mZ1QXFWfNsYeXHRwclV1reks BxUxhwSxvfioUEotByXYbM9VlhVW6aYBPSk8SFugOuyoqPQhC18eIyt4iFIMZKb3VtRb emyzkuuXk/uhydh3K4QefXgRARXmPDHU01CMCxwfIKj8pEqCaRSTR85u645tCT9EYc7l Temw== X-Gm-Message-State: AOAM533omf+SrNG/5NyVR56KZtDuHjJeVaRyzSUrPomACB6UqgqLsoex x/Cs0q/BSlv1D4vsw/yOR6rspU/ShUWnSuI5MMjrRLpEj/E= X-Received: by 2002:a67:6b05:: with SMTP id g5mr22267118vsc.9.1596001021135; Tue, 28 Jul 2020 22:37:01 -0700 (PDT) MIME-Version: 1.0 References: <20200727231033.26512-1-daniel.lezcano@linaro.org> In-Reply-To: <20200727231033.26512-1-daniel.lezcano@linaro.org> From: Amit Kucheria Date: Wed, 29 Jul 2020 11:06:50 +0530 Message-ID: Subject: Re: [PATCH] thermal: core: Add thermal zone enable/disable notification To: Daniel Lezcano Cc: Zhang Rui , Andrzej Pietrasiewicz , Linux PM list , LKML , Thierry Reding Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 28, 2020 at 4:40 AM Daniel Lezcano wrote: > > Now the calls to enable/disable a thermal zone are centralized in a > call to a function, we can add in these the corresponding netlink > notifications. > > Signed-off-by: Daniel Lezcano Reviewed-by: Amit Kucheria > --- > drivers/thermal/thermal_core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c > index 9748fbb9a3a1..72bf159bcecc 100644 > --- a/drivers/thermal/thermal_core.c > +++ b/drivers/thermal/thermal_core.c > @@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz, > > thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); > > + if (mode == THERMAL_DEVICE_ENABLED) > + thermal_notify_tz_enable(tz->id); > + else > + thermal_notify_tz_disable(tz->id); > + > return ret; > } > > -- > 2.17.1 >