Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6716150rwb; Tue, 9 Aug 2022 23:02:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4x3C04NvCs/WloAABWcPWyEsDwlQqIhrCFQcS9pKdNgeQlH9Fg+QGVvEdBXufD/lu40PSm X-Received: by 2002:a17:903:240f:b0:16d:7865:4b4e with SMTP id e15-20020a170903240f00b0016d78654b4emr26225106plo.82.1660111361990; Tue, 09 Aug 2022 23:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660111361; cv=none; d=google.com; s=arc-20160816; b=UraVPPeIU/0QrZhscUN/+9D+jl2RezhONasysT/E9aXnn0Oqm+OGLz+rZAsOguvRaI xRpXO5hxkD2u/O3qynVDPpkOjv+QPAiun2ktcxAeFRDCjP7mVdLIKIocCgq1F9ZNjFYy 73AdEULE4KBSGeM86igQhEuEcNJAyI2OgjD6O5y6A/M1aQVtfa9012L2IP18180U2jmj MgJqa+cmJnpVKl269NjoYT8+QHma9gDzun4xzTqsMZjhlK832V4TgoCYkVgFIQ7xK1bg We5skmSnb+LdDat3U/jHBzBbuAINihxju2jmQiJo/WELk8TxxjRjn8Y+Ovahj9/LTiKy BPFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=TCO2xyxVuPd3/tBUV+s0EeQJwLyZQsGvsrrIoFAUabA=; b=Rre/JRTu4VDc4duxyhGK8kux55AlP7oKsFhKoIYO1W1QPbH0t/Zi5OgP7H+AO1FbRL m+7T82EWmGaXW9OGLFzk8+XvXe9QItQm/KQQqkJ364i8iCdBI/J1+Ae264drJfKlyF65 KKTUUKCg+sRhu/ScXR0P12Xg5yOr8AvdBtMJ65U4eOd2Mkk862YsT7WgZ8z2gFamJ7KS WJAWSn36Snl02a1ue51k8+9fXcaPc/pxrF+NnrgcvdXNtrtkaXcrkBC6oe/AwqpkG2yx wpFE9V1sggdny2SgiAL3sZJ3UjRNiM5WT0uKeuPG6MpH/49s0zkwaYS1CxlYkQ4xHh6d nsIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BvFe715t; 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 k11-20020a170902c40b00b0016d68452b8dsi16753156plk.558.2022.08.09.23.02.28; Tue, 09 Aug 2022 23:02:41 -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=BvFe715t; 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 S231165AbiHJGAz (ORCPT + 99 others); Wed, 10 Aug 2022 02:00:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbiHJGAt (ORCPT ); Wed, 10 Aug 2022 02:00:49 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 147FEE03 for ; Tue, 9 Aug 2022 23:00:48 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-3282fe8f48fso118404037b3.17 for ; Tue, 09 Aug 2022 23:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc; bh=TCO2xyxVuPd3/tBUV+s0EeQJwLyZQsGvsrrIoFAUabA=; b=BvFe715tdJHTFzLiuUTS/Q7VYOCApMDwcI0d8adcuT6VY23Mzv0LjVB/oCe1EYUH6I GrUEBHGuCyX9om+3m+2zl2rmB8DHkIoDhCoJHkxwfbcimGGF2Au9Yt8rAFlE5vLE4zOT FBke0i6x4PfWRbfl2D3iR0cCU4z0WmA3iKlcfcXB0BYjlIhk2JqckwGp1G7FtAQR48/7 pqJ0XtbeVUishXdC4XToLF9FWmAVWf/m/3RJfH4tl7k3Jd+oE21AZHO7Wt0qAh9vtQ8/ piA6XmFBChiJiUmunvUDrKZvlyy2Mu3J3SrWw8IQ6KPqPhlxUX1s7KWZK+OvnRu3v5v3 Y72Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc; bh=TCO2xyxVuPd3/tBUV+s0EeQJwLyZQsGvsrrIoFAUabA=; b=F04GeoaFT/XXoLa1BZpnqBW22zj8go2BwCR400fUBQQNtj4guimrVUy7Gq4Q5mdISr KXYqrN3g+PZsb/0ginc0XiDmfVVnGgSOvGt1AOSGdVi7wl6Xjt6EFlQNF4Ay2Ck6afE4 YJsH6nsDu97kXQhXlQffk2QlRC8yRj4pWnGsgL2CyXlTOwLbCyxxUlaBIySbfM1NSZ09 Z9DQFsY0WRkuTv6ek+PfX3L3nbTTypJncJj+cq9iAtCJBwzWWD/QUKVaSEfpAF9+mhUK OyQVo6wlp8l1TsBJ5M1RECZ5RHrWtlUaNETjs8v8Ah+ZryKjsF0tOtirkx/3lb9h19cr NBOw== X-Gm-Message-State: ACgBeo2iz9kwPSqUW1vcdzf+bNi1ldVUvoiemZtweo2ywym1diL91Fe+ Wn/Sf2FQpjxWSVZjE7pESxIlmQyIEMaCkg0= X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:f21:76ca:766f:e0ab]) (user=saravanak job=sendgmr) by 2002:a25:7613:0:b0:67a:700a:f9e1 with SMTP id r19-20020a257613000000b0067a700af9e1mr23778556ybc.53.1660111247299; Tue, 09 Aug 2022 23:00:47 -0700 (PDT) Date: Tue, 9 Aug 2022 23:00:29 -0700 Message-Id: <20220810060040.321697-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog Subject: [PATCH v1 0/9] fw_devlink improvements From: Saravana Kannan To: 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 Cc: Saravana Kannan , Abel Vesa , 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=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham 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 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? 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