From patchwork Tue Jun 12 10:54:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 928262 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="IwQn0X/V"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 414mzw4N04z9s70 for ; Tue, 12 Jun 2018 20:57:16 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754170AbeFLKz0 (ORCPT ); Tue, 12 Jun 2018 06:55:26 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:37973 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754182AbeFLKzY (ORCPT ); Tue, 12 Jun 2018 06:55:24 -0400 Received: by mail-lf0-f67.google.com with SMTP id i83-v6so35291367lfh.5 for ; Tue, 12 Jun 2018 03:55:23 -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=fzBlCrJ6jeGfX+l3042a5feqkgUj0LvDkEEkOYZ6UKs=; b=IwQn0X/VnpS752Ed7tbdQHkRuAp1uYmuwUUaIBbyvFAbgq7lKE+mlSUu/tRyLpJi+S Qflf4SEqtjCjaVBX6yL56OqA3LTPpCaX1EYsz8dYjFt2N+/p5rw9kdz3+mXIye58x4b0 xf8U8c8Gbx8weNgYREh38LgarUg56JoaFBdGI= 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=fzBlCrJ6jeGfX+l3042a5feqkgUj0LvDkEEkOYZ6UKs=; b=p23KlPIBTIEbIpIn8OM2KBN0SDiyvzSxtQUBV8eEsDweB0u/FEfFi8SHlywF53lYF/ FqxGYb4M7bGGpLLfz7MavzFp34lm2QjR7apvm9e04+cg6LGU/vDFbJyClgCL55skkO1d yhDingwc1OIZYPOF2JLavZ2e2p6TYlb0uRQsexL99mLTQ8j9ZtE3Ft8wMTO42iXvaquA WYtuA/CxjEuO888e+Dr7ss2cDHCnOjwyKUoF82kte5oEG1CuT24r3iU0KXWJ4B0bStaO a/eieob2K7X5xDaqd5EPsArCYBcpJCQesN7D7nX28RAm2s61CzFwEib/QHCTaNYeyl4N TWBA== X-Gm-Message-State: APt69E2Unx1QiYMuKgPnmuNzbOfVdHJWX2cNkM1YLZz3OzzHhKr3OYwc NVvUKJ0QW8EBv/kvZe6r3AeDEA== X-Google-Smtp-Source: ADUXVKIF7Dz/ElVHISu/w+S+b/U1L49lgwZOFHCO63XkUN4r6rVtKC/S1zj8BBapeeNZZOpQ1iHKfA== X-Received: by 2002:a19:f71a:: with SMTP id z26-v6mr1747999lfe.137.1528800922743; Tue, 12 Jun 2018 03:55:22 -0700 (PDT) Received: from localhost (85-76-96-64-nat.elisa-mobile.fi. [85.76.96.64]) by smtp.gmail.com with ESMTPSA id i21-v6sm144516lfa.18.2018.06.12.03.55.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 03:55:21 -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, devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-pm@vger.kernel.org (open list:THERMAL), linux-soc@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT) Subject: [PATCH v2 0/5] thermal: tsens: Prepare for version 2 of TSENS IP Date: Tue, 12 Jun 2018 13:54:52 +0300 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This series is a mixed bag: Some code moves to deal with version 2 of the TSENS IP in common functions, new platform support (sdm845), a cleanup patch and a DT change to have a common way to deal with the SROT and TM registers despite slightly different features across the IP family and different register offsets. I can merge the tsens-8996.c and tsens-sdm845.c files into a tsens-v2.c if desired. Changes since v1: - Move get_temp() from tsens-8996 to tsens-common and rename - Change 8996 DT entry to allow init_common() to work across sdm845 and 8996 due to different offsets Amit Kucheria (5): thermal: tsens: Get rid of unused fields in structure dt: qcom: 8996: thermal: Move to DT initialisation thermal: tsens: Move 8996 get_temp() to common code for reuse thermal: tsens: Add support for SDM845 thermal: tsens: Check if we have valid data before reading .../devicetree/bindings/thermal/qcom-tsens.txt | 1 + arch/arm64/boot/dts/qcom/msm8996.dtsi | 12 +++- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8996.c | 74 +------------------- drivers/thermal/qcom/tsens-common.c | 78 +++++++++++++++++++--- drivers/thermal/qcom/tsens-sdm845.c | 15 +++++ drivers/thermal/qcom/tsens.c | 3 + drivers/thermal/qcom/tsens.h | 8 ++- 8 files changed, 107 insertions(+), 86 deletions(-) create mode 100644 drivers/thermal/qcom/tsens-sdm845.c