From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7D93C433FE for ; Thu, 2 Dec 2021 22:29:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44C546E083; Thu, 2 Dec 2021 22:28:14 +0000 (UTC) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A1CD6FC61 for ; Thu, 2 Dec 2021 22:28:00 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id h24so855655pjq.2 for ; Thu, 02 Dec 2021 14:28:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Yh3mBEg2nfQJzEtBIxus+8u5VcBe7iEDAWACHn4tN4=; b=AxX8KNRZA+wHuQG9cmu6uyQXNXpNtwIq6kReRzvqhC7DKvgVeLsfqNFckio5CqcnDA IambEJt91gZ+LcJwCFW2dxEC4shBxXv8qM4fK3D4PNySlxe0HYd/C91/Ra4VpWir5n9V 3qKVLxBMkK9asro6XoRwUr4AQ4WMfgSFsfgus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Yh3mBEg2nfQJzEtBIxus+8u5VcBe7iEDAWACHn4tN4=; b=DZhF9pRFSjgom2L7jXiNkAWyb2IcDre+0DTEZpz7BBWhk4U5Szc8s6S9fRoiLqD7ka djOEMvmQB2pw+2BQATKeHK+d7IbwHjqlVMwDI/kfb+lpGvLFuMKsi8udYXcq2s7i/v9M ePTMC/NeQTGnKGSui9GKbB6ty9Wuf+AP9LoA0IEMQzgmRWwhHUtzY7B0+RxqtijcfmH7 qZAlxgVWeSQV9Zinpyn/usDDgZYgTRS/1OnpIV7nrxlSxjAUKkQ/D8EYpzIIx8bqxvzp qyBousk4up/zOs3dm7dyP+cAsfi+iXxA1mW3fEJxk+35wkbtH8SywK6PbPJRfMnnmXtM eI5g== X-Gm-Message-State: AOAM530OzndDXC8aZ0/u3WMwLvyTGjgHAzMwoWnDxK+Pz0JI/t0mwI6Y wko/oiNG9QQfZGVdIHPr+Fk9tg== X-Google-Smtp-Source: ABdhPJwWWaoXo6RAa2oS9kAIlappw6GQrq7MVtBMy7vND9JLl0sLERmN8auphygexhOMY9NICZU0VA== X-Received: by 2002:a17:90b:1806:: with SMTP id lw6mr9098680pjb.53.1638484080247; Thu, 02 Dec 2021 14:28:00 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:f4f2:1b7e:5aea:bf3c]) by smtp.gmail.com with ESMTPSA id q9sm836934pfj.9.2021.12.02.14.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 14:27:59 -0800 (PST) From: Stephen Boyd To: Greg Kroah-Hartman Subject: [PATCH v4 29/34] fbdev: omap2: Migrate to aggregate driver Date: Thu, 2 Dec 2021 14:27:27 -0800 Message-Id: <20211202222732.2453851-30-swboyd@chromium.org> X-Mailer: git-send-email 2.34.0.384.gca35af8252-goog In-Reply-To: <20211202222732.2453851-1-swboyd@chromium.org> References: <20211202222732.2453851-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Saravana Kannan , "Rafael J. Wysocki" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Russell King , linux-omap@vger.kernel.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use an aggregate driver instead of component ops so that we can get proper driver probe ordering of the aggregate device with respect to all the component devices that make up the aggregate device. Cc: Cc: Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd --- drivers/video/fbdev/omap2/omapfb/dss/dss.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index a6b1c1598040..f12663c39ceb 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c @@ -1067,8 +1067,9 @@ static int dss_video_pll_probe(struct platform_device *pdev) } /* DSS HW IP initialisation */ -static int dss_bind(struct device *dev) +static int dss_bind(struct aggregate_device *adev) { + struct device *dev = adev->parent; struct platform_device *pdev = to_platform_device(dev); struct resource *dss_mem; u32 rev; @@ -1167,8 +1168,9 @@ static int dss_bind(struct device *dev) return r; } -static void dss_unbind(struct device *dev) +static void dss_unbind(struct aggregate_device *adev) { + struct device *dev = adev->parent; struct platform_device *pdev = to_platform_device(dev); dss_initialized = false; @@ -1188,9 +1190,13 @@ static void dss_unbind(struct device *dev) dss_put_clocks(); } -static const struct component_master_ops dss_component_ops = { - .bind = dss_bind, - .unbind = dss_unbind, +static struct aggregate_driver dss_aggregate_driver = { + .probe = dss_bind, + .remove = dss_unbind, + .driver = { + .name = "dss_fbdev", + .owner = THIS_MODULE, + }, }; static int dss_component_compare(struct device *dev, void *data) @@ -1225,7 +1231,7 @@ static int dss_probe(struct platform_device *pdev) /* add all the child devices as components */ device_for_each_child(&pdev->dev, &match, dss_add_child_component); - r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match); + r = component_aggregate_register(&pdev->dev, &dss_aggregate_driver, match); if (r) return r; @@ -1234,7 +1240,7 @@ static int dss_probe(struct platform_device *pdev) static int dss_remove(struct platform_device *pdev) { - component_master_del(&pdev->dev, &dss_component_ops); + component_aggregate_unregister(&pdev->dev, &dss_aggregate_driver); return 0; } -- https://chromeos.dev