Message ID | 4a91bf86d985129397312c25dec1f1f559c1ab53.1551355503.git.amit.kucheria@linaro.org (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Andy Gross |
Headers | show
Return-Path: <linux-arm-msm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6640D1390 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 28 Feb 2019 12:27:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 573B52EC05 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 28 Feb 2019 12:27:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48A1B2EC21; Thu, 28 Feb 2019 12:27:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0D182EC05 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 28 Feb 2019 12:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731408AbfB1M1Q (ORCPT <rfc822;patchwork-linux-arm-msm@patchwork.kernel.org>); Thu, 28 Feb 2019 07:27:16 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46602 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730829AbfB1M1P (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Thu, 28 Feb 2019 07:27:15 -0500 Received: by mail-wr1-f67.google.com with SMTP id i16so21693338wrs.13 for <linux-arm-msm@vger.kernel.org>; Thu, 28 Feb 2019 04:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=7ih+SAWN2J6Z2DTnoiDcjijOHCsTs+vEB5wC/EgIIos=; b=yybSd7203embm0NYsxNwm95uzUGP+CtRXYUpVnrMV6voOiY0xfoVISdxp0yynAcVRu fU8UD2J9H9uI8m9klpBCGZeuPKToibFTit6Ls+IqvKCb8jcD5aog+tR08vxrABM+yuoU alVSOh33ZYgI4kcRsijx0VcuUUh4gD3ooInN9ourrBZgcUBSPNIas/0IhpyXlMsSawjc QhO8bpQluxVBmpPmWJU56c0r0samQcP0PpnsPeCmiNT+cNuijKMi8mvZKhCFEWCMSbT0 mjWaz8mvy05xGERmuwrFCmiAY0ZHAWi7Cma1D2QSbi9YQsRaszDiKRPQCkNhnTvHJffW ohGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=7ih+SAWN2J6Z2DTnoiDcjijOHCsTs+vEB5wC/EgIIos=; b=mB+QNuJXMswUXZ++Iql9yVR/xzCy2tJtNuQ++JvdpWWADthMo0y3PNl1mBhk7nAStX vJpj5tX0HI4Ds2xAVZr6NrQawEsy9lJn4TWdS/4N6xpl9WEhfjDKNAiBoDBW5U430Xq1 qecvxBpEu4YvQ5LxwZ9B8tk1LnkqHanAETqvnyFlu69KhHIDavdKSEcsk3m4BTdxN79I yJihvNtGa3L7m2XHqeJ9lbDO7nT4c3PG3jnpfVKC9YJikHA2Kk/pQi9WNDZEe31Qbs5y 6UrpeoQimxNIm+Az3Plhog1oHUnfYig0tP2psdgw9WCP2dSjTxHuzIB+LYduMt8JH56C eouA== X-Gm-Message-State: APjAAAURDsLvqkbKa3Ca4S52M5VFCK54yOEwxr+hudi0k0ec8qIplhrY 05o9OH+iE8OfI3DRio+/QxLK7A== X-Google-Smtp-Source: APXvYqwujA7oAdE6q3TmNimn7Z4qELztQdvrFMN03TllecrimoBEVCMihZBIz1SK8eRmXXa3uY9B8w== X-Received: by 2002:a5d:4412:: with SMTP id z18mr6125270wrq.111.1551356834053; Thu, 28 Feb 2019 04:27:14 -0800 (PST) Received: from localhost ([49.248.54.130]) by smtp.gmail.com with ESMTPSA id d206sm7905080wmc.11.2019.02.28.04.27.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 04:27:13 -0800 (PST) From: Amit Kucheria <amit.kucheria@linaro.org> To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, Daniel Lezcano <daniel.lezcano@linaro.org>, David Brown <david.brown@linaro.org>, Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Subject: [PATCH v2 13/24] drivers: thermal: tsens: Track IP version Date: Thu, 28 Feb 2019 17:51:03 +0530 Message-Id: <4a91bf86d985129397312c25dec1f1f559c1ab53.1551355503.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <cover.1551355503.git.amit.kucheria@linaro.org> References: <cover.1551355503.git.amit.kucheria@linaro.org> In-Reply-To: <cover.1551355503.git.amit.kucheria@linaro.org> References: <cover.1551355503.git.amit.kucheria@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
thermal: tsens: Refactor to use regmap_field
|
expand
|
diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index aae3d71d7eed..8d632de2c7f8 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -155,6 +155,16 @@ int __init init_common(struct tsens_priv *priv) if (IS_ERR(priv->tm_map)) return PTR_ERR(priv->tm_map); + /* alloc regmap_fields in srot_map */ + if (priv->feat->ver_info) { + for (i = 0, j = VER_MAJOR; i < 2; i++, j++) { + priv->rf[j] = devm_regmap_field_alloc(dev, priv->srot_map, + priv->fields[j]); + if (IS_ERR(priv->rf[j])) + return PTR_ERR(priv->rf[j]); + } + } + priv->rf[TSENS_EN] = devm_regmap_field_alloc(dev, priv->srot_map, priv->fields[TSENS_EN]); if (IS_ERR(priv->rf[TSENS_EN]))
Version information is available on some TSENS IP. Allow reading it by allocating memory for the regmap_field. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> --- drivers/thermal/qcom/tsens-common.c | 10 ++++++++++ 1 file changed, 10 insertions(+)