From patchwork Thu Sep 2 23:04:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 505833 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=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham 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 1B27DC433F5 for ; Thu, 2 Sep 2021 23:04:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 025D7610A1 for ; Thu, 2 Sep 2021 23:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348530AbhIBXFv (ORCPT ); Thu, 2 Sep 2021 19:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348529AbhIBXFu (ORCPT ); Thu, 2 Sep 2021 19:05:50 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE33DC061575 for ; Thu, 2 Sep 2021 16:04:51 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id f64-20020a2538430000b0290593bfc4b046so4524567yba.9 for ; Thu, 02 Sep 2021 16:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=fE4xWbnNUsaH2L2+9e5Jc7xWeW6lJkVzW9cJr5tZCTo=; b=H+Pvky7XU9ApAtzwgpgQVBA1tHgUZtMeP5w3daltJpilyFci7Rzq5wpVDReU38JFzr 4YfB0wERKVKz4KGFlZPTfMGyn+JCX1VswHHkFPf8bN16ODi9e3hY0BevWI5Tz2QcTMug +diSdJBgTG73ywUdQT4hqxzOnYeqhWWaJCdFxLzBXqYuMfowNu4XNAREsttUCS5K58Cd LWpqkJfAwbIIOYOA0dUwhrTTyxy8qdK41/dzkGdKYrSSancrEiR4xCtKW2uNlnnn6C5C CyjniDyeQaxbraSES6WCwQyI9mbjsUeNSaYLyopI1U383UCtHrmM1a18KMJ1dex7LDwT 0NgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=fE4xWbnNUsaH2L2+9e5Jc7xWeW6lJkVzW9cJr5tZCTo=; b=uF8P3d0vilPul1dIKB0fJrV/9M3Tp4qAuAQTQEfMWWYNZcRwt+ntls1LGzGXoKHgB2 qgih+sJgdd4KFhKLbl7AmfkijJKI1fa46NESsC7Ep4ldI5+lNFH5Z1VWEx0DZ4N1xwfW VMdLOu/vZJFNyNkl4ZgzIfCne1phXmnmkb67x28mjxJUoVasBCtkACKy4a47e13l+ZLk 1MLbNoylxcrj88DZn+lCws6wZy8aBL3Zjhy4iyVtLEuejPiK2YboKaqUMoQuJVzqftcH B+6ewfPKeahp9LkStqtZlSheHH3fl9T19KkxOIuFBOBB5A6RfvPkKGr6R08Y4fY6+oLV 3Bnw== X-Gm-Message-State: AOAM533UJrtM98OdjU3ALncYxbE4lMyCw3R5r1uxoA218jQJhPTASfkh yPXWaheTo8xZ9CtgForGsjB65RpojR/AKo8= X-Google-Smtp-Source: ABdhPJxWgcYcIBBK376uC3gnVCUb/S4Lj9Rk7QhgF79UpRu0Ye+Nb1O88qm7IOAAT/bpyFwsdRjCxBFBgy1vRQc= X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:7cb7:1ee7:33cb:da76]) (user=saravanak job=sendgmr) by 2002:a25:1bc6:: with SMTP id b189mr1031877ybb.338.1630623890909; Thu, 02 Sep 2021 16:04:50 -0700 (PDT) Date: Thu, 2 Sep 2021 16:04:41 -0700 In-Reply-To: <20210902230442.1515531-1-saravanak@google.com> Message-Id: <20210902230442.1515531-3-saravanak@google.com> Mime-Version: 1.0 References: <20210902230442.1515531-1-saravanak@google.com> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog Subject: [PATCH v2 2/2] drivers: bus: simple-pm-bus: Add support for probing simple bus only devices From: Saravana Kannan To: Rob Herring , Frank Rowand Cc: Saravana Kannan , Ulf Hansson , Geert Uytterhoeven , kernel-team@android.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The OF platform code sets up simple bus only devices (i.e. devices that won't match with any other driver) to get probed by the simple-pm-bus to keep fw_devlink from blocking probe() or sync_state() [1] callbacks of other devices. There's no need to populate the child devices since the OF platform code would do that anyway, so return early for these simple bus only devices. [1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/ Signed-off-by: Saravana Kannan Tested-by: Saravana Kannan --- drivers/bus/simple-pm-bus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 01a3d0cd08ed..91d52021b7f9 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -19,6 +19,13 @@ static int simple_pm_bus_probe(struct platform_device *pdev) const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev); struct device_node *np = pdev->dev.of_node; + /* + * These are transparent bus devices (not simple-pm-bus matches) that + * get populated automatically. So, don't need to do anything more. + */ + if (pdev->driver_override) + return 0; + dev_dbg(&pdev->dev, "%s\n", __func__); pm_runtime_enable(&pdev->dev);