Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4966763rwn; Mon, 12 Sep 2022 02:05:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR7lkDMdmJ01p5vQz+gBdCd8zP0JBI/jwYubjO/tQ2Haw+9TECi/r4poBliuxzrYkRtaeoVM X-Received: by 2002:a65:6052:0:b0:429:9cea:dcd8 with SMTP id a18-20020a656052000000b004299ceadcd8mr21732310pgp.461.1662973513923; Mon, 12 Sep 2022 02:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662973513; cv=none; d=google.com; s=arc-20160816; b=mj2ssUkDsWP7jtKa7YFQHEmU15gvUZLaXfSTkUNTY48+ZFKQ8NKYESU0yzj06/OlBa ixqJEaJF2ZvBclyc+frHc5PLq5bsOvyY21iWoO7L69uGrxcWzkKOmZwKlMNRS6CvbKVS hakyMrwty8v7Nj0zt50YaZeEBtiU8EzgUsg+J/rIhfZVAb4v8S7l28WXSi4ApQOVwgVR 3A+HVZorlcfh3ZPifJM8nRyIAWqQuTEuPr4Rn40+RRGvZDBBLnm91PyOR3LH/Enwg+Aj y//TbpkgCWE+GrhL3f9HgFvcosH6nYspRj8+p8ovEI3A106PZ0w1GIjTl4//Zg4zQOCl 0Ifg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/UeNpP+VC97GxtM/tp6ip0ihWytOFO+8NfMTiiZb64A=; b=zQY20Uq8iBiNMQyE8IwanhmfH3PLMyk5q5xsYWmlUZ5N4BuhmMkRT77gv4e2I2n0wg j2jxqBaPONJ0lWdq578PXY/+gqMTlHXYHlCww2aBVpkz+sFiKDBWqigwqbQ8GUcz0ysi 76xf/E4j0UO5UhtL5xRRMvhG24lV8/VLwnrcCWCox18UAwU9ExIMeCpkmfr/BFpjxa0X ehNIBUZaSp/fovMhmrIh0sKotdzMsaxlasUlLf6Aibh3zEfobkb4aRKDljJRPYmbhrLp w4mIXIey8WpxieUslYsAzhlX+XAQ9W4Bnann/vqS1Tqg/vzTpwlHsX3fcS9Bo3C4p81d XNjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tk2ZeLrK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a6555c3000000b0043886e824adsi8708569pgs.368.2022.09.12.02.05.01; Mon, 12 Sep 2022 02:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tk2ZeLrK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230045AbiILIvK (ORCPT + 99 others); Mon, 12 Sep 2022 04:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiILIvI (ORCPT ); Mon, 12 Sep 2022 04:51:08 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 209422B255 for ; Mon, 12 Sep 2022 01:51:04 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id b21so7925371plz.7 for ; Mon, 12 Sep 2022 01:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=/UeNpP+VC97GxtM/tp6ip0ihWytOFO+8NfMTiiZb64A=; b=Tk2ZeLrKXwzkwyP2gg/3iL/biwqdAmBEtphjyT6uO6r63r19dU2BGwwnqRfoxF46wk wgDK0HlRY1LYsPaHrVcBxLZ9wG07D78g2CrMCLX6QvgJ3nXDqXGR6q68U0uov3lpzkbW bhlec8jh+BMtVOwvN9cBG5oZ+6bCrVZSjh0FqfJBuAQoXFpdxM2QBmCOozaZBka6uc8/ 6VwN8sWSz0n4R/TQZii3awQ9itFtyGUiGSa06QGjbDJW0RDrV4uBPT5eEGC/noMPYcsR ZZ88nGS8NU3vmBnwgyIZ/gnhNltoBswVTMhJ/o3PI01yL+rcEmA/nN/j0mLybKNSejNV 60lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=/UeNpP+VC97GxtM/tp6ip0ihWytOFO+8NfMTiiZb64A=; b=LGi06xWTzV9OgMH90KXbsU6r41xlx52CapsTbqgE/rdRJLt+ZljUlNBq3YdCUU9Tvr kCS4MIAhO5unItESp0nw1KZJEostrA6YB9UXPi60vjj2OL5+W9YRmwdBH7gIVALvJ/6/ Zzv22xpqbKx/xJaai7NndcstItwjQSIn6Xzj+8v2oObWKVrlB7P/kwQxjYQ6Zin4UjMI Dy0UJd7wyDv2nuyCUvGUKe2PZNg45GBobSrkvq6k7BEQdl89W8aW51BzTkS6qFlc012k cIFhfdbMkugZVYdcUiazD8K3GxjIfoNlZOezJbhchYuzxCESTInj7Wl6SJ8+3jFYe3Pm 05uQ== X-Gm-Message-State: ACgBeo3e1hNvcgmlo+sQ3dsXABclPwDfDnK1wjxc0Uo2gvpjIjwtiDGq c5Wky2YYGQKiMIDUSQPQb/FstM9aiOoNtg== X-Received: by 2002:a17:902:bc44:b0:176:909f:f636 with SMTP id t4-20020a170902bc4400b00176909ff636mr25363438plz.21.1662972663290; Mon, 12 Sep 2022 01:51:03 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:5362:9d7f:2354:1d0a:78e3]) by smtp.gmail.com with ESMTPSA id h13-20020a170902f54d00b00172897952a0sm5326699plf.283.2022.09.12.01.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:51:03 -0700 (PDT) From: Bhupesh Sharma To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, robh@kernel.org, andersson@kernel.org, rafael@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com Subject: [PATCH 0/4] thermal: Introduce Qualcomm Cooling Driver suppport Date: Mon, 12 Sep 2022 14:20:45 +0530 Message-Id: <20220912085049.3517140-1-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces the Qualcomm Cooling Driver (aka Qualcomm Thermal Mitigation Driver) and the related support code (dt-binding, MAINTAINER file etc). Several Qualcomm Snapdragon SoCs have Thermal Mitigation Devices (TMDs) present on various remote subsystem(s) (for e.g. the Compute DSP, aka cDSP), which can be used for several mitigations for remote subsystem(s), including remote processor mitigation, rail voltage restriction etc. Here we introduce the Qualcomm Cooling Driver which is based on the kernel thermal driver framework and also employs the kernel QMI interface to send the message to remote subsystem(s). At the very top-level, the dts is supposed to describe a TMD node, which should further represent the remote subsystem(s) present on the SoC and further each child of a subsystem should represent the separate cooling devices available on the remote subsystem. Note that this patchset is targeted for the 'linux-pm' tree and the dts patchset/changes targeted for 'linux-arm-msm' tree will be sent as a separate patchset. This patchset is based on the CONFIG_QCOM_THERMAL related fix sent via [1]. Otherwise the latest changes from 'linux-next/master' are used to rebase the patchset. [1]. https://lore.kernel.org/all/CAA8EJpoM5nW=pVJB4zy4Jh9Q3gE4KOju2QVy_WtmUokKMyXtuw@mail.gmail.com/T/#m4e2b765e68e3123b3c0e28c806409dae4b988432 Cc: andersson@kernel.org Cc: robh@kernel.org Cc: daniel.lezcano@linaro.org Cc: rafael@kernel.org Bhupesh Sharma (4): thermal: qcom: qmi_cooling: Add skeletal qmi cooling driver thermal: qcom: Add Kconfig entry & compilation support for qmi cooling driver dt-bindings: thermal: Add qcom,qmi-tmd-device and qcom,tmd-device yaml bindings MAINTAINERS: Add entry for Qualcomm Cooling Driver .../bindings/thermal/qcom,qmi-tmd-device.yaml | 78 +++ .../bindings/thermal/qcom,tmd-device.yaml | 122 ++++ MAINTAINERS | 10 + drivers/thermal/qcom/Kconfig | 4 + drivers/thermal/qcom/Makefile | 2 + drivers/thermal/qcom/qmi_cooling/Kconfig | 14 + drivers/thermal/qcom/qmi_cooling/Makefile | 3 + .../qcom/qmi_cooling/qcom_qmi_cooling.c | 632 ++++++++++++++++++ .../qcom/qmi_cooling/qcom_tmd_services.c | 352 ++++++++++ .../qcom/qmi_cooling/qcom_tmd_services.h | 120 ++++ include/dt-bindings/thermal/qcom,tmd.h | 14 + 11 files changed, 1351 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml create mode 100644 Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml create mode 100644 drivers/thermal/qcom/qmi_cooling/Kconfig create mode 100644 drivers/thermal/qcom/qmi_cooling/Makefile create mode 100644 drivers/thermal/qcom/qmi_cooling/qcom_qmi_cooling.c create mode 100644 drivers/thermal/qcom/qmi_cooling/qcom_tmd_services.c create mode 100644 drivers/thermal/qcom/qmi_cooling/qcom_tmd_services.h create mode 100644 include/dt-bindings/thermal/qcom,tmd.h -- 2.37.1