From patchwork Wed Sep 12 09:52:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 146527 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4617988ljw; Wed, 12 Sep 2018 02:53:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ3wEtjbaCShxb60IdTrUIMbgQJ6apdMyZJN8IfkQ6eUiESetGY2LzAs5/hS2nJGrHeeozE X-Received: by 2002:a63:447:: with SMTP id 68-v6mr1250124pge.409.1536746003260; Wed, 12 Sep 2018 02:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536746003; cv=none; d=google.com; s=arc-20160816; b=VAUYZASI/DCy8Wx2s0aEWD0AchDq4Z3+DkFYoqx4/PXUcaRJOmgeRoryT1uxAKzQwq uUqRQ8mp3mxAxgQ7qOsfl73C+PT88bv5FrA9x4G+CodJUWCHa34iGiK1uvBZe3d6SVzW s4PY4+30zZMGFWkBs0ct8Wh5sASnD8CcZrWZEUDORofdninTOVsA2LxI6s2QGsnSbFkh k/Rv1QP8yOA3NRW9ZuRO6BUf7s4dJ0LdRfQ7gKMIMKb0BLqpfBnBR6dTj2zGzWPOc0JD Lcgk8ymV3rrOUXNgwhwDlJUsWqDe2zSuOAPhmdMRlOhE2tr002tbOmEuSC2GJgy65NA5 sUPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=qpuhBgJaCiXWaajWhjpFTri3LV8sQfdxUNkXmVCKgpI=; b=ZNmD+X5iWX9+KQ70fuHNCrxFpuSFsc3BwNrHjLmDZvcSMz0umuC33/dBy/NbTmXu94 boS31fan3BCo8H7gtYEU4Hxmz5fiApjN7aGWBoTT3lgo8y3a4k4kFX2Y5aensfvanA4F h83BAtg2nQRXle2C0Tc0a763X9G+4E4EIifUeXGfBNoQBKVeav4zy6BEM2RK0MT20lcj kEO09TYILBai6Jk7rImWhZ35o49Qi5IUj/G/otbGFAWvuQlriMa2fdf+q4vQikuvO40Q iNQ35EQgeQesouY0SStVv84o+HiYhw4Sm48iRlKHL1in8wF6StTOHzp1axW1wVtDIBmt uyjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SycIiAHv; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i189-v6si610656pgd.668.2018.09.12.02.53.23; Wed, 12 Sep 2018 02:53:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SycIiAHv; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbeILO5I (ORCPT + 10 others); Wed, 12 Sep 2018 10:57:08 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40933 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbeILO5H (ORCPT ); Wed, 12 Sep 2018 10:57:07 -0400 Received: by mail-ed1-f68.google.com with SMTP id j62-v6so1249180edd.7 for ; Wed, 12 Sep 2018 02:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qpuhBgJaCiXWaajWhjpFTri3LV8sQfdxUNkXmVCKgpI=; b=SycIiAHv1BmYgatd/r4voSBECjv1IBxAcmMFNWaNuhCC+5YIdgP/I+2Zpsm4nTgs2h k+Mnw967dkineftr9due377JFCignP9N7HkKwaZsL98BO9IBbdQ4tN+nozmaTXxviewO 1iWmtI90D7lXOY3gI1e4RJu9y7hkXnU3hiLOg= 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; bh=qpuhBgJaCiXWaajWhjpFTri3LV8sQfdxUNkXmVCKgpI=; b=Vd45KosLH/V0llP92Hz6iFH1nAh/hpCbBsu2syGjJqZIxnfzcigNM9y4SLCS/sRidU vNm+nx/OD0eOpjXfVnTMC0wijrlT5DpDRmQqM9eELw7U3+u51zsvG7Mi2S+Z4FF+yhOZ x2SzY9bFBKQLiVy4nlMnq5TQG3vEqw8jcUldbEIlKZWeE21wT0qtQZU2zGMnLcm0qweT LAo6Og4yvHMHhtD4PSNzZs+lsWm8siHxXjmok9uOhLZlZRsJbMSWJuBttsSpd2gbULtW xpepnYiKP5IRDY6qS4wSBDR/aNvOwsnCFkfy0+h76D8DH4WAI8YDH4l2cfbhKNgIzuif QTqQ== X-Gm-Message-State: APzg51ABO/vB+/Wv2CUFMv6mROdg2FWd0D/ObEbLbjEptH0m9eKrV5Th jFy7uBaypln1/B8Qt0+gqaaj6A== X-Received: by 2002:a50:8dcb:: with SMTP id s11-v6mr26632edh.86.1536746000279; Wed, 12 Sep 2018 02:53:20 -0700 (PDT) Received: from localhost ([49.248.190.214]) by smtp.gmail.com with ESMTPSA id e15-v6sm474292edb.60.2018.09.12.02.53.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 02:53:18 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, andy.gross@linaro.org, dianders@chromium.org, mka@chromium.org, "David S. Miller" , Andrew Morton , Arnd Bergmann , Daniel Lezcano , Greg Kroah-Hartman , Mauro Carvalho Chehab , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-soc@vger.kernel.org Subject: [PATCH v3 00/16] Another round of tsens cleanups Date: Wed, 12 Sep 2018 15:22:45 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This is another series of tsens cleanups before we add interrupt support. This applies on top of 4.19-rc2. Patches [1-6] can directly be applied by Eduardo. Patches [9-16] can directly be applied by Andy. Patches [7-8] introduce a new check and needs review and can then be applied completely separately by Eduardo. There is a *dependency* however. Patch 1 should be applied to the tree before the DT changes in patches 9 and 10. In this series, I've collected all outstanding tsens patches by combining the patches from the v2 posting with 3 DT patches for sdm845 thermal zones and msm8916 camera and gpu thermal zones. Details are as follows: - splitup 8916 and 8974 register address spaces for SROT and TM - cleanups: move to spdx, dead code removal, removal of id field - Add support to map the SROT address space for DTs that list it separately - Check if TSENS IP is enabled in firmware by querying the SROT space - Add myself as maintainer of tsens - Add one-off patches adding sdm845 thermal zones and msm8916 gpu and camera thermal zones to this series. Changes since v2: - Split up changes to code and dt and within dt, split into arm and arm64 patches - Rearrange the sequence of patches so that the thermal maintainer can pick up the first part and the platform maintainer can pick up the latter part of the series - Drop patch 09/11 because it causes some issues on systems with non-contiguous enabled sensors e.g. db410c - Drop patch 10/11 because reg-name property isn't encouraged - Fix a bug on msm8916 to check if IP is enabled in firmware. This was due to the register being at a different offset on msm8916. Fixed by coding this information as private data. Changes since v1: - Split up changes that split the address space and added qcom,sensors property into two separate patches - Remove brackets in typo correction patch Amit Kucheria (16): thermal: tsens: Prepare 8916 and 8974 tsens to use SROT and TM address space thermal: tsens: Add SPDX license identifiers thermal: tsens: Get rid of dead code thermal: tsens: Rename map field in order to add a second address map thermal: tsens: Add the SROT address map MAINTAINERS: Add entry for Qualcomm TSENS thermal drivers thermal: tsens: Pass register offsets as private data thermal: tsens: Check if the IP is correctly enabled by firmware arm: dts: msm8974: thermal: split address space into two arm64: dts: msm8916: thermal: split address space into two arm: dts: msm8974: thermal: Add "qcom,sensors" property arm64: dts: msm8916: thermal: Add "qcom,sensors" property dt-bindings: thermal: Fix a typo in documentation arm64: dts: msm8916: Add gpu thermal zone arm64: dts: msm8916: Add camera thermal zone arm64: dts: sdm845: enable tsens thermal zones .../devicetree/bindings/thermal/thermal.txt | 2 +- MAINTAINERS | 7 + arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 47 ++++- arch/arm64/boot/dts/qcom/sdm845.dtsi | 170 ++++++++++++++++++ drivers/thermal/qcom/tsens-8916.c | 12 +- drivers/thermal/qcom/tsens-8960.c | 41 ++--- drivers/thermal/qcom/tsens-8974.c | 12 +- drivers/thermal/qcom/tsens-common.c | 62 ++++--- drivers/thermal/qcom/tsens-v2.c | 8 +- drivers/thermal/qcom/tsens.c | 19 +- drivers/thermal/qcom/tsens.h | 23 +-- 12 files changed, 309 insertions(+), 100 deletions(-) -- 2.17.1