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);