Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1623032pxf; Fri, 19 Mar 2021 11:17:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxajG8Lc+e5qtdVbX8FgrBzixbIHQ9FCNRyRbXoRAjBVXgPlLv7mTGArkPqVwk6FjLIrYFp X-Received: by 2002:a17:906:f1c8:: with SMTP id gx8mr5926759ejb.385.1616177836945; Fri, 19 Mar 2021 11:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616177836; cv=none; d=google.com; s=arc-20160816; b=HqEzH/+KQCXqQwLX6tChHEbZ7tqgAWpTtn19BZ6w9Qcp8YTSRNiNbOr1W6+2Lf8rX0 9Hr/yMI+YA4bklUv5G+FCbf1P3tXzd+6DXMMkJ4mfnUAapOMFrDZbOY6ju35xn5K5vrf 8cXPrNdZiyr5rcVQUqU0TTeqpwfOdaywqVhf6/RJUVin8Mydlkf8q+NcaCz7DN0sTK/X hcfWGCWo2gjRGCNoZQfdPtS5p6taLYl7FhS6d4mvkRm2rhGYHGFaPIF9TkQseYUbSWpx PD8SQOb1uRz8Fnm+MywMeVoDgGX7q2XzvuWjo8fLICPULeyF3ybIgKjcLy2GQgL2JOWQ DQ0A== 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=rvQymSNd4Qb5Mspdq6AbsSN2FgRpnhG4suLtnPG+1m4=; b=Q6DZGfEUvp4lG1VXB2YY55yGZrnSs63zezPYZTZnUe/lZKF4lDD2nxT9NIrRj2bC8l FvoEliuhqhdc9hIfULsHyeqbhIrfBC55qsX7Ys38jDsmVPaG7v+xw39OVy6kgsKtHOE7 9JUdicK+BzbvJIhO2o2ZK+PY2IxyFJCZWPV4KbIVvuRumaRzqTgWN0F8Fc9yDCJ1Xou9 a4yHBBJVTJgKxpfCWhqsGUbqytmniEmqmU1SkLQZ83iSUfIzi6PGPUuNfoSN9+PrWVtm kZ8zVJNbwsNp+GIdorvjcdR9owCcIrPJbs+kmEXtrbrHraA7gTNBuNwnMfHMbxl1m24w rZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d4JxVeLr; 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 z26si4565587ejw.136.2021.03.19.11.16.54; Fri, 19 Mar 2021 11:17:16 -0700 (PDT) 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=d4JxVeLr; 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 S230391AbhCSSP6 (ORCPT + 99 others); Fri, 19 Mar 2021 14:15:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbhCSSPY (ORCPT ); Fri, 19 Mar 2021 14:15:24 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F087FC06174A; Fri, 19 Mar 2021 11:15:23 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id kt15so1722923ejb.12; Fri, 19 Mar 2021 11:15:23 -0700 (PDT) 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=rvQymSNd4Qb5Mspdq6AbsSN2FgRpnhG4suLtnPG+1m4=; b=d4JxVeLrmEBGRFeGyhtAp6uPjMAnSUwpwax/8enyfl3OyGoFWnfJncHnYz3WrIH/fU MHv60DTc/yt5ZAMVy3ykb7XiORYadjPFgx8XFVDuQ30Rg7X1JNc6BzDWZlUcHIFkQidq DYheeQMbnnpPkH9ZaWea2d/ytSiSzBMLwvVEGV4a8dYGJiRNxW5jEg9NHFkQLduMAGGX c6OeIfgSz/uR/rypO0qkHElM05Z25mJ80+N3Gus9e76JH0QCFPYtzOY5/GnkP88hsc29 cFPzdiw1RR/RrKmMzGc9Q9r1YwzQlZCKwx7lcG3ddGs/JGco1IbzJ5PtGQYOhHb8Eb1C Nl1g== 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=rvQymSNd4Qb5Mspdq6AbsSN2FgRpnhG4suLtnPG+1m4=; b=V+CmxUe3YvT1Y1Bc8NmabkWOW6O5L1pj4+pc9s731yBwUUpmdhqd2p7KTuyFXXfNni 4lsod0vYYGIsaFY1+oar0MtJISHEtiUanlqJRhxfhDTAGzKZxpvJSTNLPgNsFSPUmYw7 Xgwyd54KNIbXEgM9yEYHfwEb6LUll1AbNe2PEmyj3qrEtpF3EWa2Vy5+6NKVKA7Qjlji jswBfcZES8r71nXouaGNgWjX1SHech3m3niOVFsb2WXRyFLCJRohDkWdy5mD9Uoq4RcB /3zqoGLvh543Rg9jZBsX0Arwekrh09d69oaGKF+Vws5+4UPWCy0C6CbPBuPpB3I1iPGe IT4w== X-Gm-Message-State: AOAM531aOocg+RaOvXj7Z6l5/TjBOtoShKjemKYmE0kYe+lz5v6kRIUU AEJFihWKSBwtqijxnNv1I4s= X-Received: by 2002:a17:906:3496:: with SMTP id g22mr6030771ejb.143.1616177722597; Fri, 19 Mar 2021 11:15:22 -0700 (PDT) Received: from Ansuel-xps.localdomain (host-79-34-220-97.business.telecomitalia.it. [79.34.220.97]) by smtp.googlemail.com with ESMTPSA id u13sm4170288ejn.59.2021.03.19.11.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 11:15:21 -0700 (PDT) From: Ansuel Smith To: Thara Gopinath Cc: Ansuel Smith , Andy Gross , Bjorn Andersson , Amit Kucheria , 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 v12 0/9] Add support for ipq8064 tsens Date: Fri, 19 Mar 2021 19:15:03 +0100 Message-Id: <20210319181512.7757-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.30.2 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 v12: * Even more fix reported by Thara v11: * Address comments from Thara (thx) 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 (9): 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: Replace custom 8960 apis with generic apis drivers: thermal: tsens: Drop unused define 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 | 233 +++++++++--------- drivers/thermal/qcom/tsens.c | 151 +++++++++--- drivers/thermal/qcom/tsens.h | 4 +- 4 files changed, 288 insertions(+), 156 deletions(-) -- 2.30.2