From patchwork Wed Oct 10 08:30:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 10634177 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D28A913AD for ; Wed, 10 Oct 2018 08:30:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0BD32952E for ; Wed, 10 Oct 2018 08:30:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4E5329552; Wed, 10 Oct 2018 08:30:35 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL 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 5356A2952E for ; Wed, 10 Oct 2018 08:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727248AbeJJPvW (ORCPT ); Wed, 10 Oct 2018 11:51:22 -0400 Received: from mail-pf1-f202.google.com ([209.85.210.202]:50950 "EHLO mail-pf1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727241AbeJJPvU (ORCPT ); Wed, 10 Oct 2018 11:51:20 -0400 Received: by mail-pf1-f202.google.com with SMTP id z12-v6so3959691pfl.17 for ; Wed, 10 Oct 2018 01:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=8+1a8ZZqihK2vHlZpIte4kuE5OiT/BuRq57jfMWPqNs=; b=lkEGITLv2iUlKRRCxhinIj7MQ9Sq4c0NOC+gfkSr3wDX+znHPDelWQbBcN6NhqYdu4 /qMEhTsf7dTuhz1PcditwWu7t1VnlhVupI7y92q20uoKDc7ENJZ9sHnwtwRtDaWP4aUP +DIN+7Jo4KZNHYWwurolAlOa26lov27qDu7HrkbWXCTFai84keKX/DRB4vLn+M3qvT8A Q9PK4GGYnDzFhF2Ei4XMqgqH0Pg1ueRBXNfa4Hul8i61xnfFo32Rv2XcUzFTFt05MR6B lAvavMphK7L/UbYZFQOS3QYHjs2swlOxtCRSEwDQru4yvLfxSGo0KcB63HXiok0jWunk WUXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=8+1a8ZZqihK2vHlZpIte4kuE5OiT/BuRq57jfMWPqNs=; b=ZaD2kAPU/zfK4n3h7dS4Zb6hAAF85JHD29ENc0hv5dUG5DeJIp+/CmbNuvXoc9VxWr K2J2LFRj9fVTtvOiNQ8tJVKbdwLLdKCVRFVDBDCj8NvdhaceZ9xej0Eu6UIVXEnViqjJ tBI7WgQwioRQemooMpQDEu4TT335vnpHkUHHwyS9XVytkvE5MZwxQYYdSdOfkBuLJnu4 03HrvV0C4nwLScYuN0Ut7JN39/ZUWGYvH3E0QKTeWUlm0u0YRHhh8BX/wJiJqxdeSGCe isBK5RsMG+fIf2ic7Mn+NA2WUB0uOaZSVzPyK91uy/rf16a+WyHl8CN4QKz+e8pn+8oE TiAA== X-Gm-Message-State: ABuFfogpIahAyWCLAooQEwrtkJ5Y4Nf98Ixn4gTDu+irZuMnkWO7IBMp BNCW30qhl+Vg8kVLZr+aT/JxYhV9DkSZxTRV0yKBcw== X-Google-Smtp-Source: ACcGV61/0pUgZc4dTE50+iqNzcH1/ePCNH8CqS88jp8LUOzo54siihJSReFkrAqpk2dAaquURmbHp2lvwXtDaHQD33F/Pw== X-Received: by 2002:a62:5716:: with SMTP id l22-v6mr14500536pfb.40.1539160215837; Wed, 10 Oct 2018 01:30:15 -0700 (PDT) Date: Wed, 10 Oct 2018 01:30:06 -0700 In-Reply-To: <20181010083007.239938-1-matthewgarrett@google.com> Message-Id: <20181010083007.239938-2-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181010083007.239938-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH 1/2] thermal/int340x_thermal: Add additional UUIDs From: Matthew Garrett To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, Matthew Garrett , Matthew Garrett , Zhang Rui , Nisha Aram 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 Platforms support more DPTF policies than the driver currently exposes. Add them. This effectively reverts 31908f45a583e8f21db37f402b6e8d5739945afd which removed several UUIDs without explaining why. Signed-off-by: Matthew Garrett Cc: Zhang Rui Cc: Nisha Aram --- drivers/thermal/int340x_thermal/int3400_thermal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c index e26b01c05e82..51c9097eaf7a 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c @@ -22,6 +22,13 @@ enum int3400_thermal_uuid { INT3400_THERMAL_PASSIVE_1, INT3400_THERMAL_ACTIVE, INT3400_THERMAL_CRITICAL, + INT3400_THERMAL_ADAPTIVE_PERFORMANCE, + INT3400_THERMAL_EMERGENCY_CALL_MODE, + INT3400_THERMAL_PASSIVE_2, + INT3400_THERMAL_POWER_BOSS, + INT3400_THERMAL_VIRTUAL_SENSOR, + INT3400_THERMAL_COOLING_MODE, + INT3400_THERMAL_HARDWARE_DUTY_CYCLING, INT3400_THERMAL_MAXIMUM_UUID, }; @@ -29,6 +36,13 @@ static char *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = { "42A441D6-AE6A-462b-A84B-4A8CE79027D3", "3A95C389-E4B8-4629-A526-C52C88626BAE", "97C68AE7-15FA-499c-B8C9-5DA81D606E0A", + "63BE270F-1C11-48FD-A6F7-3AF253FF3E2D", + "5349962F-71E6-431D-9AE8-0A635B710AEE", + "9E04115A-AE87-4D1C-9500-0F3E340BFE75", + "F5A35014-C209-46A4-993A-EB56DE7530A1", + "6ED722A7-9240-48A5-B479-31EEF723D7CF", + "16CAF1B7-DD38-40ED-B1C1-1B8A1913D531", + "BE84BABF-C4D4-403D-B495-3128FD44dAC1", }; struct int3400_thermal_priv { From patchwork Wed Oct 10 08:30:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 10634175 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBDF913AD for ; Wed, 10 Oct 2018 08:30:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC6172951A for ; Wed, 10 Oct 2018 08:30:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE97129529; Wed, 10 Oct 2018 08:30:23 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL 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 D92752951A for ; Wed, 10 Oct 2018 08:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbeJJPvY (ORCPT ); Wed, 10 Oct 2018 11:51:24 -0400 Received: from mail-vs1-f73.google.com ([209.85.217.73]:44103 "EHLO mail-vs1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbeJJPvX (ORCPT ); Wed, 10 Oct 2018 11:51:23 -0400 Received: by mail-vs1-f73.google.com with SMTP id e134-v6so1690674vsd.11 for ; Wed, 10 Oct 2018 01:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=AwXMCKKMNpz1qsc+WgZgrCNuaJKNUnwlWlsdRSUucxU=; b=HuOPv/HROKDk/joAfAgm23acOqU86A3lQUS5MbJruvamIOLrRTnK0xD05L/Y0Hv0+3 hfaJRaeMbewzjwBW79G/sgCaUnO+T+pJ+6lEq10HQXanRQgF3CsSyyH4AiPAbr89PNBN KfVvBFR0SDpFUpynifw8cMD/eDYnoJ13RZ0s5wU3Sed4kIA5IhTkQTrMLMHfVgtaMjeI 3cYZYA7X/ueMcaw3HbCuZFJ6ce/8vCXD2jPWOEZDUmJunr84Z+rFaWjdWoEwndrRdPut WmgV/8Xk+KUpBoMu9YzNqAvCRA5MmGpoKwn+b/TIllCvWnWbC0At57llDz1L62wxRBwT 5N2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=AwXMCKKMNpz1qsc+WgZgrCNuaJKNUnwlWlsdRSUucxU=; b=EHpf8N06NYYuV6XUo7zCo87UtXQcaVjnGHfS3dIgX7tUBoBbVCejCfX1hAD+J1IDbb UC4evL2oNUYNIC2dW4UWwjq2R/603yKjiXrw5brtEaWDLBzkg6VEvcrYvG7+hn9sZjEb rsw5ZnX99fx0KDHtKDyFSP97BYh9t1frApYQ3EFt+SEy4Gx4fyyDJi6U4MEsjUGoRpSG YAMcXpFZ0A02NBIxPDWS6Cynbrjg+s7lNT41Uc4P+MfiNnbfdGzvWrJtmqeUOcL1iglV NScE8MyH+7ZZo0jO7IexGgIHFEF1c+ENb44cxewMBg9Ov3B+qQj9CJoj6/G2jIETYtMe A+mA== X-Gm-Message-State: ABuFfojscUDWHnJjxDCwFRYyT+SIO/hVhe2jMs6ceuRAlxh2GnoJEmoC RJTNueSHadycv/+IEWIrGpTK+dUbJk9BQVJ2dg79xw== X-Google-Smtp-Source: ACcGV63H2EeWwvLBTuqcI4Svfa8jvuRXASqq2W6zxj4ZWQ0jHSsh0zspu6XEjS6VnJqqUS5mAH6TE0galBOKhWGA1NaKjg== X-Received: by 2002:ab0:9d8:: with SMTP id e24mr27765583uah.12.1539160218219; Wed, 10 Oct 2018 01:30:18 -0700 (PDT) Date: Wed, 10 Oct 2018 01:30:07 -0700 In-Reply-To: <20181010083007.239938-1-matthewgarrett@google.com> Message-Id: <20181010083007.239938-3-matthewgarrett@google.com> Mime-Version: 1.0 References: <20181010083007.239938-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH 2/2] thermal/int340x_thermal: fix mode setting From: Matthew Garrett To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, Matthew Garrett , Matthew Garrett , Zhang Rui 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 int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-by: Matthew Garrett Cc: Zhang Rui --- drivers/thermal/int340x_thermal/int3400_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c index 51c9097eaf7a..e9d58de8b5da 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c @@ -316,10 +316,9 @@ static int int3400_thermal_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); - if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) { - int3400_thermal_ops.get_mode = int3400_thermal_get_mode; - int3400_thermal_ops.set_mode = int3400_thermal_set_mode; - } + int3400_thermal_ops.get_mode = int3400_thermal_get_mode; + int3400_thermal_ops.set_mode = int3400_thermal_set_mode; + priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0, priv, &int3400_thermal_ops, &int3400_thermal_params, 0, 0);