From patchwork Wed Mar 15 10:39:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 663907 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 BAB9EC74A5B for ; Wed, 15 Mar 2023 10:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbjCOKkl (ORCPT ); Wed, 15 Mar 2023 06:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230455AbjCOKkk (ORCPT ); Wed, 15 Mar 2023 06:40:40 -0400 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF1A166D0; Wed, 15 Mar 2023 03:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Content-Transfer-Encoding:MIME-Version:Message-Id :Date:Subject:Cc:To:From:References:In-Reply-To:Sender:Reply-To:Content-Type: Content-ID:Content-Description; bh=SUExAIYL6xAykAwwtW+IW90OBx4NSv0nC4YM+9xejtQ=; b=F6VWacqY5FQtpaW2LSR5iiSxff a1hSY0TlJOP8n7HNQAPSbdLdUy+0JsyPrL7Kl0rIFzPRYbA5359t4e43ID32FOwfT/Dn5LaCGJO6W D9Bykk7AbznOdQvM+lv0AKZAwTTv7S9JmWr38MBHw7TcaKHp7RS7hJUQVfL+/pPs5Z0OQsOZEvkoV NThfKunmBEOMtTcWBB1X5P9lU1V+DHQBxSt1uGTOBw/F1rb/X7fqd2lx6q7ObEJ+wD745rWw23SFm dIBrz+eaCQUpiHCuBHcw6LBiQOtV4ZEsYN27c6ULJBumjCL9ZQ+lshPXT+MpJW/A+kpFMtTqZo2rx 0imTSNKA==; Received: from [10.22.3.24] (helo=kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) id 1pcOYN-00GsYJ-Mu; Wed, 15 Mar 2023 11:40:19 +0100 From: Stephan Gerhold To: Daniel Lezcano , "Rafael J. Wysocki" Cc: Amit Kucheria , Thara Gopinath , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Andy Gross , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold , Stephan Gerhold Subject: [PATCH v3 0/6] thermal: qcom: tsens: Fix MDM9607, add MSM8909 Date: Wed, 15 Mar 2023 11:39:44 +0100 Message-Id: <20230315103950.2679317-1-stephan.gerhold@kernkonzept.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Make the MDM9607 thermal sensor support consistent with Qualcomm's vendor kernel (msm-3.18) by applying the correct default slope values and adding "correction factors" to the factory calibration values in the fuses. Use the same functionality to add the very similar MSM8909 SoC to the tsens driver. --- Changes in v3: Drop now unused definition reported by kernel test robot Changes in v2: - Rewrite on top of per-sensor nvmem cell changes that landed in 6.3 - Add patches to fix existing support for MDM9607 Stephan Gerhold (6): thermal: qcom: tsens: Drop unused legacy structs thermal: qcom: tsens-v0_1: Fix mdm9607 slope values thermal: qcom: tsens-v0_1: Add mdm9607 correction offsets dt-bindings: thermal: qcom-tsens: Drop redundant compatibles dt-bindings: thermal: qcom-tsens: Add MSM8909 compatible thermal: qcom: tsens-v0_1: Add MSM8909 data .../bindings/thermal/qcom-tsens.yaml | 23 +---- drivers/thermal/qcom/tsens-v0_1.c | 95 +++++++++++-------- drivers/thermal/qcom/tsens-v1.c | 22 ----- drivers/thermal/qcom/tsens.c | 19 +++- drivers/thermal/qcom/tsens.h | 6 +- 5 files changed, 80 insertions(+), 85 deletions(-)