Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp924217rdb; Fri, 19 Jan 2024 03:09:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAmRU6+XkkvtObrzG+rXqJ+iio8CqO+kslK7CrMy2YMlz33EkJOVIfttVBk2CSAF0ELFcN X-Received: by 2002:a05:6a00:8e01:b0:6d9:bc1d:c7d2 with SMTP id io1-20020a056a008e0100b006d9bc1dc7d2mr2515576pfb.20.1705662550725; Fri, 19 Jan 2024 03:09:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705662550; cv=pass; d=google.com; s=arc-20160816; b=ibpZwU7bmn+Ym3KCmowG2NLdBFWh9i0amooHSdu2pDvucxMtl7iyJl2O3rqgpUd6ml aCBYU2J99uEUDeJf9qc60kz+Ozo47PTnvypZUBSGVX3/PJuW3CgQp+VwmA5LyWTR246x DRF2/nVVJE+WbH/dIoy+vEJglTmVH/K9BNFGY/WdVX3Mu+M6bTpTCEPFm4lQTf9WMpXX +2dg0vlmlBsr5xeIGjdZUNWhRyVViKA9vPcwESWTTvJQavqEtS9niRFeaVmki3+iqtF7 vLdg7iQ4ddHPQwaHQ+mzdsTbLXLdabbrRZ+pwHO+VqOAJleQA1snnVv+CeXSaisNdPT5 L3hQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=AkX7t6l4nQ/vCuey8Au/m+51v8pi/S+y8K9YAi1mcOo=; fh=LXVGgQpFX7Ki+BfdB13aExcDwEHgkGRAoEGm9Gi59JQ=; b=XvPaAFCLv5OHxvlEK0KROdsHhmy6v+k/pRg7RQWdkAhvzv3yFECm5krotQ4bC3+Yyn enteXehix1jL5CUSzetD1BKD6n7jru7GSAQ17RcirLd+iwymMwPsriGJQyHV7vdbErCz MFK6pX7pps6YAcRSohQg4Hb1PkrOrK012hlRM7reqOlM2ttHTRrLBMM2lt7ayfBBaE8i 1lcdAHTl+P+MTp/nqYRT8JnzuhNa0UCjaSzyxMBcW6EWhmYKWu86S1GH0S3D4Isj4NRn C3BNFQMxS5QnWFWxBhAY6+zZXoTG5S2BeGqUu+NmfHEz24E5eabngZe71SEB58LfNmbI tFaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=sBbtETSC; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31071-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z10-20020a63e10a000000b005cf5889c470si3158167pgh.322.2024.01.19.03.09.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 03:09:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=sBbtETSC; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31071-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E91B9B22B48 for ; Fri, 19 Jan 2024 11:09:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 692A64CB29; Fri, 19 Jan 2024 11:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="sBbtETSC" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CBC04C632 for ; Fri, 19 Jan 2024 11:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705662530; cv=none; b=OP7RYBlHrnw5O+4sr7VFEJHtdQ67ehCab1Nnf0tqUXYyOtaO5rT6rk4yQEuMuR1eznR3Keg7YkoyI3uQppiamsiJE97IpEI3twDhchBMUiVtqtTC7zwj8GQS3wzWqOLO2g87Zi4bybH1WXJIdsApJXtHE1siBjl+SAZU8tAanbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705662530; c=relaxed/simple; bh=M/khVo5w/QaYGS2KbY7GMVMAto7oj95Xs/13fc8sOY8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rZsxLtnCUeWgqmnrUdkzeiOcBsGSOZDxJ98hwuFrjsc+SHbUcyM/FOHbHjB+tWIWIDGDbQceTqT7ZMkAFpHCiYX+39Aw3QxbIU544xMav1UCS5UxJkymBvrdZM+NilyvUvDib6ivQ3JFgU6nWN0XhZtMhYe0AmJzYolC0qqA32E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=sBbtETSC; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a2c67be31edso70773666b.0 for ; Fri, 19 Jan 2024 03:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1705662526; x=1706267326; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AkX7t6l4nQ/vCuey8Au/m+51v8pi/S+y8K9YAi1mcOo=; b=sBbtETSCA9TEQml4IBa4FeUc3Xjox6F7SbRHlbteJh1DEDoqzIZv643gZcCvcj+Yzj LLCkoutZt/jJRKFxG8/C0CyOE1ln1AX1WuATccrJcMEI1qe2BEUbx7uAe1tpX4eBx/UB c+mLWt2yMycQ/Fy8ZyCwrpb8cOeOuWAsDNhQK5GA7gZ1mYw3Z+98oCn/NeZASelg7jxl Ib3Bfnt20fne+diFtxY9fmnzLohEMEtlbS+iPOKjhsv2nQIdjbvhzsbjeT1zmdN/Rov8 6G4OhZ+QzPYl9Ncy37eW1aHoW59Xfutypx7nBzzv4Yv9hj/0/QhwiMa+dxNVewwqg+BA LCyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705662526; x=1706267326; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AkX7t6l4nQ/vCuey8Au/m+51v8pi/S+y8K9YAi1mcOo=; b=KgCv3JlHdnW80pvisxV8f5xbWOyG5UY5D4TTVbeHpPBPBHKsYaSIA2jOphzHjQumED x/G6p0ZcUStsXcGZYycdY1qHnwInkZYYx4Mulnxzee1KV3FXqFJXXqI/L7KAX/3xalan kHNyi7Ii8nsqxg86kmVtmU3Kos6GGPgGjkmdpyqzRkFWvrQW/V92X6ju9eohjJefYghV H+97dEXvF7/0mRjptTTSn30PyVLVx6nOm7NszajB1B3Bo2b+Gd8XULVxro9cP6LmnpAU m0OLuKdirC2Cr5mT1ijM1GAWIF75HctxnhvEA7Z/XgD+QR5fsOpv15E3IkT3/6PvcE0z HTOQ== X-Gm-Message-State: AOJu0YyLTPJlJa77A6Y/kUS5f9X4RVXkglZCKphY5jxtRkAwvm+heVwS gYBAdBkmbJ0gfYOeG7WbrrnNePwZoJCzNcNFsihjWqonlps+AzGxS1NwXQLWU4Mxvoy7X4ABwX7 9 X-Received: by 2002:a17:906:6dcc:b0:a2f:d59:d9cb with SMTP id j12-20020a1709066dcc00b00a2f0d59d9cbmr617650ejt.177.1705662526094; Fri, 19 Jan 2024 03:08:46 -0800 (PST) Received: from blaptop.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id h20-20020a170906261400b00a28d438a1b0sm10091661ejc.83.2024.01.19.03.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 03:08:45 -0800 (PST) From: Alexandre Bailon To: rafael@kernel.org, daniel.lezcano@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: rui.zhang@intel.com, lukasz.luba@arm.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandre Bailon Subject: [PATCH v2 0/3] thermal: Add support of multiple sensors Date: Fri, 19 Jan 2024 12:08:39 +0100 Message-ID: <20240119110842.772606-1-abailon@baylibre.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Following this comment [1], this updates thermal_of to support multiple sensors. This has some limitations: - A sensor must have its own termal zone, even if it is also registered inside a thermal zone supporting multiple sensors. - Only support weighted average Changes in v2: - Rebased on 6.7 - Seperated generic multi sensor and dt specfic code - Simplified the code - Drop min / max and only do weighted average (seems more adequate for IPA) [1]: https://patchwork.kernel.org/comment/24723927/ Alexandre Bailon (3): dt-bindings: thermal: Restore the thermal-sensors property thermal: Add support of multi sensors to thermal_core thermal: Add support of multi sensors to thermal_of .../bindings/thermal/thermal-zones.yaml | 5 +- drivers/thermal/Makefile | 1 + drivers/thermal/thermal_core.h | 7 + drivers/thermal/thermal_multi.c | 178 ++++++++++++++++++ drivers/thermal/thermal_of.c | 139 ++++++++++++++ 5 files changed, 327 insertions(+), 3 deletions(-) create mode 100644 drivers/thermal/thermal_multi.c -- 2.41.0