From patchwork Wed Sep 29 00:07:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 12524213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5AC5C433EF for ; Wed, 29 Sep 2021 00:11:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EF93613B1 for ; Wed, 29 Sep 2021 00:11:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8EF93613B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version: Message-Id:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sw9a+9mIC868LowVghjWCKv1OPf7yYqXE9FjwNKTRUc=; b=1FW S8uQNeGf/qmr74LxhUVaBUyaroUfIRWWdoSf8nvtCh9tDkAiNxSZbCRwiTkLZZPrGePs306mz53wK aLqj45Q2WtUq5B0BLkTKhq0s7pGqAbjvyGfmS+q/k2LLaP4vWrrnD5NE59PM2i7XUsxoWRX4dK6Hb ifiso55KI7aO0L9LUcEBJ33NMXYkl2dMoJm6WZhLlNoagzYmT0W351wGjxP5uIgmicX1ELh6RzTuj rphP4BacN2r34gedAl+HURFOxV4FylX0Zqlcs1UJgCuc1BAeOr9EjZsjnN8VZPOD+il4u4ELtNFcV mN33xAs+8QlFBnfAvPaOLLZcsguzxdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVN8r-009S1v-G9; Wed, 29 Sep 2021 00:08:11 +0000 Received: from mail-qv1-xf49.google.com ([2607:f8b0:4864:20::f49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVN8P-009Rtl-1L for linux-arm-kernel@lists.infradead.org; Wed, 29 Sep 2021 00:07:44 +0000 Received: by mail-qv1-xf49.google.com with SMTP id e6-20020a0cb446000000b0037eeb9851dfso2472930qvf.17 for ; Tue, 28 Sep 2021 17:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=7bhHNrTbsYTqBLjHn1hrc5X3bZzxwJdrljl1/EisLbY=; b=SFhQ44BEJvgZXM6Y3b8tJZsJVKICkrX+cWoxn4bjqC2mJRMaLw4+CVQZwT428ZQVKj vo8dtohZv8E8JOCNJC1+VtMvhM9rM4fzGcrEZwFVOjZGBQszHQfDrWEx4r3m7AB8kT4P VtCwFEUlgOGc3GFKkdJA/FIh1CpYSCTl7U3hzUk8EUVoPFZ+/UXjzr4ryIUkYbE4ERvX 7FlwQoXubV/0ubzcWcwpUNs4t61aWfq2FGaFVr15uLaavAEiZio8P4X7LcCzXyz63Dmf +CmAYkmlBNJTqdfIcNTM4vFZ6GyoHas+dKz3n+r769jAFgbjqcWYOvewAX7WZUdQ+h9A QGsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=7bhHNrTbsYTqBLjHn1hrc5X3bZzxwJdrljl1/EisLbY=; b=OiYtVdQxQGMQusYpg3wO2uOztjmTbhOeXlOrsJhtPvaBmRt6mpXS5q0/AVjkms42Ki 2ktsUSU3HwNOov5N2+bJ3dq+2EqN/yhbrvGqFlIkIcuyZhEKo2tjrC1vN8k1sLFBOl3q Qh3TkcZrawQfR85Wq2c2BMZ7MMzxH3O/V/5pwqUKQFxFxhKZdGEdeH0fJ/sGb//yQVTZ EMdtVuIY2B+mKZVC1BtFp3aXbyQlvr5beaHmkqszhSrpxDkMGef45oPPauQiM+W7nK8t IKOU+ePWLzM3z8ndbv7kGecNV8CWY9jPHQX3hZ7lXS3Af9q7YOxxAygR3YX22EoRpwST xCog== X-Gm-Message-State: AOAM533GJ+bh7XPnHBXc1r6gVj8ZUtD463+cFhNCLw5iGTECWDVmXq/u 78TuirbnSGg2PrJt0h2X22SV3znIeVV9raU= X-Google-Smtp-Source: ABdhPJye4QI1NEVEPWMBOPRbcvbdZVtnBhd3yJ370PIHC8VFWHXatkZn+kG3+hbWIbfGsm/EDJi2ogilCFhtxyw= X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:5241:a7e9:90c9:9c91]) (user=saravanak job=sendgmr) by 2002:ad4:4652:: with SMTP id y18mr8331213qvv.31.1632874058881; Tue, 28 Sep 2021 17:07:38 -0700 (PDT) Date: Tue, 28 Sep 2021 17:07:32 -0700 Message-Id: <20210929000735.585237-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v4 0/2] Fix simple-bus issues with fw_devlink From: Saravana Kannan To: Russell King , Neil Armstrong , Geert Uytterhoeven , Magnus Damm , Tony Lindgren , Catalin Marinas , Will Deacon , Damien Le Moal , Greg Kroah-Hartman , Saravana Kannan Cc: Ulf Hansson , Rob Herring , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-oxnas@groups.io, linux-renesas-soc@vger.kernel.org, linux-omap@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_170741_112378_138B2110 X-CRM114-Status: GOOD ( 15.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ulf reported an issue[1] with fw_devlink. This series tries to fix that issue. I replicated a similar set up on my end and I confirmed: - A simple-bus only device is probed. - Another device listing simple-bus as a 2nd compatible string isn't probed. v1->v2: - Switched to probing the simple-bus device instead of marking it as NEVER_PROBES. v2->v3: - Moved all the code into the simple-pm-bus driver - Addressed Ulf's comment about the remove() code missing a check. v3->v4: - Added support for driver_override to accommodate the case where new transparent bus compatible strings are added to DT, but the kernel hasn't been updated yet. - Added/updated comments to give more details. - Adding Ulf's Tested-by that he have for v3 (v4 didn't change by much). Thanks, Saravana [1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/ Cc: Ulf Hansson Cc: Geert Uytterhoeven Cc: Rob Herring Saravana Kannan (2): drivers: bus: simple-pm-bus: Add support for probing simple bus only devices drivers: bus: Delete CONFIG_SIMPLE_PM_BUS arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/configs/oxnas_v6_defconfig | 1 - arch/arm/configs/shmobile_defconfig | 1 - arch/arm/mach-omap2/Kconfig | 1 - arch/arm64/configs/defconfig | 1 - drivers/bus/Kconfig | 12 --------- drivers/bus/Makefile | 2 +- drivers/bus/simple-pm-bus.c | 42 ++++++++++++++++++++++++++--- drivers/soc/canaan/Kconfig | 1 - 9 files changed, 40 insertions(+), 22 deletions(-) Tested-by: Damien Le Moal Tested-by: Tony Lindgren