Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp15932pxb; Mon, 1 Feb 2021 20:35:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyICjpZsJGQ9uvuIs6V5+TGRF5YK9BD1kcQcnTLen7jx7EQnbdOxjFE8sAllpm+7GWBs+rM X-Received: by 2002:a17:906:8611:: with SMTP id o17mr20678869ejx.145.1612240549526; Mon, 01 Feb 2021 20:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612240549; cv=none; d=google.com; s=arc-20160816; b=eXUapADnrUsYoAxBRjjrU/gnxJ5T3KK2e7qU6fCsir43a2SXIV31NIv5PTQTRkt9Zl IW0UJusMIA+l10Tic/E4pi0HqwkC4tKYClZYKi3tnp32XJg37p1P0WPVFgM5Wah/yuyG gwAmja8/YoEvaPo3+C18kBBLHHJ/M52f4W1B08UMjeD0Won8OfDZeMUKGHQ6vX48WIGo NZKtAdR91pixlx4e2Ybee+Q17sEXtrRz/ns/4pl26fhfwoPfR5eOgmjfK7qhctvxNN0O PUC+j5AH/0fQHUuStnjinc/c2c0BBTEkhUWWD7Qs6JKNoMv2rEd2ehWos+gTzGeuJyxr Mwzg== 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 :sender:dkim-signature; bh=tOYAEf4gylyNqcFyFHPYOstSUX7x6x4Pk46wd4Wq7MY=; b=Ua06GFAYG8ROy+Ay7R8RQzAFlI0KgmzZVyM5OvETIRC0kqRFzQKRgBRXE38mAT43pJ qR0QouSFr4MmPYmY9/+NZ7z2Fb8KJbY/0ZpMFouz58nfWfoxh0VfZq8UJd1vp7r6FqWt WWz3cq0i0MJlJywkhpr9eQq3Rav4XlpPy+kdgJE9+bVSu2azJ0xqPat70JFyJ5UyX4zf y31aU/FiNxNVRM/rAc1gynQ4j8JxE21vfptvFTHRqzMDPB9I02Gt/hIMtKJhK25TVHZW WaKdDCv0PPwYYPURLOYqFtTZIru1F4wyHzIrIFfnl73mebcf6ygGnCllFZkMTkYsjXA5 u3YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cJRowJDP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si12229320eds.425.2021.02.01.20.35.25; Mon, 01 Feb 2021 20:35:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cJRowJDP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231634AbhBBEed (ORCPT + 99 others); Mon, 1 Feb 2021 23:34:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231624AbhBBEe3 (ORCPT ); Mon, 1 Feb 2021 23:34:29 -0500 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31C84C0613ED for ; Mon, 1 Feb 2021 20:33:49 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id 70so14986307qkh.4 for ; Mon, 01 Feb 2021 20:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=tOYAEf4gylyNqcFyFHPYOstSUX7x6x4Pk46wd4Wq7MY=; b=cJRowJDPEh1zpt14Aur7j/uzBRdycqBeX8NMGh2Z1sBJOEtDJWxCAw0U4/dErXnxv8 DOOiEmDX9+GevZyR608ZsYoms0h6Mqo7yAb2C5JPKMsT5w7/hCsxue7BS6NcFXqaAQDr yGiY4yOk+Sc9fuTMihToCaWo2q/W91QjIGVezxLHXaeAsUmVCsDqSdIXkfCxnsQ9WLUl 3UGKXkweaXJAsrY5FUoaehKhBR7ql8br+65ddJYL/eSdpWlDqgVCpNhu2KT+9nyVHZ+P aB2JY6WJiH/84WJPMqlT7Q5U1ESmTxTu/NDADk1DM2MBa88D1omHZbH//S1tKANFffiP ESmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=tOYAEf4gylyNqcFyFHPYOstSUX7x6x4Pk46wd4Wq7MY=; b=XASidFmT7B6JjjDa/aWHEQdGVBpNivwwTO+EvsTcWPqoO10DiY83DCCFtoZkayKPFm wOTsWWFSW/OJBbGqkneEwmD7FgMVEGKsoZx4/WyxrGIK9TAg7r0Uff6pCWXO0CFIZlbt btIbU5jlOmL6D4uQcdOq20jQ64oFExGPDmcoI2EpFVKTW6qthaUpu02BwCh2GU1UY6Ko LkhVWD+FMoMiDDnHopJNlmERVoisiXcuEDTkEkUfpIwaVhpfinzfFoSzKiufT0F5uUGF cEaAvZbn5fhRKfSDt0VgPExIG8YjVNDQeMerCAa9VW0GrPpqWxLp59FhUPKNjwQNLD+n KTTw== X-Gm-Message-State: AOAM5301dW6Wzd1JFvOjQ7RxHYbGGA94h/TKbthEQRWs7Rb2ngFiPIyE 1va13T+o9pkeBMrD/2TOQlDP48OFuIYvc7w= Sender: "saravanak via sendgmr" X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:7220:84ff:fe09:fedc]) (user=saravanak job=sendgmr) by 2002:a0c:ef87:: with SMTP id w7mr18229527qvr.44.1612240428256; Mon, 01 Feb 2021 20:33:48 -0800 (PST) Date: Mon, 1 Feb 2021 20:33:41 -0800 Message-Id: <20210202043345.3778765-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH v2 0/3] Make fw_devlink=on more forgiving From: Saravana Kannan To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Marek Szyprowski , Geert Uytterhoeven , Marc Zyngier , Tudor Ambarus , Linus Walleij , Bartosz Golaszewski , Martin Kaiser , Rob Herring , Frank Rowand , Len Brown Cc: Saravana Kannan , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series solves two general issues with fw_devlink=on Patch 1/3 and 3/3 addresses the issue of firmware nodes that look like they'll have struct devices created for them, but will never actually have struct devices added for them. For example, DT nodes with a compatible property that don't have devices added for them. Patch 2/2 address (for static kernels) the issue of optional suppliers that'll never have a driver registered for them. So, if the device could have probed with fw_devlink=permissive with a static kernel, this patch should allow those devices to probe with a fw_devlink=on. This doesn't solve it for the case where modules are enabled because there's no way to tell if a driver will never be registered or it's just about to be registered. I have some other ideas for that, but it'll have to come later thinking about it a bit. Marek, Geert, I don't expect v2 to do any better for your cases. This series not making any difference for Marek is still a mystery to me. I guess one of the consumers doesn't take too well to its probe (and it's consumers' probe) being delayed till late_initcall(). I'll continue looking into it. Marc, This v2 should do better than v1 with gpiolib stub driver reverted. I forgot to take care of the case where more suppliers could link after I went and deleted some of the links. v2 handles that now. Tudor, You should still make the clock driver fix (because it's a bug), but I think this series will fix your issue too (even without the clock driver fix). Can you please give this a shot? Martin, If you tested this series, can you please give a Tested-by? Thanks, Saravana v1 -> v2: Patch 1: Added a flag to fwnodes that aren't devices. Patch 3: New patch to ise the flag set in patch 1 to not create bad links. Saravana Kannan (3): driver core: fw_devlink: Detect supplier devices that will never be added driver core: fw_devlink: Handle missing drivers for optional suppliers of: property: Don't add links to absent suppliers drivers/base/base.h | 2 + drivers/base/core.c | 135 +++++++++++++++++++++++++++++++++++------ drivers/base/dd.c | 5 ++ drivers/of/property.c | 4 +- include/linux/fwnode.h | 2 + 5 files changed, 127 insertions(+), 21 deletions(-) -- 2.30.0.365.g02bc693789-goog