Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2815650rwb; Mon, 15 Aug 2022 11:55:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4fSWW9DaAv4OWIGTagFQmJ6mlPKo1WsYiO5oX4wRfa3gnnpcTcMBg3NCdsEUjusbAvVfub X-Received: by 2002:a05:6402:447:b0:440:d482:495f with SMTP id p7-20020a056402044700b00440d482495fmr16089602edw.264.1660589735644; Mon, 15 Aug 2022 11:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589735; cv=none; d=google.com; s=arc-20160816; b=frHz8tAO/ZX1qJdtvxbkK4TVN7Mp2CIGGx3PgkLlmH6SfONzz+n50fd9226+6NmfxD 9mdN2jIdcRB/v9YnTPAjVPH75ny8/+gyE5mgCITv3EJR6BoM/yIkg7YU9SLQleNdczXb 2zt7q8nMqZAEmcAaHroNVGd6vjFPh4yb8K2CwBya1JFQ7QKGHA50ABcXAG0jQqi32IdS c0LPUQTVsMgDjHm7OsXiBsMm5IdW6kHegIvfd0kuOMpfeFAwKIYxRWqtfkHqcM88yhqW u0ZAf73tkMQLTWiRnFvNzvs1hOWjfeGrgiRIPqNod/44M/MQH7W6vlYr2qg+BMuDFWxX e88Q== 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:dkim-signature; bh=BJt/vOP9OHL0y+jrzm5cg2sCaG+27wsaXcgILhgn7lo=; b=NCbKfdwBXPnMiyFbJ+w2FBh7xbpqAdYkxcE4EJodVjlNyTAW45/WYVfOM+WJ3aJRys Iu0nBfkwex6rKB1bXo0oAbcfGFyEu5XsPei19EpFvnBPACBEvKf2/I4zcFIZsvXzc31V j3pJKet+bpDmM36UhPyPON6+aLWZI/oTW0eCTy6C3+ucg8tvCx+3k2O1tfHUPJtt5rix Zjf05OBSkYYmgGKaO6iizim1HAVOr7aVmvd1Ftk5TU1wWaZ96ws394POnGVFcQ+vPw/2 S4sDds0LKKKib8uy8VbJPg45vznDiJ49ryqn82NdqkcMoWt9AahcugfpqUexZ4+PV7Nr xxWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=p5i2uxjK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020aa7c50b000000b0043da70a82f8si8230564edq.117.2022.08.15.11.55.07; Mon, 15 Aug 2022 11:55:35 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=p5i2uxjK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233394AbiHOSmi (ORCPT + 99 others); Mon, 15 Aug 2022 14:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240535AbiHOSkN (ORCPT ); Mon, 15 Aug 2022 14:40:13 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1AA2ED4D for ; Mon, 15 Aug 2022 11:24:12 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-32fd97c199fso68611047b3.6 for ; Mon, 15 Aug 2022 11:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=BJt/vOP9OHL0y+jrzm5cg2sCaG+27wsaXcgILhgn7lo=; b=p5i2uxjK2NzMF+6PIEOLJxbFor9NpM8loKbuBWNdYO5TWdrtkHdgD/du41IQW6+PjG AbEW1vxV3zYLc1nK4Er6j8q1ZlcyqWbgeHKCT8HBFBhFplvn+iSTAsGzFfS3Qk1YpWdH l70Fy/+CAa3SCs0eCx+hFGYG8vbueikjPrrZDuYi5VGHfeL/oDpaGwYwzF7U6d4mT3G4 ZX1BI5kKPewL+vCx6YML/AQ46tisemqNuM/TLnprheAuNFkjoidWQ3BHdwR1o/WT+a9q AVF2DI5Nv3FWGggxRWvspruaWnDLJLPovT7bn/ehMNzJDYfIHV2wBuxYHNqtTxme5CQG 2EfA== 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=BJt/vOP9OHL0y+jrzm5cg2sCaG+27wsaXcgILhgn7lo=; b=5pd94WjMCUOG2OV/dn0nOTXomHziKD8zlJgioA2cUUzyR1X15X9o45C2pHRApGfAtI R36NHcE/3YVQHelhysX7vS8Er+/3Vgjnz/jKf8EL/v078bpZ1MwfuIOWGtWv8oRXZXFk tl/m3dqM+wLSzFd6Etd3ZILC1vT0JoVKm0k6MsmQjf8rg2d3IHto67P4YQDdOajqr2JG s5ctr2fckz/mK08oFaxysXHexveK4evdM4DsafaAyIpT6KuQ9154k7tbIOjy11lRn46T nFXxVsLiXVMAB9snyrTuQm6PRHK6MwKllbQ2mtu0ttOxvuqqaOR02ZVh2IY2sMMQ8qmm NDbw== X-Gm-Message-State: ACgBeo3a+CdT1yTK+lQH0rtFFJtG01/Q9mGaVTkKbRzEyBxYPRYa3OsJ ehNpJacTF20pGMAjToGSHrLXAEziTztpKRONjAqKUw== X-Received: by 2002:a81:998c:0:b0:326:5dab:df3f with SMTP id q134-20020a81998c000000b003265dabdf3fmr14329271ywg.126.1660587851957; Mon, 15 Aug 2022 11:24:11 -0700 (PDT) MIME-Version: 1.0 References: <20220810060040.321697-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Mon, 15 Aug 2022 11:23:36 -0700 Message-ID: Subject: Re: [PATCH v1 0/9] fw_devlink improvements To: Abel Vesa Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Linus Walleij , Bartosz Golaszewski , Rob Herring , Frank Rowand , Geert Uytterhoeven , Magnus Damm , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , Alexander Stein , Tony Lindgren , Sudeep Holla , Geert Uytterhoeven , John Stultz , Doug Anderson , Guenter Roeck , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-acpi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Mon, Aug 15, 2022 at 4:01 AM Abel Vesa wrote: > > On 22-08-09 23:00:29, Saravana Kannan wrote: > > This patch series improves fw_devlink in the following ways: > > > > 1. It no longer cares about a fwnode having a "compatible" property. It > > figures this our more dynamically. The only expectation is that > > fwnode that are converted to devices actually get probed by a driver > > for the dependencies to be enforced correctly. > > > > 2. Finer grained dependency tracking. fw_devlink will now create device > > links from the consumer to the actual resource's device (if it has one, > > Eg: gpio_device) instead of the parent supplier device. This improves > > things like async suspend/resume ordering, potentially remove the need > > for frameworks to create device links, more parallelized async probing, > > and better sync_state() tracking. > > > > 3. Handle hardware/software quirks where a child firmware node gets > > populated as a device before its parent firmware node AND actually > > supplies a non-optional resource to the parent firmware node's > > device. > > > > 4. Way more robust at cycle handling (see patch for the insane cases). > > > > 5. Stops depending on OF_POPULATED to figure out some corner cases. > > > > 6. Simplifies the work that needs to be done by the firmware specific > > code. > > > > This took way too long to get done due to typo bugs I had in my rewrite or > > corner cases I had to find and handle. But it's fairly well tested at this > > point and I expect this to work properly. > > > > Abel & Doug, > > > > This should fix your cyclic dependency issues with your display. Can you > > give it a shot please? > > Tested the specific case we discussed about here: > https://lore.kernel.org/all/CAGETcx8F0wP+RA0KpjOJeZfc=DVG-MbM_=SkRHD4UhD2ReL7Kw@mail.gmail.com/raw > > Thanks for fixing this. > > Tested-by: Abel Vesa Thanks! -Saravana > > > > > Alexander, > > > > This should fix your issue where the power domain device not having a > > compatible property. Can you give it a shot please? > > > > Tony, > > > > This should handle the odd case of the child being the supplier of the > > parent. Can you please give this a shot? I want to make sure the cycle > > detection code handles this properly and treats it like it's NOT a cycle. > > > > Geert, > > > > Can you test the renesas stuff I changed please? They should continue > > working like before. Any other sanity test on other hardware would be > > great too. > > > > Sudeep, > > > > I don't think there are any unfixed issues you had reported in my other > > patches that this series might fix, but it'll be nice if you could give > > this a sanity test. > > > > Guenter, > > > > I don't think this will fix the issue you reported in the amba patch, but > > it's worth a shot because it improves a bunch of corner case handling. So > > it might be better at handling whatever corner cases you might have in the > > qemu platforms. > > > > Thanks, > > Saravana > > > > Cc: Abel Vesa > > Cc: Alexander Stein > > Cc: Tony Lindgren > > Cc: Sudeep Holla > > Cc: Geert Uytterhoeven > > Cc: John Stultz > > Cc: Doug Anderson > > Cc: Guenter Roeck > > > > Saravana Kannan (9): > > driver core: fw_devlink: Don't purge child fwnode's consumer links > > driver core: fw_devlink: Improve check for fwnode with no > > device/driver > > soc: renesas: Move away from using OF_POPULATED for fw_devlink > > gpiolib: Clear the gpio_device's fwnode initialized flag before adding > > driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links > > driver core: fw_devlink: Allow marking a fwnode link as being part of > > a cycle > > driver core: fw_devlink: Consolidate device link flag computation > > driver core: fw_devlink: Make cycle detection more robust > > of: property: Simplify of_link_to_phandle() > > > > drivers/base/core.c | 437 +++++++++++++++++++++----------- > > drivers/gpio/gpiolib.c | 6 + > > drivers/of/property.c | 84 +----- > > drivers/soc/renesas/rcar-sysc.c | 2 +- > > include/linux/device.h | 1 + > > include/linux/fwnode.h | 12 +- > > 6 files changed, 323 insertions(+), 219 deletions(-) > > > > -- > > 2.37.1.559.g78731f0fdb-goog > >