Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2370084pxb; Fri, 17 Sep 2021 08:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkBojMv8itEoQyT95FNXIhZ9AXUVL8fkH32Ytt6EDqPOFlvzalvxFTrnjIB26EUAZe+hY/ X-Received: by 2002:a05:6402:5c2:: with SMTP id n2mr12851240edx.239.1631891921966; Fri, 17 Sep 2021 08:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631891921; cv=none; d=google.com; s=arc-20160816; b=r/5ypDTOuNX14ui/IxqsOyRqImKoP6bw3QJ0Dd53ZHOFPgtO0SXLMGMh616I+WqoCG YAic+Jab9Hs7CsEr6SquPgUkGtFkj3iN5YUVlW0GgjNcEgymOSa7w0/F7u4yASlK6r2D q/w6DfwvLByo5uFpr5QBSgj1XilXB0hdQcI4zjcHnc3+5mUliphUC7dLsf5f4DzYMhJE Np+80w1zrwa8oRrn/CNDYQNMCMAiaXeoJf+jiqPftpHCX2xLbs7JoiXQXUIEs8zYxECc csW3dP7k7//7kfLurN6yb15omgPzXYhSc/oZ3GpAUATr5CEm8M5BSM+zgB5VBInLVcFK 2hHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=cElMJoeY5hvMr2V5LH+iZNPc0N3os4Ky0d4P23ZLkkE=; b=TdYPT/ZuFJWa6n4zbt9LsrSX7c+0IKVs/E1Mzl7XiPR+bkKdUwdIvwDquhmAn4ldiv sUG6K+MSEAjsJXfK+ZwG3a8ddiW0U2ZHz8XsYRpqg+tZbaobqiDgjRPu3CESkqx7M1vS LqLDIfNlToJ36DQrSjW4JtfSokiFkXI0AQ5T24xufE7vQUf1z9LsDkVT98atBGLddMyN l3ajMtQpSX6d6YhUcTRTYv2mztHMl4IOhYjmwi/Hm4ph04+QpW+PHbuAuOO8QFoxAYNe LDAr6GKijB4YYw3GZB04Q9GuzW770MjH51TzxgqMs0IVhchwA3uCY9LumMG4XLWrTW0F hw1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yxWaRcX1; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si7115471edj.456.2021.09.17.08.18.17; Fri, 17 Sep 2021 08:18:41 -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=@linaro.org header.s=google header.b=yxWaRcX1; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234664AbhIQOFC (ORCPT + 99 others); Fri, 17 Sep 2021 10:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234531AbhIQOFB (ORCPT ); Fri, 17 Sep 2021 10:05:01 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE32C061574 for ; Fri, 17 Sep 2021 07:03:38 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id g16so15373610wrb.3 for ; Fri, 17 Sep 2021 07:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cElMJoeY5hvMr2V5LH+iZNPc0N3os4Ky0d4P23ZLkkE=; b=yxWaRcX1qbRGyttjQa1Pu6jM/hec9mQl0xer5eL4GeQQ+1dn6FvLc3GE/Pvl8V6pyo iOdk9dhgRd02eOwh+gf99oJvQfM0aFqME0t+6q3X9518yk07+yHUqNIbfKmV1/NNbAWF ayqthRKvn7hrFvlohYQuI++mvYKeLN/1WbP7vuq0nsQuLxJRfvFsF7BlW9muZxjzBwhs R1dMP5fTeosIQWA1nXAD/D/YMxHCKisgTYgY6M93GMj7JhbnE6WTr/MijVnMdCoWiIfC wLY9bhR8R09535t3WNqUNITU3Sy7C6jr2QyEzxLTvENgyP+QJvlctIzdasUGkxdzjUur 7QhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cElMJoeY5hvMr2V5LH+iZNPc0N3os4Ky0d4P23ZLkkE=; b=R7PkQg5CZX/4mzZl+6HOTXYGl0tWwvnqGyJWASgzXhbDkfLG+0nccIMgsy/hyHDQVf BWDWovpYWcP1FoGcbRbbmBvenyhZ4H22s7tH927/XibTyTSDipUgwXQtbUXyLFhpyMom 6UL6NkBOdll9jn0S4nGrnSRdK3jqv0cILiSKmKv+stFNjRLVv5o/8yj8Br/Ad5eLaF9U LAMTalTKuHGfcg4V41L+EspMC7RuNO7dybAVXbQ9uP5ELask/fEnLaocQ+uFoPjFAD1G HSX0r7DpdSm2A5cxSFHhMVBBe41bS4nHPKWZWt2BcUXKUUvSa61UExy0LP7dLmupZslO arGQ== X-Gm-Message-State: AOAM532jIHkXXrIbadq7YiceekPK0Y1hNMxVtJ3fhNhm95vEl/UQfvZH HA3hFIMqYRoBqZIoYpYBwrUDMQ== X-Received: by 2002:a05:6000:104e:: with SMTP id c14mr12301421wrx.130.1631887417274; Fri, 17 Sep 2021 07:03:37 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:6b11:6374:882d:42a0? ([2a01:e34:ed2f:f020:6b11:6374:882d:42a0]) by smtp.googlemail.com with ESMTPSA id i18sm6986113wrn.64.2021.09.17.07.03.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Sep 2021 07:03:36 -0700 (PDT) Subject: Re: [PATCH v2 0/2] Add a generic virtual thermal sensor To: Alexandre Bailon , rui.zhang@intel.com, amitk@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ben.tseng@mediatek.com, khilman@baylibre.com, mka@chromium.org References: <20210917072732.611140-1-abailon@baylibre.com> <7cddcdb7-4efd-bfdb-3d86-f5862ea0b7fe@baylibre.com> From: Daniel Lezcano Message-ID: <8a9e5f13-6253-2d0d-35a8-789090af4521@linaro.org> Date: Fri, 17 Sep 2021 16:03:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <7cddcdb7-4efd-bfdb-3d86-f5862ea0b7fe@baylibre.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/09/2021 15:33, Alexandre Bailon wrote: > Hi Daniel, > > On 9/17/21 2:41 PM, Daniel Lezcano wrote: >> On 17/09/2021 09:27, Alexandre Bailon wrote: >>> This series add a virtual thermal sensor. >>> It could be used to get a temperature using some thermal sensors. >>> Currently, the supported operations are max, min and avg. >>> The virtual sensor could be easily extended to support others >>> operations. >>> >>> Note: >>> Currently, thermal drivers must explicitly register their sensors to >>> make them >>> available to the virtual sensor. >>> This doesn't seem a good solution to me and I think it would be >>> preferable to >>> update the framework to register the list of each available sensors. >> Why must the drivers do that ? > Because there are no central place where thermal sensor are registered. > The only other way I found was to update thermal_of.c, > to register the thermal sensors and make them available later to the > virtual thermal sensor. > > To work, the virtual thermal need to get the sensor_data the ops from > the thermal sensor. > And as far I know, this is only registered in thermal_of.c, in the > thermal zone data > but I can't access it directly from the virtual thermal sensor. > > How would you do it ? Via the phandles when registering the virtual sensor ? Or is the problem you are mentioning related to the sensor module loading after the virtual sensor ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog