Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp123446imn; Mon, 25 Jul 2022 11:36:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vmWEk8RZv3GlNVba7Afvq5xHJJIZqm3u+0gWYNc+Rsfvw4EPWnT1sFzu7lhPp1fzUqf8UI X-Received: by 2002:a65:6e41:0:b0:412:4c1f:9936 with SMTP id be1-20020a656e41000000b004124c1f9936mr12435397pgb.455.1658774164888; Mon, 25 Jul 2022 11:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658774164; cv=none; d=google.com; s=arc-20160816; b=lFILsjzTzt9LqihZdvoIKhT/GaGqx/iLHc83Wlmv2/iDSO64eRt9d92Vfy4tKdGhh9 IU0u9aPd/KTh2fy6C/CW5D7bDDSYLOoxR7WyEGJrXp7pNfvije4dhHhTNOLud5ZnvhBE US/li13pCxoUGcxsdtENnXVoEM6XrKR2qUBD7p3U915LE8vDI4bkOqqoUfW7zXi022md KKIh9zdrGsGJw2ZxqDOzTHgxx/ef6XcnZgXOhxzNTm0yoQPbt5xJ0G6H119I9deAljoK C6HOUpCAcqqxJx8iQp0Jk5ICblc9O8mR/xR46QjjuQkR7m/4NJXVfDnM03uJSVq/X6M3 HuFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=diB3p1SRruuk8rIBb0m/5aPwGr+R0gunx/X4Cv4OA/4=; b=ayKqceWr36F+94wh4g+gEGy+WhHfqrPdvkxWg3uiWfyUu3aZC6ncndladAR2deR89T KtQrWFdpf2jp2rqWdkxZQviBY8pTczr9xaWoUDRc2EhOvaKF5u1Xop9pyQxnDZwbJ0tQ fv8HVoBqGX/trkPOETFOrMRZL6hlJfXsApiDzmRoGFo/pzXkdxgsQXJrGDJyEYV2Gp/y 6Yi881UpHci2P/AwEJHibM8XP/CDllnAq9Old81A/Pr/MfLh97NEb4xqny9Ih/Bj631R F2+zIUJNe4EVm6du0B5Mbk6mOUs38MS3zAzg42XjgXdmAmKRMdM+6/oLPHWNdYPA4Xyy e7Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a170902e3c100b00163ebcaa03fsi12924650ple.312.2022.07.25.11.35.49; Mon, 25 Jul 2022 11:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235786AbiGYScz (ORCPT + 99 others); Mon, 25 Jul 2022 14:32:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbiGYScy (ORCPT ); Mon, 25 Jul 2022 14:32:54 -0400 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE30514D3E; Mon, 25 Jul 2022 11:32:53 -0700 (PDT) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-31d85f82f0bso119380697b3.7; Mon, 25 Jul 2022 11:32:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=diB3p1SRruuk8rIBb0m/5aPwGr+R0gunx/X4Cv4OA/4=; b=jpH8UdkDgAs7SBVH5iWPtBLuR1LJbHnGGsm4yKT2HycOscXFUvoxM3b64W+acVBrP7 Gifjb6K2YWoVn7w4Zt6eGcbc9bwkf7Zi28dufL5s2uKO07xsDgtJLfPZr0Vc9ajx+Jy7 pdSpyp7vNZdNeQM6mQgutb+kjusZjL7qljUKpp8no9U8ZaL6K0p9hdOIemeLmf+6sCVp w3yxWeM3uo9k9s6Ks5XYv/KDDHZuJlrGyCcboItURzXZ8Kgm7iidTt+ZvBuQYilEjBs2 1aPwrLcYnVo3trXXb+Keigyh1MC4kcHFapkcdUpgSnCLqru+RvnrNpfBy+fowYY7Fmyj hzsA== X-Gm-Message-State: AJIora9V5OdwkZfRic7uFuiVTC/0mddBjp8BRXQD/Z/dqGSrR8MALeqt qox6GZx1465lGmCOPCuMsluuCY02KNZT8mOuKiM= X-Received: by 2002:a81:1b97:0:b0:2db:640f:49d8 with SMTP id b145-20020a811b97000000b002db640f49d8mr10873566ywb.326.1658773972961; Mon, 25 Jul 2022 11:32:52 -0700 (PDT) MIME-Version: 1.0 References: <20220722200007.1839356-1-daniel.lezcano@linexp.org> <1aa3ae56-84ae-8a96-7a52-3181c47dcb07@linaro.org> In-Reply-To: <1aa3ae56-84ae-8a96-7a52-3181c47dcb07@linaro.org> From: "Rafael J. Wysocki" Date: Mon, 25 Jul 2022 20:32:41 +0200 Message-ID: Subject: Re: [PATCH v6 00/12] thermal OF rework To: Daniel Lezcano Cc: Daniel Lezcano , "Rafael J. Wysocki" , "Zhang, Rui" , Linux PM , Linux Kernel Mailing List , Kevin Hilman , Alexandre Bailon , Lukasz Luba Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On Mon, Jul 25, 2022 at 6:34 PM Daniel Lezcano wrote: > > > Hi Rafael, > > On 22/07/2022 21:59, Daniel Lezcano wrote: > > The thermal framework initialization with the device tree appears to > > be complicated and hard to make it to evolve. > > > > It contains duplication of almost the same thermal generic structures > > and has an assymetric initialization making hard any kind of serious > > changes for more complex features. One of them is the multiple sensors > > support per thermal zone. > > > > In order to set the scene for the aforementioned feature with generic > > code, we need to cleanup and rework the device tree initialization. > > > > However this rework is not obvious because of the multiple components > > entering in the composition of a thermal zone and being initialized at > > different moments. For instance, a cooling device can be initialized > > before a sensor, so the thermal zones must exist before the cooling > > device as well as the sensor. This asynchronous initialization forces > > the thermal zone to be created with fake ops because they are > > mandotory and build a list of cooling devices which is used to lookup > > afterwards when the cooling device driver is registering itself. > > > > As there could be a large number of changes, this first series provide > > some steps forward for a simpler device tree initialization. > > > > More series for cleanup and code duplication removal will follow. > > > > Changelog: > > > > - v6: > > - Folded patches 8, 9, 10 > > - Removed thermal_zone_get_trips() and thermal_zone_get_num_trips() > > - Moved tz->ntrips => tz->num_trips changes into patch 11 to fix the > > git bisecting > > > > I believe all the comments were addressed, is it fine if I merge this > series ? Yes, please!