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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9703CC04FDE for ; Fri, 9 Dec 2022 15:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230409AbiLIP0y (ORCPT ); Fri, 9 Dec 2022 10:26:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230411AbiLIP0i (ORCPT ); Fri, 9 Dec 2022 10:26:38 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 061D88F71A for ; Fri, 9 Dec 2022 07:26:33 -0800 (PST) Date: Fri, 09 Dec 2022 15:26:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670599589; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m1/tVk0jLzC4xNlmSA1hzt7VA/waKzBDppFSbI6oQxo=; b=EM9ULNl8vge9HlWNjm7nlw7X+jfrWxWsbbQsevc5081qE/QdH4LCY+bB3lemAlJou7w4oV Z7vrFSnTqcYvVGHVB9FUwsojLoZ2Sv4q2gueJAs3ENnEmT4/bLMberxw2lQKNzkQJYJhfC QUmZlpGfKT0ldfoefUREtfLSrv0aPFH/+5hDWs7AQxnjsGZTGdhhAyaFeGu3nVEK64iOHl s7wHl+n9I7d9VXCZ6KyHR6e67sY5Czf7IrFXZFF1YCttCX3LBX/Fp/sG1Kmsxz7VcsJhUE N6TXROORIfxYvshztQ0wgEggodWZv3uFmitB6Wj5VDCvW+vEQPPiTNvfhBwbHw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670599589; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m1/tVk0jLzC4xNlmSA1hzt7VA/waKzBDppFSbI6oQxo=; b=lB6M2hOW9jJeSw5FMyBMBDPR6RROuKgSZDbvAn5kvVpDN3Le9bddFWuXYkrAYF2JCLACHK Fb4rC7c1xUGxDmAA== From: "thermal-bot for Robert Marko" Sender: tip-bot2@linutronix.de Reply-to: linux-pm@vger.kernel.org To: linux-pm@vger.kernel.org Subject: [thermal: thermal/next] thermal/drivers/tsens: Add IPQ8074 support Cc: Robert Marko , Bjorn Andersson , Daniel Lezcano , rui.zhang@intel.com, amitk@kernel.org In-Reply-To: <20220818220245.338396-4-robimarko@gmail.com> References: <20220818220245.338396-4-robimarko@gmail.com> MIME-Version: 1.0 Message-ID: <167059958957.4906.7869913133452171031.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The following commit has been merged into the thermal/next branch of thermal: Commit-ID: fd742f2ee2f95c75a2cb27c9d36d29557c2ba5db Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//fd742f2ee2f95c75a2cb27c9d36d29557c2ba5db Author: Robert Marko AuthorDate: Fri, 19 Aug 2022 00:02:44 +02:00 Committer: Daniel Lezcano CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00 thermal/drivers/tsens: Add IPQ8074 support Qualcomm IPQ8074 uses tsens v2.3 IP, however unlike other tsens v2 IP it only has one IRQ, that is used for up/low as well as critical. It also does not support negative trip temperatures. Signed-off-by: Robert Marko Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220245.338396-4-robimarko@gmail.com Signed-off-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-v2.c | 17 +++++++++++++++++ drivers/thermal/qcom/tsens.c | 3 +++ drivers/thermal/qcom/tsens.h | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index 9babc69..29a61d2 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -39,6 +39,17 @@ static struct tsens_features tsens_v2_feat = { .trip_max_temp = 120000, }; +static struct tsens_features ipq8074_feat = { + .ver_major = VER_2_X, + .crit_int = 1, + .combo_int = 1, + .adc = 0, + .srot_split = 1, + .max_sensors = 16, + .trip_min_temp = 0, + .trip_max_temp = 204000, +}; + static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = { /* ----- SROT ------ */ /* VERSION */ @@ -104,6 +115,12 @@ struct tsens_plat_data data_tsens_v2 = { .fields = tsens_v2_regfields, }; +struct tsens_plat_data data_ipq8074 = { + .ops = &ops_generic_v2, + .feat = &ipq8074_feat, + .fields = tsens_v2_regfields, +}; + /* Kept around for backward compatibility with old msm8996.dtsi */ struct tsens_plat_data data_8996 = { .num_sensors = 13, diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index f315104..b7d9782 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -981,6 +981,9 @@ static const struct of_device_id tsens_table[] = { .compatible = "qcom,ipq8064-tsens", .data = &data_8960, }, { + .compatible = "qcom,ipq8074-tsens", + .data = &data_ipq8074, + }, { .compatible = "qcom,mdm9607-tsens", .data = &data_9607, }, { diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 8dc21ca..899af12 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -597,6 +597,6 @@ extern struct tsens_plat_data data_8916, data_8939, data_8974, data_9607; extern struct tsens_plat_data data_tsens_v1, data_8976; /* TSENS v2 targets */ -extern struct tsens_plat_data data_8996, data_tsens_v2; +extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2; #endif /* __QCOM_TSENS_H__ */