From patchwork Sun Jan 1 19:40:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13086456 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 195EBC63705 for ; Sun, 1 Jan 2023 19:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbjAATkp (ORCPT ); Sun, 1 Jan 2023 14:40:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbjAATkn (ORCPT ); Sun, 1 Jan 2023 14:40:43 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E9210AF for ; Sun, 1 Jan 2023 11:40:42 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id bf43so38893209lfb.6 for ; Sun, 01 Jan 2023 11:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FlcwXoa9Z1Zub33BGG0XBB+zLvZVGpO/Coytg4v1lJY=; b=SDqkxDlDL+GygwSeARvDRp57SXFiWrze7Y1D45ROj0ydxpgybJT87aIiDonEsVDkRs 2pDlPlbz18w1BuuqLs31QhP0VGVOCkVMsu21sWM0UqBdhwJCX2etdBUFWBYEuF0WzlZW lWSopJVw2WRmqvnK4y/14eSbZ+bSFj12u7t72HNN++frkHnTqt7uF0ymaTZvfc9EGeiS 3JgefkbmItiPSApDZ1Y+ZRFXeooWA4DI/5a6qFtoAAg9dU+KcfJvZVw2n01kmxmcxJFX NiGKBOL9HHj41+RPhN1afljQ+0mmrFQOA3MqhCLSrHa7XGeH08o9trJwJ1qFaETi71UO Ir5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FlcwXoa9Z1Zub33BGG0XBB+zLvZVGpO/Coytg4v1lJY=; b=Fb+g3MkiERnJqK38z824yS44sFB5+WrQGN+6GqR9RNMieYlbVMhZmqE5fJRA031y7p fECQdDkG0cllMRDSjtUm5psmxSNOpr7XHmeTPdnkh0v3E7sBixN1M++0I36+sVoHavTu /S7Z1zuP8UpvOqMuiyYmAMUWdq62xlNj65JqyrutY7xsxnk4RYjkHJEhaiOr/3hnOSlu X9sRvGxFC1ucM7aF5WvhwH8nZHCNRMH1Qr+BuP+idFOl30NvooAQVFueysUfxs+2SPLZ L0em6HImYgT+gU/Puy+O5wLSPQUk3Bx45533ni2nk/EhLMzIPmAk3hkKrFp9E3Xdj51u +0Nw== X-Gm-Message-State: AFqh2kpRX11phmWxri37LIDHyJdVYZarVonMQMvxcI0tQtayWqtHepuJ +SCu+Eaz/C1hmJXK796WBpWi5g== X-Google-Smtp-Source: AMrXdXvV6q1pi6fVP69X0degnRtUtgfPef8Z4BiP2r24SThja+jtExZwCox096GQWwYjJV7PsgNH9w== X-Received: by 2002:a05:6512:21c6:b0:4b5:83b8:2c49 with SMTP id d6-20020a05651221c600b004b583b82c49mr10173890lft.1.1672602040577; Sun, 01 Jan 2023 11:40:40 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id w11-20020a056512098b00b004a100c21eaesm4228013lft.97.2023.01.01.11.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Jan 2023 11:40:40 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui Cc: "Bryan O'Donoghue" , Shawn Guo , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v6 05/20] thermal/drivers/tsens: Drop msm8976-specific defines Date: Sun, 1 Jan 2023 21:40:19 +0200 Message-Id: <20230101194034.831222-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230101194034.831222-1-dmitry.baryshkov@linaro.org> References: <20230101194034.831222-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Drop msm8976-specific defines, which duplicate generic ones. Fixes: 0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976") Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/thermal/qcom/tsens-v1.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c index 96ef12d47bff..a7f53966156b 100644 --- a/drivers/thermal/qcom/tsens-v1.c +++ b/drivers/thermal/qcom/tsens-v1.c @@ -78,11 +78,6 @@ #define MSM8976_CAL_SEL_MASK 0x3 -#define MSM8976_CAL_DEGC_PT1 30 -#define MSM8976_CAL_DEGC_PT2 120 -#define MSM8976_SLOPE_FACTOR 1000 -#define MSM8976_SLOPE_DEFAULT 3200 - /* eeprom layout data for qcs404/405 (v1) */ #define BASE0_MASK 0x000007f8 #define BASE1_MASK 0x0007f800 @@ -160,8 +155,8 @@ static void compute_intercept_slope_8976(struct tsens_priv *priv, priv->sensor[10].slope = 3286; for (i = 0; i < priv->num_sensors; i++) { - priv->sensor[i].offset = (p1[i] * MSM8976_SLOPE_FACTOR) - - (MSM8976_CAL_DEGC_PT1 * + priv->sensor[i].offset = (p1[i] * SLOPE_FACTOR) - + (CAL_DEGC_PT1 * priv->sensor[i].slope); } }