Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp853876pxb; Mon, 25 Oct 2021 20:40:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMmM/YzM8e+Oo2psdwbxlNDmuPEJT8m3SSdprqWAHqTyfzL8xmCR/eUjVa0levvXmNcie2 X-Received: by 2002:a62:7981:0:b0:47b:cbaa:14ca with SMTP id u123-20020a627981000000b0047bcbaa14camr21456246pfc.79.1635219626508; Mon, 25 Oct 2021 20:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635219626; cv=none; d=google.com; s=arc-20160816; b=vib4CkDjAauyRivNDQDLSjxT/O+T2TXSAJD1FzBjXUkpXfzxdVornIuCjo+WxVyK18 PV9pYZPJAsFKTEjHwgncB2djt6Gh8ZgAeRBeBzwTpHcvOJh3YNxGmfRMQIzKhFw+ldmy S0evNQaplixyNwCnCcu0TgJ+cLXc1EjCfYMbPCJoHcLpYB+eT7UIvk4RmcAYGYrP3rwg fi4+ETlkBuLpAERIvw2cuoB5rCF2rqoVnLKyzlRjMqjM4KwdzzkTck1A4SccK1zA5fBl WzI+Y+aZsn5uR0rW5jAhFAcWTmTyv4s6SogcbSUT+o5Pf9XMFYXpwOr7PFNUy/AhlHiq Q16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Yh3mBEg2nfQJzEtBIxus+8u5VcBe7iEDAWACHn4tN4=; b=yox8E0K/umdVwk8CWo4/OJvHh+iNAiOTR96koiQ9MuIPdhNy6JuYPBHQmbWS1IJxkE PG4vwxif5xUO0Q6R5xOdQDhwPAazR6z08+PzT0UPXoM402Faq0F4bSBPrnt1c0jtZdFv 1ZYGNpO4UYZtT5fpu2k6C/ydnr6ptMTSoEnR9hgGXEzKZYYQ0QCU9vmVLK2dxQZH9QUH qRs3Hmh6+cQQVmOXFV2LqFnSO0DtNNjOreTm1RI0+kpbAoqR3I2m1v5ecjXNdGkCEuGO mQNjv+G5HsIAF5qIZoU45IuutybepxbDpHfY1MpKfRzcnM7htl7TlCc2wEGTAk/r4VV/ Z4iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kLBZm52e; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e27si26929845pgl.492.2021.10.25.20.40.12; Mon, 25 Oct 2021 20:40:26 -0700 (PDT) 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=@chromium.org header.s=google header.b=kLBZm52e; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236211AbhJZAFx (ORCPT + 99 others); Mon, 25 Oct 2021 20:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235790AbhJZADg (ORCPT ); Mon, 25 Oct 2021 20:03:36 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D543AC06122F for ; Mon, 25 Oct 2021 17:01:12 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id s24so5033615plp.0 for ; Mon, 25 Oct 2021 17:01:12 -0700 (PDT) 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=kLBZm52ebmLLR5AbZCfckYChB8MvSElC/qx7f2IrlZRdFRb7dYfMAReVWRlt+5q8HA /IJF12Z/5mX1d7Kn/IeJvKNQHGVE5crPNApZM0bjKBbG1K7AhGHJpzjZ2XXUwpMtdgX+ WOcRzpaGqQgq4wo8RQved67DuU874XycCEF1A= 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=Mc1i9z01++cNcjOn0HI6inzHE/pi0bTYlM2IwaN/LA9OboYFQUNAa3lmCjIKvKk6mp lUvQ8J5WD1lC+cpSOlYShz5hUltdW48z9/6G8QtWO+4gY5dQOdQE51XofTqNE4AHsXt2 0vHQb2O7iEv1LrZtAQFbzc318AgoX0xPpkJGL8UNFU7Y4Ot8BqyePUafHRQCsU7c13j1 f99Xeoi8GinP+kpwBko3Lm8kfJ0E/MvQLBmAopvj25072T5UQPfD7y/2XKHQiGyXVNo3 mmlAchHZo02QYvzPcvv2e87rsnRm4cBaRqI6j3TCaLO3DLyxhIiklf7aUw9R7ZvKoHd5 OXwA== X-Gm-Message-State: AOAM533CIMH/C8YF/GGPQSL7yDZLRt+o5j9YJuaLIij1/zXcna0vfAOu mTofVnlyFKar6mLu8MwiCgY82g== X-Received: by 2002:a17:903:2c2:b029:101:9c88:d928 with SMTP id s2-20020a17090302c2b02901019c88d928mr19413256plk.62.1635206472429; Mon, 25 Oct 2021 17:01:12 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:f5e3:5eb1:d5ee:6893]) by smtp.gmail.com with ESMTPSA id b7sm9900747pfm.28.2021.10.25.17.01.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 17:01:12 -0700 (PDT) From: Stephen Boyd To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, Daniel Vetter , "Rafael J. Wysocki" , Rob Clark , Russell King , Saravana Kannan Subject: [PATCH v3 30/34] fbdev: omap2: Migrate to aggregate driver Date: Mon, 25 Oct 2021 17:00:40 -0700 Message-Id: <20211026000044.885195-31-swboyd@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211026000044.885195-1-swboyd@chromium.org> References: <20211026000044.885195-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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