From patchwork Wed Dec 21 02:05:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 635808 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 3680DC4332F for ; Wed, 21 Dec 2022 02:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbiLUCFu (ORCPT ); Tue, 20 Dec 2022 21:05:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234356AbiLUCFg (ORCPT ); Tue, 20 Dec 2022 21:05:36 -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 01E9020356 for ; Tue, 20 Dec 2022 18:05:34 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id g13so4675589lfv.7 for ; Tue, 20 Dec 2022 18:05:33 -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=8esKx8S7sc+Ikm/lxRjH7mI5mO3ckUZswKh/6CRSk80=; b=RnxFcBdJCboA2a1MFYkKgygb0YchHL9pjxD3Kn8TPSwC8P3EFHw+ZquwgpSNT0ZE2Z KBUbVm1Bmh6nBHVbtqx7/WhVWLCx0YMYpennSWMn6ztgcX1yZD0uFgE9OxQJIk7OPSCA gT4yQPQUCRu9MPUoi7FJiS6iEUDxIJcFlUEp8fiwHBtO7ZZNnkXkF6boqlwnXP/2tyMF 4qY+h3dhczCRZ/aKohcheHoOIaNZn1LSoQUYH3uU2Ac3RTDcoS7GaF/28YwsYfHx7GgB k80w5+V/e1CJYoQOmNDzV682KgV+S6qQT3e7qClWHWIu7ocDzG6DCitMSbwcyY7kMp+H 6uxw== 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=8esKx8S7sc+Ikm/lxRjH7mI5mO3ckUZswKh/6CRSk80=; b=HRqKy86ysBmfeRMILK40sSdEDj3/1DFejqFBzDZlSkKd8WiQSyBjaqhuRZ/D628Wqp AuRlSMIxg2I/4tq/8GA/q7DMTVl6Y388mMFmnd6zpCd67YGV4/RHibX+S1M55ZxUo/VA z9spiufVUaZ3WOfXKqiBX0MNJ2gXz8HrPcR0tWEfvCBHmKTHk5gcJC+yJgfbJe+l7ufT 3jCJq7pUGwhKgIT6Eqe4yva3xV32phdpJdUks1qUsJY8Bsmlf8eq2jPUBY79i5A8revC 4lDCjtjEDqp7kj8IKxnFg8PgVYD5s/rmZKUEORDragjGKItVFF5/8aMDnNzO+i+Gepxr AEtw== X-Gm-Message-State: AFqh2kodgOinjtAF9E5Xwi/+9z0oss8fkNoVtK1/USbOGAppq/sWaNms /fEb8ovm+0xafhWO/1SpIzc6Nw== X-Google-Smtp-Source: AMrXdXtYUgxdnROakETE2KiLSyHjaR1n8cZvC+Xr0AEkNsDD6Pz9yq8WCmDfQsNdaE4O0CNq3ZXtjw== X-Received: by 2002:a05:6512:3d2a:b0:4ae:7974:7d32 with SMTP id d42-20020a0565123d2a00b004ae79747d32mr1840575lfv.29.1671588332373; Tue, 20 Dec 2022 18:05:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 18:05:32 -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, Shawn Guo Subject: [PATCH v4 13/20] thermal/drivers/tsens: Drop single-cell code for msm8939 Date: Wed, 21 Dec 2022 04:05:13 +0200 Message-Id: <20221221020520.1326964-14-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 There is no dtsi file for msm8939 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on msm8939. Cc: Shawn Guo Cc: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov --- drivers/thermal/qcom/tsens-v0_1.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c index d3f46f44c1e1..7ebf5a2ca452 100644 --- a/drivers/thermal/qcom/tsens-v0_1.c +++ b/drivers/thermal/qcom/tsens-v0_1.c @@ -149,30 +149,6 @@ static int calibrate_8916(struct tsens_priv *priv) return 0; } -static int calibrate_8939(struct tsens_priv *priv) -{ - u32 p1[10], p2[10]; - u32 *qfprom_cdata; - int mode, ret; - - ret = tsens_calibrate_common(priv); - if (!ret) - return 0; - - qfprom_cdata = (u32 *)qfprom_read(priv->dev, "calib"); - if (IS_ERR(qfprom_cdata)) - return PTR_ERR(qfprom_cdata); - - mode = tsens_read_calibration_legacy(priv, &tsens_8939_nvmem, - p1, p2, - qfprom_cdata, NULL); - - compute_intercept_slope(priv, p1, p2, mode); - kfree(qfprom_cdata); - - return 0; -} - static void fixup_8974_points(int mode, u32 *p1, u32 *p2) { int i; @@ -352,7 +328,7 @@ struct tsens_plat_data data_8916 = { static const struct tsens_ops ops_8939 = { .init = init_8939, - .calibrate = calibrate_8939, + .calibrate = tsens_calibrate_common, .get_temp = get_temp_common, };