From patchwork Wed Dec 21 02:05:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 635813 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 5EBD0C4332F for ; Wed, 21 Dec 2022 02:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234360AbiLUCFa (ORCPT ); Tue, 20 Dec 2022 21:05:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234274AbiLUCF1 (ORCPT ); Tue, 20 Dec 2022 21:05:27 -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 370771FCD4 for ; Tue, 20 Dec 2022 18:05:26 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id b13so21391987lfo.3 for ; Tue, 20 Dec 2022 18:05:26 -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=b1LIXR7d86uJ/gnCpxil12fsOW7FOzRsHJjZeJ/HkoI=; b=HclVv+REr5NwIaoMuw1d8bLAAnbTRhDeUjQ0HE26weyUXPjJVl2hOpUO5nOiichZAX DqB/t/nobzJhVUx36dAqpF6Wa7Jg8e0VYqcOV//56o6+5S5XXKLZMi+vCroW30harIkr Lq3INCadKctkV8UaSWzAyTbO+T4POeXuwUX5f2A9c9TmLEi7uvXIT3sov1ADpFd7HgSe lTHK6ywPzm2o50B4+qwVReuTTwCwY/pSHNQ5rrEBBj/9MD9AhBlcADEboMnaj0KKnM0W FIDLAr8wd+BLXtCBs49o4FFruN0GREMMIKjrWy1VXksDUtkxpUfOioktTDGJA6/MsSHA kotQ== 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=b1LIXR7d86uJ/gnCpxil12fsOW7FOzRsHJjZeJ/HkoI=; b=rvtzrkIVKjX6u/qe4DQ7BGD+cFyXX2lO8s4i0pA03AgvKe+NezXf3mDOSuClZ+bIQ/ EVDwvfuywvXCsfde6KEvVo5QIYGHtl27zNYEH5vNHPFYZtI4RTQti9VOwHpiZe/llB3q UwhBQn0vuoGmWVUsCJCa+Ulz6CYLvyIkQOnl6m4OFkIB1lafVWpvbQOv2ZtmXYyALcmn J3WWE3wL/fEoJ27AYXer/KfGgIszseMptGxB3MLvvEsuHgp9H2D8ug4O+rV4ySc8koEf wIsthW+Ws06iMk+CLhd/woKqYl/Yk9RmBtyScWHWBnCJj016AXYtzIfxMoj03jaZMJRf nY7Q== X-Gm-Message-State: AFqh2korvGwvX4lIH+2mvZL74smCA5EkKyx8W+RPeXpKJUjNr/DhljSB BhwDTS6wxZn+2VjWOq/IBGIGMQ== X-Google-Smtp-Source: AMrXdXvHLDrGA5CuxP2uiBuwfcBRcNhtNAs4l/Dkbyb5wqobzQz8lLk3UhliocDMNtevVFZGKP5TnQ== X-Received: by 2002:a19:6b08:0:b0:4b6:edef:183b with SMTP id d8-20020a196b08000000b004b6edef183bmr44599lfa.11.1671588325794; Tue, 20 Dec 2022 18:05:25 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id q18-20020a056512211200b004b257fef958sm1673048lfr.94.2022.12.20.18.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 18:05:25 -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" , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v4 05/20] thermal/drivers/tsens: Drop msm8976-specific defines Date: Wed, 21 Dec 2022 04:05:05 +0200 Message-Id: <20221221020520.1326964-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221221020520.1326964-1-dmitry.baryshkov@linaro.org> References: <20221221020520.1326964-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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); } }