Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp758278pxb; Fri, 28 Jan 2022 09:19:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoRf0E/lSaQFy7oXLOBc/bYOTygDwRR6vlAUwhOkO58QJnT52s1klAmgjabWDnerwe1/BT X-Received: by 2002:a62:b40e:: with SMTP id h14mr9261376pfn.79.1643390374569; Fri, 28 Jan 2022 09:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643390374; cv=none; d=google.com; s=arc-20160816; b=LYcFhwMW7YkyGvUW+PzsyOvEGsvZ5dEmITpc+Wwf7lbbRnx76s/ZxaVzC8EC0vdNE7 AlNdEGWYxEyeZ5TJiVe3MFIRQuZKHqOtvCRZCxhhmKkOoKO4PMAJnlyz0+ev+OE1zeuZ fA2Ha9HsosmO4Xz3ldqOj2syemj9F/Pd4DgRLUeKkMaz3ndzW1LExEU8AYMqlHrwUx9V qQL+H1QFeHj6wGQGNe8myTcoFMC+yD5iIdFJWCBDYlwRpbiLFZrT06IrNV7EBYldqRA+ Qx3bLI3aIJ7M+sojLxGqdi2nk4UyHv7PyRUUfrY1RXl8hdZP2FJmOvNFL+6Yflafmls0 Bx1g== 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=91Z2d0mjHlreqpecJ7pSmgXY2IVlH38FqXsuAjWZmko=; b=02vIjsu9ll73Q2/kz2b5lRdsXhoxdU/uM5RtBXY0jYlS3WnAIoHb7u9czIoq4OifEY 2xxtkeeDjf6qYQgtxpe+X486S1DywVMixX0+K2XViNRlDEDAG2NgRdMlPNrD4bH9skIQ RTNKHQEnJ7wDWUIlAOkr/ORj5gWU1s0Z1A39HpnFwnUPfkmitale2zEGsPM2/QSQVyQU YdDnBJ1I0E83CjIM5+l9LV1tp2G7hIcfNIPCqFbIcrFg+Helkg9lfw1bvPtFcpmpMLgF MTn4dZfJ/TxqL46w2M7ZZIhQcLQittD5PQv0Q10SOqKOMSz1EhIQWhxJj7n+QYdg0EYs 6z3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=azXGQXgK; 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 nu4si3301439pjb.173.2022.01.28.09.19.22; Fri, 28 Jan 2022 09:19:34 -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=@chromium.org header.s=google header.b=azXGQXgK; 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 S240390AbiA0UDu (ORCPT + 99 others); Thu, 27 Jan 2022 15:03:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343746AbiA0UCe (ORCPT ); Thu, 27 Jan 2022 15:02:34 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86503C06177A for ; Thu, 27 Jan 2022 12:02:32 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id v74so3809828pfc.1 for ; Thu, 27 Jan 2022 12:02:32 -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=91Z2d0mjHlreqpecJ7pSmgXY2IVlH38FqXsuAjWZmko=; b=azXGQXgKkiXx9Hrb2SvK5M/d+nnYVFTKHAAmgUFanjAJD8SmcK8n3rWARtQsmdzh1w uT0oNhth/wwX7p41tikgOyhpCmwn7PJgfgI7N8EJxphlXwshQpQiPh+AyY1cRqwxa6YN fLmW6iHObG4gITceNhHTVVf1OF7Mysd4CU0IY= 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=91Z2d0mjHlreqpecJ7pSmgXY2IVlH38FqXsuAjWZmko=; b=3QM5RSVusFKoiCKgBBjo7P0DQGyZrcAVYDbDUVcoUtP2PWW8sjXMfPf7x6I3OXDdGc uR13ZVTDEL39RQgBzlY+aTbopN4nxjdNrqddrPK54cWCuzaeCZlpg0Ebnk1ZwaiMXFVJ 6fCK6LYbM1com2U01YioK25FxjCCUY2oRAztQEihKahJl9tSFZgQg/tpfRB1I+v+XPox 6LMpL2owfXqGeKOL1sxIjJo/m0/gjQp69YveRgkO1C5HYJxagjs8klbeGFhbAxYc8ETW buBMNRYnX60zDQEsju08nY8zIoUBgkNBPTVsRhqNPaFExyHYVABs59udq859xv1FG/J3 iNpQ== X-Gm-Message-State: AOAM531FLNhH82q71LPl5Pyg0Qp1u+sRdAZo9q+JV63W+7UJD4mOGIoZ s0ePXpg6MTXifbY0R7DAsHRSTg== X-Received: by 2002:a65:6041:: with SMTP id a1mr3876357pgp.231.1643313752060; Thu, 27 Jan 2022 12:02:32 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:9246:1838:3243:3071]) by smtp.gmail.com with ESMTPSA id k21sm6561190pff.33.2022.01.27.12.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 12:02:31 -0800 (PST) From: Stephen Boyd To: Greg Kroah-Hartman , Douglas Anderson 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 v6 28/35] fbdev: omap2: Migrate to aggregate driver Date: Thu, 27 Jan 2022 12:01:34 -0800 Message-Id: <20220127200141.1295328-29-swboyd@chromium.org> X-Mailer: git-send-email 2.35.0.rc0.227.g00780c9af4-goog In-Reply-To: <20220127200141.1295328-1-swboyd@chromium.org> References: <20220127200141.1295328-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..0bdb9f909992 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 = aggregate_device_parent(adev); 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 = aggregate_device_parent(adev); 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