Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1662681rdg; Sat, 14 Oct 2023 11:12:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFP0LPWN1HcPZoMZ6FR8UKwIlFHQykk0SoJ8yZJAxhRgzWH56bFssU3t/1gKjT+82nHi/Sg X-Received: by 2002:a05:6e02:11aa:b0:351:59db:a20e with SMTP id 10-20020a056e0211aa00b0035159dba20emr26893349ilj.18.1697307165383; Sat, 14 Oct 2023 11:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697307165; cv=none; d=google.com; s=arc-20160816; b=mxT5SLZ4BC0YeN96B1odKlhrZzuxsFG0fW1ZPbGR2PqvQZfvMB5ldojghwxPx+u9yQ sWgOZmakcvV0+wVbd/XJU5qzMomqfBnOdgObo4PA5fDYYNzF8SSYzkNFIqrv98yesVrI 0SsEJiKSw0gaXfypsgThxOeSjNoTbYE2Mf2jCoL7MWjcG6J5/oEYFQeD6xeFv0fmAMrr hr7+VQjZJ+NxvSFAMppv0cAGgEd8wJQi3vqoF4L5dPflMKpCqf/vhe4EBagyc1Cs+bxY oYvaUW3mzAAdl6UxCe29h8LjAW/Bj65WiPyoZ0995DxMfyD7Ieg89iatfpCIT8BZ1uqD MSDA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kHJGY0Gkk/+jL1OX3znux2DxtmP4gRkAXUtc4AdxGTM=; fh=A9XovJT1wOryjHac5eP9X20vWrhrlrfiswcy7FhI0Q4=; b=C28F3OPIHNiHjjtHl/kLQcBoMpsWfbJjcIAdS5i7SXrm9+pAu78XqH5truRyXxF0TM 5H4u23w0x75OLwDf06bn+bHAS4z9hX9oHpZIUrK+Lt94LF/3aWZkdh7Dvjotiq78LRpj crLipEm6gAWFbuxIeBWEepyov6vfVGKOGBPneA9ok8BJlI2/ZQurbfz1UlXM5Htda09H OEyz+B1XgHia1rrQGQaO7aGG0jpyMECbJVlMaMiVzY4sCRZlYYT24551gyd1ZGzA2TyM HjREvQmS8n4TfiOJxVL/pF+1c+cKTrPQoBccDHh6OTB9NzE8+oKxnXlPfNHeuC8pKKdX V+cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=LHxU4RsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id fw18-20020a17090b129200b00271ae22eea7si2700339pjb.117.2023.10.14.11.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 11:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=LHxU4RsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 05C2380490A5; Sat, 14 Oct 2023 11:12:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233237AbjJNRx2 (ORCPT + 99 others); Sat, 14 Oct 2023 13:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbjJNRxV (ORCPT ); Sat, 14 Oct 2023 13:53:21 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ECAEAD; Sat, 14 Oct 2023 10:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1697305966; bh=J6E11bWGXsldQJECPuC0snlXP/OiLacD+sKcuNZkyLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LHxU4RsKfzcPKNkWGel5p6xLlzZot7D1l8dhZ9lLIxbaXNCMd4FC1OB/U8Ssf79/n MRk5MCU616km8zpjji8NK9FHAeUkHJh5ryfc96F1b2QWlM9UKZf8sK8e8YIMBgRR9u 1szYjx1LpkM4vHvGmBo9aLbB7BcpbQfyxve76LIo= From: Luca Weiss To: Luca Weiss , Andy Gross , Bjorn Andersson , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , ~postmarketos/upstreaming@lists.sr.ht Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Konrad Dybcio Subject: Re: [PATCH 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7325 thermals Date: Sat, 14 Oct 2023 19:52:45 +0200 Message-ID: <4958673.31r3eYUQgx@z3ntu.xyz> In-Reply-To: <34da335e-cbcd-4dc2-8a86-f31369db1fcd@linaro.org> References: <20231013-fp5-thermals-v1-0-f14df01922e6@fairphone.com> <20231013-fp5-thermals-v1-4-f14df01922e6@fairphone.com> <34da335e-cbcd-4dc2-8a86-f31369db1fcd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 14 Oct 2023 11:12:41 -0700 (PDT) On Samstag, 14. Oktober 2023 01:13:29 CEST Konrad Dybcio wrote: > On 13.10.2023 10:09, Luca Weiss wrote: > > Configure the thermals for the QUIET_THERM, CAM_FLASH_THERM, MSM_THERM > > and RFC_CAM_THERM thermistors connected to PM7325. > > > > With this PMIC the software communication to the ADC is going through > > PMK7325 (= PMK8350). > > > > Signed-off-by: Luca Weiss > > --- > > > > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 117 > > +++++++++++++++++++++ 1 file changed, 117 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts > > b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts index > > 2c01f799a6b2..d0b1e4e507ff 100644 > > --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts > > +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts > > @@ -9,6 +9,7 @@ > > > > #define PM7250B_SID 8 > > #define PM7250B_SID1 9 > > > > +#include > > > > #include > > #include > > #include > > > > @@ -137,6 +138,20 @@ afvdd_2p8: regulator-afvdd-2p8 { > > > > }; > > > > thermal-zones { > > > > + camera-thermal { > > + polling-delay-passive = <0>; > > + polling-delay = <0>; > > + thermal-sensors = <&pmk8350_adc_tm 2>; > > + > > + trips { > > + active-config0 { > > + temperature = <125000>; > > are > > > + rear-cam-thermal { > > > > + temperature = <125000>; > > you > > > + sdm-skin-thermal { > > > > + temperature = <125000>; > > sure > > about these temps? (email from my other address, quicker right now) Well yes and no. Yes as in those are the temps specified in downstream dtb. No as in I'm 99% sure there's user space with definitely lower threshold that actually does something in response to the temps. I didn't look too much into this but does the kernel even do something when it hits one of these trip points? I assume when there's a cooling device thing specified then it can actually tell the driver to do something, but without (and most drivers don't support this?) I'm assuming the kernel can't do much anyways? So e.g. when the temperature for the flash led is reached I'm assuming downstream (+Android) either dims the led or turns it off? But I'd have to dig quite a bit into the thermal setup there to check what it's really doing. But for now I think it's okay to put this current thermal config into dts and we'll improve it later when 1. I understand more and 2. maybe some useful drivers support the cooling bits? Regards Luca > > Konrad