Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5176045imm; Tue, 12 Jun 2018 03:58:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIRZ/CPB5Eb4bQN1TdaNIkzjTaPh/XxtWcAmo4Rq3rZV1Fc9NTX7NTMZP8wYzu6gHEJPpBR X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr3474412plo.97.1528801104121; Tue, 12 Jun 2018 03:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528801104; cv=none; d=google.com; s=arc-20160816; b=Dm7S7q6GPRuxHkEFyuUzKlfAVJd4c66EwDSHRGRb5UK54IZ/zL6Y2VFCK4g/PP3Pzc UuX8TsWyTHSpIXoM+iLbM03tj7m1NTfW23P3SnGYKQNqII3ASMIjK+K5vp58/tGCnngx 18dFjQPpXg2Ywr6GeHhfhz5F4s6IEMmGawP5MMgRga1/F3sdePfj478dRqmgVNQ0JkTB gbf6RWba3UyIEeE7g6dwscGGagO1t1VYI1XV7CzDx4YAC6MrV1hsOmnEX9K6W2zJ3SdF k5yl2/0pJdRrJXDAGyFpn5ZBySisEBY2vl3bkDc75xlpw2DibRYBivUxV1xnspW1qBGc nE5g== 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:arc-authentication-results; bh=fzBlCrJ6jeGfX+l3042a5feqkgUj0LvDkEEkOYZ6UKs=; b=Dg+bVJvGWWS1RbBbnZYH6P1xps5HEfVqKzNQVLSWpgF0AiTbfj3f+DE2l+BtPjWoEG N6pRwkV+H7Uw91LdaYkmFFbv+E77MDpzlPrAu9j9fZF+J0QGKRH4r3BgxsRXu8uvVr6g Ns3kMcdY6j1Tx+kkLLK46nLPTdlTreKDrQL7zJTk3fPI6JCUeOhozMijcn4y9Ei/GLIC cawwWrTJxTqy+yoeeoBATSLE/rVBcjsTJpxseUXr1I8Aw5bhSDSEMDn6JGOBn5HvPQkw MLtfYHA5Xq+TgqVG0aMbDCNRVnOKQYlNKxVFUkvar2gPLTmp5Il0pzZ5KawdGy9tqCm2 nRMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IwQn0X/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d14-v6si721317plj.57.2018.06.12.03.58.10; Tue, 12 Jun 2018 03:58:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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="IwQn0X/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1754312AbeFLKz1 (ORCPT + 99 others); Tue, 12 Jun 2018 06:55:27 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:42413 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752705AbeFLKzY (ORCPT ); Tue, 12 Jun 2018 06:55:24 -0400 Received: by mail-lf0-f67.google.com with SMTP id v135-v6so35288356lfa.9 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=EYBigj/mAuBFZzy89Ss1r4iuQO7jfhnXNo37P5lpn6Io5T7LFts9IglZwqJHbfRPH3 ug+/h2xo0S+F4Utv6IDen0kyHVslCYcWqpEx3ppSadhuyrwInMk7y6AGhPc5XO1IK2xW D+i8+nPFHqbCT8vtgsVjTB1c447UXyEkWveh47ICdEmcGYetozGZu0VOHeIJ7vJrYZ+t EERoB15isX7niSEJEcdbk644OquWb7LV6Kqzy7kofRvTZ9NdWSwTff7NhIUldfyuGn/L 2E8vdyvLjMsmie8MfPYGqi4Ci5IdkA9X3AKpAcmb5XeBR9/6P6PPnGGAPs1DUy3KEsaM BpPQ== X-Gm-Message-State: APt69E3NDB4xW7C8VgzpKDzdC9coi+BapVPkRQ06xRoFfIoXjR3aJwsc mHqFqpcs0MJ7CVrxhSkrC7/fym9wvU4= 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.7.4