From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D521AC07E9B for ; Fri, 9 Jul 2021 13:23:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFBD0608FE for ; Fri, 9 Jul 2021 13:23:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232921AbhGIN0M (ORCPT ); Fri, 9 Jul 2021 09:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233000AbhGINZt (ORCPT ); Fri, 9 Jul 2021 09:25:49 -0400 Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BD34C061786 for ; Fri, 9 Jul 2021 06:23:04 -0700 (PDT) Received: by mail-ua1-x930.google.com with SMTP id n61so3578751uan.2 for ; Fri, 09 Jul 2021 06:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ieJX/m81ywKjheIkUfnQ/E3F4+uPDEYB7LnHCrngEok=; b=VclYjwS7bXZJDEksFLzyv6b4/ovnlQWrQOsOkO3JCI4lkKcS6ZcgqONoZxiKH0UtLH 1k/vfccWQc9aNL8JrCGpyBzD/vdcJaJxXY6C2uO4JxqIGqTxQVNOxFADDxPLonUkl8D7 HXVV0TfcjLn6iOPfhfDp2bRCPSKu3wQ3IggL1FQaSzcEUvbfPwor/vYiaLZ/q4u+1bsj Fi1lG72QWvYMevqI34EtCTfbE93uOaY0DytDx3Acq+fUY1B7W3LKlElglAOQCyNQ7fDg VI/DujxCZLdxqrIRxNX3jWhrYLQNThTsE6WIIKV19EksuWHvcfvl3l73ACKjycvaGNsh JUkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ieJX/m81ywKjheIkUfnQ/E3F4+uPDEYB7LnHCrngEok=; b=tmGfOPnTH9JIKaBuxb1rekVBNu0k74oQEyIDLRaNuV2BNEqFzWx44/hCPichuHa27z ck4N3h6pzePTTmfFs+XCIzLSwMZDU1CucWMP8hO6rzCSIF5UYgnhwTIS/tbj6AK1aelB wG4XVtzIqZDwpSyg/XwYbY2y2b01wguK/T3EzB9WhPepruvia/UIRXV8DqUJ1pGkM/VJ 3keAbP/vYhypqsGVyvPZpNvR5ZIfQULWUmysVeUJwAVtYzCFudjFOBvqOCmPkMCuzUbC U+UwC0G4kan+ijOyhULb8UI3KrxyP8KL5lQq1G9XcukyIDs8fkSWl1Hpad9JZKnDJMLu aBqQ== X-Gm-Message-State: AOAM532L92roak15kDY2mLYj/GtKJfc20lLdg9PDKPBRNZfDFCEBzzZG u7iBmr2d25xAHPV0dBIBhnH17K/FHRruuU49Ab0N5EmeJ/qGSGbb X-Google-Smtp-Source: ABdhPJzUnwXfQhtV/n6pBvbfm0s5OM132bPHlFb8TEuznt+3QUJnBOpAC9TPbDy4qoKF0BvgpsIE4cf8ma9Ur7aFa0M= X-Received: by 2002:ab0:42a6:: with SMTP id j35mr35173493uaj.129.1625836983706; Fri, 09 Jul 2021 06:23:03 -0700 (PDT) MIME-Version: 1.0 References: <20210709125611.135920-1-ulf.hansson@linaro.org> In-Reply-To: From: Ulf Hansson Date: Fri, 9 Jul 2021 15:22:27 +0200 Message-ID: Subject: Re: [PATCH] PM: domains: Don't attach a device to genpd that corresponds to a provider To: Geert Uytterhoeven Cc: "Rafael J . Wysocki" , Linux PM list , Bjorn Andersson , Stephen Boyd , Saravana Kannan , Dmitry Baryshkov , Kevin Hilman , Geert Uytterhoeven , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Jul 2021 at 15:07, Geert Uytterhoeven wrote: > > Hi Ulf, > > Thanks for your patch! > > On Fri, Jul 9, 2021 at 2:56 PM Ulf Hansson wrote: > > According to the common power domain DT bindings, a power domain provider > > must have a "#power-domain-cells" property in its OF node. Additionally, if > > a provider has a "power-domains" property, it means that it has a parent > > domain. > > OK. > > > It has turned out that some OF nodes that represents a genpd provider may > > also be compatible with a regular platform device. This leads to, during > > probe, genpd_dev_pm_attach(), genpd_dev_pm_attach_by_name() and > > genpd_dev_pm_attach_by_id() tries to attach the corresponding struct device > > to the genpd provider's parent domain, which is wrong. Instead the genpd > > Why is that wrong? It may lead to that the struct device that corresponds to a genpd provider may be attached to the parent domain. In other words, the parent domain will not only be controlled by a child domain (corresponding to the provider), but also through the provider's struct device. As far as I can tell, this has never been the intent for how things should work in genpd. So wrong or not, I guess it depends on what you expect to happen. Do you see an issue with changing this? > > > provider should only assign a parent domain, through > > pm_genpd_add_subdomain() or of_genpd_add_subdomain(). Kind regards Uffe