Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6890362pxb; Wed, 17 Feb 2021 17:00:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9gTMlyoZgcu+XVTuWfsA5ZopRbBsu4vEOFy7CdZxLESz15PEwQsLdBRGFadTp7mRkJYjG X-Received: by 2002:a17:906:d1d0:: with SMTP id bs16mr1589315ejb.468.1613610030627; Wed, 17 Feb 2021 17:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613610030; cv=none; d=google.com; s=arc-20160816; b=MZc/7pV1376oJZ7s+v2g/FRNfDoqJcQpnTHPLMX34PpqXfu2WGHd9U0UuGuxr3F0Hv Y+USmeIYHPKUG7838sumAheqyuDX9Ot3rx2oybMz5SAuX3MHm8vCdxtOTmWCRiwB0cgZ Mk1NyHWMrOa5FqSJ3CZpz8x0D+kv3R40c9Gg1I8cvRNDtrhmUydfmaAg+8pXWW+N5ok2 bbNgZ92faoayt2d6O9xXNZk57YQYNqGj07vRkGZHj89Ohp2UvjXxViVK3slpVgR21m/X V+GU0P4j8/Dz4dtBjEgJ+/yv8SxXTztgV1Z9u3hO4mRNeH5/sy6XmrKwJ1oW4aX/nS0G bDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FCJCzhNXbsE4bF7PN36Quy90Qz5EMXU0oUIaA6ESrcM=; b=VDgmqsctMVuZdhDQ52YMAgFQYFNLK88WftxKdrdxC4Td/ccq+3r438aNQwntDOkUWC u9vmaMHiPeioKNlZFHtdWE/gSNY9RFGdV3G6zxGD5s8gB/vXE1WiCsiJweuGMq0To274 c6gfU92YL97ToNSYiXtMe2VnoeBkwHDiuzYHfp6Hokjo4CqIsDdgurpP/gGNvLs2gFsr scTft0f/te8W89NIwr4wOiWG70bdvB/QE+WPIiAIQ+aMkqVLTVAz+lcDTpmB/liKnnUF sou2wdkDMzNOEYvtLIyd13weYwumW4EkcfOK9ny0wzD/hjR3krL3OADOmIV+FXjMsMZL fgDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmLXRhQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 89si1062103edi.496.2021.02.17.17.00.07; Wed, 17 Feb 2021 17:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmLXRhQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhBRA5A (ORCPT + 99 others); Wed, 17 Feb 2021 19:57:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbhBRA46 (ORCPT ); Wed, 17 Feb 2021 19:56:58 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF75C061574; Wed, 17 Feb 2021 16:56:18 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id 7so812877wrz.0; Wed, 17 Feb 2021 16:56:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FCJCzhNXbsE4bF7PN36Quy90Qz5EMXU0oUIaA6ESrcM=; b=YmLXRhQRekT3mB2ptuUP4hRa08NhT5i1HSwvLXJ7ARaRMbgnCa88/DlTVydybrs3kh zJRxGQo43U8Cwnxic7D0HJOcquf8iu3/BX7uGjlHrC7vXfVTwOs9j3Ao1uyy9t0S7z23 FcPlk1mozIQBnV+mGaQOv0RYoNZdFVjvCLVA7gSQ+oKFLAJ0UpN85wM7N82JThViZLM8 ylnKgQNYuGDSjMH9Q6W9DIajF3VoT4X9w1y11G2P2Y29srbIfVjivsCTYWtfb3Gkisul kEJC4n5YvVAY93/e02t0jjGllbKmIaFRrPwUjatsDeqeXluzR/vB6rTT4UcFf4/hva/P WJYA== 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:mime-version :content-transfer-encoding; bh=FCJCzhNXbsE4bF7PN36Quy90Qz5EMXU0oUIaA6ESrcM=; b=T947pzpy8/8z4pZcavTHoxaFOIZrnfdHuqsB72eTZO6Q5mc0cghuLrS+WE6tvAiOMg HGSCPFYKSM/8DxUdCJP/wJIHSwsLov3CIEsIDZbM0CYryse1cPV40p2krIMnsf5Qh50V HASb+vSqmFFhEd+aVYBtrzqLCNKbKEA5vaai1xpUL1fxhtLuJNbElJgLveJCfAqWWVWv Mk7DzU9hs+yHuUHsAazv4/Z/bw9Dc2fnR/y2ChcX2kCZERYSjgqkJNzrpo5kFg4jpZKY 65nq4ZE8RZIOZ8jy+Cfsj2TzdJOKoGEmKrWRBi50OGpWiOWfUfNVOKj0E1r+tBz1sAPE BjFw== X-Gm-Message-State: AOAM532FTPnHwC9mOwCjtuyREyEgVWdnPtPaGFDYgMO2wwutojW3BKzW M4CkiHeMQkA2exDXY88HqSE= X-Received: by 2002:adf:f543:: with SMTP id j3mr1685936wrp.203.1613609776999; Wed, 17 Feb 2021 16:56:16 -0800 (PST) Received: from Ansuel-xps.localdomain (host-87-11-13-110.retail.telecomitalia.it. [87.11.13.110]) by smtp.googlemail.com with ESMTPSA id t16sm6336079wrp.87.2021.02.17.16.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 16:56:16 -0800 (PST) From: Ansuel Smith To: Amit Kucheria Cc: Ansuel Smith , Andy Gross , Bjorn Andersson , Zhang Rui , Daniel Lezcano , Rob Herring , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v10 0/8] Add support for ipq8064 tsens Date: Wed, 17 Feb 2021 20:40:02 +0100 Message-Id: <20210217194011.22649-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset convert msm8960 to reg_filed, use int_common instead of a custom function and fix wrong tsens get_temp function for msm8960. Ipq8064 SoCs tsens driver is based on 8960 tsens driver. Ipq8064 needs to be registered as a gcc child as the tsens regs on this platform are shared with the controller. This is based on work and code here https://git.linaro.org/people/amit.kucheria/kernel.git/log/?h=wrk3/tsens-8960-breakage v10: * Fix wrong tsens init for ver_0 (crit_trips needs to be set in tsens_register) v9: * Fix warning from Documentation bot v8: * Drop MIN and MAX THRESH and use CRIT_THRESH instead * Fix broken documentation patch v7: * Rework calibrate function to use get_temp_common * Fix wrong required in the Documentation for ipq8064 * Fix hardware bug in sensor enable function v6: * Fix spelling error (can't find the problem with variable misallignment) * Rework big if-else * Remove extra comments * Add description about different interrupts v5: * Conver driver to use reg_fiedl * Use init_common * Drop custom set_trip and set_interrupt * Use common set_trip and set_interrupt * Fix bad get_temp function * Add missing hardcoded slope v4: * Fix compilation error and warning reported by the bot v3: * Change driver to register as child instead of use phandle v2: * Fix dt-bindings problems Ansuel Smith (8): drivers: thermal: tsens: Add VER_0 tsens version drivers: thermal: tsens: Don't hardcode sensor slope drivers: thermal: tsens: Convert msm8960 to reg_field drivers: thermal: tsens: Use init_common for msm8960 drivers: thermal: tsens: Fix bug in sensor enable for msm8960 drivers: thermal: tsens: Use get_temp_common for msm8960 drivers: thermal: tsens: Add support for ipq8064-tsens dt-bindings: thermal: tsens: Document ipq8064 bindings .../bindings/thermal/qcom-tsens.yaml | 56 ++++- drivers/thermal/qcom/tsens-8960.c | 203 ++++++++++-------- drivers/thermal/qcom/tsens.c | 181 +++++++++++++--- drivers/thermal/qcom/tsens.h | 4 +- 4 files changed, 314 insertions(+), 130 deletions(-) -- 2.30.0