Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp842174pxb; Mon, 25 Oct 2021 20:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZelT04PBCl94mGcpWNnxZP/gBMFRmh5gRbNRdGKAEIVpwo3d2I2pUwQYXEO4OyQnN6Agb X-Received: by 2002:a17:906:3fc1:: with SMTP id k1mr28226718ejj.44.1635218470489; Mon, 25 Oct 2021 20:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635218470; cv=none; d=google.com; s=arc-20160816; b=qvfhO/XcVh7PTubvhIXI59wThDxreEOenUV4z8+T79cCt+QVxtCCCq4XnimrBO1Wte iru4qfJxwJEt2U+bR2BWrR2NyVLuFKZp8W6wYfy0V6LamxMIz7EPO+I+6+pGJjvAHuUk gZoXVUFX3pEJu5Pdht/F09m9SvuHJcGgUm9YxEaeXclTleMSuIzWGtPqDcNROd022dag Qaapg4d0N7ivSlIt4FqhNqJHCBKsz6wQVnuFHaefG4KD8QMXZ6X3jSq6KzcdybEghUzU fOX1InhyvGtxclPHgGlbSnQn7eu8FSyrc1L3LRke1Miq0H/iDdDcDRcAccDelyUdbfaJ n/Ng== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hVtm5VmIX53N/m0Y93GQ8NnzFNcJLh+fSgNJkLUzoBQ=; b=cXYoEQlmDEyMJ+3rkd6C7geYnAvVLLlbu7kkJLsmCAlGanFerZDZ8fQuo03t8WxZvW ZoXz14CIsXS6XDFIRW+5BUZ+RNDdGv6nJenZ+jhVsjBrl8Pv7jkkILrQqHQme34LoQWS tuhu5A+s7kpBHgNP1W6pIo9tJVbhMYvd32U2IRARcEFkGbE3iRXMzIjoRPg2FECxd86u iRd5j0mmTSLrXRpP9XbrmXre7weK4ACOtiLLvYpDcQRxUPPYfZMUq2QwFo/CGdbrU7uV uHu/DvHmX1+klY17WauLj7qFiVQQpCEYMUyhf1ppuD9pwny7fp4ryJjLNOOMYDfaLuBC Pt5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UoV8niq8; 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 gt42si3987198ejc.129.2021.10.25.20.20.46; Mon, 25 Oct 2021 20:21:10 -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=UoV8niq8; 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 S235515AbhJZADP (ORCPT + 99 others); Mon, 25 Oct 2021 20:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233035AbhJZADK (ORCPT ); Mon, 25 Oct 2021 20:03:10 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D69CC061767 for ; Mon, 25 Oct 2021 17:00:47 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id i5so9023813pla.5 for ; Mon, 25 Oct 2021 17:00:47 -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:mime-version :content-transfer-encoding; bh=hVtm5VmIX53N/m0Y93GQ8NnzFNcJLh+fSgNJkLUzoBQ=; b=UoV8niq8Fg3t0VgyL/cuMnFIHA75+zfSZlyLNmgbDDuBCJyWdlw1o6lIPq6tD95EXa OMtJAi/LFpQySAmIMbQXKoKwX0xiCeYsAcWJfFgXHiUm8p+7raqYMic/dUCXn7IfksaI fgz8DZ8zfukC1oZPLIAyYkmhQgZ5vZTihtICY= 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:mime-version :content-transfer-encoding; bh=hVtm5VmIX53N/m0Y93GQ8NnzFNcJLh+fSgNJkLUzoBQ=; b=J6ijxMTzUP2PxBca1aRzKdkg1T4scbva38DyukRuabnVBKtPhXbksHV5xlphuEP7ky CA/9yaWH0RexiElW+cJRFkiOVS7wSkjvLCTkmNyhfQKnGWuj3AZKAsBJEIMZ8hBoJJzk bm21oqt02xlgrXlXmuOOl7gNo3Iaqc+eCbvZi886a5uSDOL3BjjlAfGdt0SYCGINTtKC RL1St+SxZ+49LvuDbOct126SgGxyx1ZBdcrAM4kAyuwMgBPtdNV8kL89qojTKf3bRcJp e3AqCHXfc0sZ4lfG1GC4RmSnk4/upvWc+BqvntSMofcCuJShkQndtPNaUzIkH8789rsS gp/A== X-Gm-Message-State: AOAM531d+E/Gz3ixSj0il3XQxJ9hTES2O39N5OR9ztT3ccNaG6eXeJIs g2DIv6VtK76tnFwAFiF0D8tg9A== X-Received: by 2002:a17:902:8bcc:b0:13f:ea68:a135 with SMTP id r12-20020a1709028bcc00b0013fea68a135mr19698483plo.41.1635206446478; Mon, 25 Oct 2021 17:00:46 -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.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 17:00:46 -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, Arnd Bergmann , Benjamin Gaignard , Chen Feng , Chen-Yu Tsai , Christian Gmeiner , Chun-Kuang Hu , Daniel Vetter , Emma Anholt , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Inki Dae , James Qian Wang , Jaroslav Kysela , Joerg Roedel , John Stultz , Joonyoung Shim , Jyri Sarha , Kai Vehmanen , Kyungmin Park , Laurent Pinchart , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, Linus Walleij , Liviu Dudau , Lucas Stach , Mark Brown , Maxime Ripard , Neil Armstrong , Paul Cercueil , Philipp Zabel , "Rafael J. Wysocki" , Rob Clark , Russell King , Russell King , Russell King , Sandy Huang , Saravana Kannan , Sebastian Reichel , Seung-Woo Kim , Takashi Iwai , Tian Tao , Tomas Winkler , Tomi Valkeinen , Will Deacon , Xinliang Liu , Xinwei Kong , Yong Wu Subject: [PATCH v3 00/34] component: Make into an aggregate bus Date: Mon, 25 Oct 2021 17:00:10 -0700 Message-Id: <20211026000044.885195-1-swboyd@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is from discussion we had on reordering the device lists for drm shutdown paths[1]. I've introduced an 'aggregate' bus that we put the aggregate device onto and then we probe the aggregate device once all the components are probed and call component_add(). The probe/remove hooks are where the bind/unbind calls go, and then a shutdown hook is added that can be used to shutdown the drm display pipeline at the right time. This works for me on my sc7180 board. I no longer get a warning from i2c at shutdown that we're trying to make an i2c transaction after the i2c bus has been shutdown. There's more work to do on the msm drm driver to extract component device resources like clks, regulators, etc. out of the component bind function into the driver probe but I wanted to move everything over now in other component drivers before tackling that problem. Tested-by tags would be appreciated, and Acked-by/Reviewed-by tags too. I sent this to gregkh which may be incorrect but I don't know what better tree to send it all through. Maybe drm? Changes since v2 (https://lore.kernel.org/r/20211006193819.2654854-1-swboyd@chromium.org): - Picked up acks - Fixed build warnings/errors - Reworked patch series to rename 'master' in a different patch Changes since v1 (https://lore.kernel.org/r/20210520002519.3538432-1-swboyd@chromium.org): - Use devlink to connect components to the aggregate device - Don't set the registering device as a parent of the aggregate device - New patch for bind_component/unbind_component ops that takes the aggregate device - Convert all drivers in the tree to use the aggregate driver approach - Allow one aggregate driver to be used for multiple aggregate devices [1] https://lore.kernel.org/r/20210508074118.1621729-1-swboyd@chromium.org Stephen Boyd (34): component: Introduce struct aggregate_device component: Remove most references to 'master' component: Introduce the aggregate bus_type component: Move struct aggregate_device out to header file component: Add {bind,unbind}_component() ops that take aggregate device drm/of: Add a drm_of_aggregate_probe() API drm/msm: Migrate to aggregate driver drm/komeda: Migrate to aggregate driver drm/arm/hdlcd: Migrate to aggregate driver drm/malidp: Migrate to aggregate driver drm/armada: Migrate to aggregate driver drm/etnaviv: Migrate to aggregate driver drm/kirin: Migrate to aggregate driver drm/exynos: Migrate to aggregate driver drm/imx: Migrate to aggregate driver drm/ingenic: Migrate to aggregate driver drm/mcde: Migrate to aggregate driver drm/mediatek: Migrate to aggregate driver drm/meson: Migrate to aggregate driver drm/omap: Migrate to aggregate driver drm/rockchip: Migrate to aggregate driver drm/sti: Migrate to aggregate driver drm/sun4i: Migrate to aggregate driver drm/tilcdc: Migrate to aggregate driver drm/vc4: Migrate to aggregate driver drm/zte: Migrate to aggregate driver iommu/mtk: Migrate to aggregate driver mei: Migrate to aggregate driver power: supply: ab8500: Migrate to aggregate driver fbdev: omap2: Migrate to aggregate driver sound: hdac: Migrate to aggregate driver ASoC: codecs: wcd938x: Migrate to aggregate driver component: Get rid of drm_of_component_probe() component: Remove component_master_ops and friends drivers/base/component.c | 540 ++++++++++-------- .../gpu/drm/arm/display/komeda/komeda_drv.c | 20 +- drivers/gpu/drm/arm/hdlcd_drv.c | 21 +- drivers/gpu/drm/arm/malidp_drv.c | 21 +- drivers/gpu/drm/armada/armada_drv.c | 23 +- drivers/gpu/drm/drm_drv.c | 2 +- drivers/gpu/drm/drm_of.c | 18 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 20 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 21 +- .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 20 +- drivers/gpu/drm/imx/imx-drm-core.c | 20 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 25 +- drivers/gpu/drm/mcde/mcde_drv.c | 23 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 20 +- drivers/gpu/drm/meson/meson_drv.c | 21 +- drivers/gpu/drm/msm/msm_drv.c | 46 +- drivers/gpu/drm/omapdrm/dss/dss.c | 17 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 20 +- drivers/gpu/drm/sti/sti_drv.c | 20 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 26 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 28 +- drivers/gpu/drm/vc4/vc4_drv.c | 20 +- drivers/gpu/drm/zte/zx_drm_drv.c | 20 +- drivers/iommu/mtk_iommu.c | 14 +- drivers/iommu/mtk_iommu.h | 6 +- drivers/iommu/mtk_iommu_v1.c | 14 +- drivers/misc/mei/hdcp/mei_hdcp.c | 22 +- drivers/power/supply/ab8500_charger.c | 22 +- drivers/video/fbdev/omap2/omapfb/dss/dss.c | 20 +- include/drm/drm_of.h | 10 +- include/linux/component.h | 92 ++- sound/hda/hdac_component.c | 21 +- sound/soc/codecs/wcd938x.c | 20 +- 33 files changed, 767 insertions(+), 486 deletions(-) Cc: Arnd Bergmann Cc: Benjamin Gaignard Cc: Chen Feng Cc: Chen-Yu Tsai Cc: Christian Gmeiner Cc: Chun-Kuang Hu Cc: Daniel Vetter Cc: Emma Anholt Cc: Greg Kroah-Hartman Cc: "Heiko Stübner" Cc: Inki Dae Cc: James Qian Wang (Arm Technology China) Cc: Jaroslav Kysela Cc: Joerg Roedel Cc: John Stultz Cc: Joonyoung Shim Cc: Jyri Sarha Cc: Kai Vehmanen Cc: Kyungmin Park Cc: Laurent Pinchart Cc: Cc: Cc: Cc: Linus Walleij Cc: Liviu Dudau Cc: Lucas Stach Cc: Mark Brown Cc: Maxime Ripard Cc: Neil Armstrong Cc: Paul Cercueil Cc: Philipp Zabel Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Russell King Cc: Russell King Cc: Sandy Huang Cc: Saravana Kannan Cc: Sebastian Reichel Cc: Seung-Woo Kim Cc: Takashi Iwai Cc: Tian Tao Cc: Tomas Winkler Cc: Tomi Valkeinen Cc: Will Deacon Cc: Xinliang Liu Cc: Xinwei Kong Cc: Yong Wu base-commit: e4e737bb5c170df6135a127739a9e6148ee3da82 -- https://chromeos.dev