linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/35] component: Make into an aggregate bus
@ 2022-01-27 20:01 Stephen Boyd
  2022-01-27 20:01 ` [PATCH v6 01/35] component: Replace most references to 'master' with 'aggregate device' Stephen Boyd
                   ` (34 more replies)
  0 siblings, 35 replies; 47+ messages in thread
From: Stephen Boyd @ 2022-01-27 20:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Douglas Anderson
  Cc: linux-kernel, linux-arm-msm, dri-devel, freedreno, Arnd Bergmann,
	Baolin Wang, Chen Feng, Chen-Yu Tsai, Christian Gmeiner,
	Chun-Kuang Hu, Chunyan Zhang, Daniel Vetter, Emma Anholt,
	Heikki Krogerus, Heiko Stübner, Inki Dae, James Qian Wang,
	Jaroslav Kysela, Joerg Roedel, John Stultz, Joonyoung Shim,
	Jyri Sarha, Kai Vehmanen, Kevin Tang, Kyungmin Park,
	Laurent Pinchart, linux-fbdev, linux-omap, linux-pm,
	Linus Walleij, Liviu Dudau, Lucas Stach, Lucas Tanure,
	Maarten Lankhorst, Mark Brown, Maxime Ripard, Neil Armstrong,
	Orson Zhai, Paul Cercueil, Philipp Zabel, Rafael J. Wysocki,
	Rob Clark, Russell King, Russell King, Russell King, Sandy Huang,
	Saravana Kannan, Sebastian Reichel, Seung-Woo Kim,
	Stefan Binding, Takashi Iwai, Tian Tao, Tomas Winkler,
	Tomi Valkeinen, Will Deacon, Xinliang Liu, Xinwei Kong, Yong Wu,
	Vitaly Lubart, Daniele Ceraolo Spurio, Rodrigo Vivi

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.

Per Daniel, I've resent this to collect Acks or Review tags from gregkh
and once Greg is happy with the driver core bits it can be merged
through drm-misc tree via dianders (both are on the To line).

Changes since v5 (https://lore.kernel.org/r/20220106214556.2461363-1-swboyd@chromium.org):
 - Refcount the driver registration to support multiple device usage
 - Fix runtime PM in MediaTek iommu patch
 - Rebased to v5.17-rc1 and converted new component uses
 - No longer expose struct aggregate_device in component.h header

Changes since v4 (https://lore.kernel.org/r/20211202222732.2453851-1-swboyd@chromium.org):
 - Picked up tags
 - Moved rename patch to first in the series
 - Squashed device and bus type patch together

Changes since v3 (https://lore.kernel.org/r/20211026000044.885195-1-swboyd@chromium.org):
 - Picked up tags
 - Rebased to v5.16-rc2
 - Updated component.c for a few new patches there
 - Dropped a conversion patch
 - Added a conversion patch

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 (35):
  component: Replace most references to 'master' with 'aggregate device'
  component: Introduce the aggregate bus_type
  component: Add aggregate_device_parent() for driver use
  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
  iommu/mediatek: 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
  drm/sprd: Migrate to aggregate driver
  usb: typec: port-mapper: Migrate to aggregate driver
  ALSA: hda/realtek: Migrate to aggregate driver
  component: Get rid of drm_of_component_probe()
  component: Remove component_master_ops and friends

 drivers/base/component.c                      | 571 +++++++++++-------
 .../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                 |  48 +-
 drivers/gpu/drm/omapdrm/dss/dss.c             |  20 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |  20 +-
 drivers/gpu/drm/sprd/sprd_drm.c               |  48 +-
 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/iommu/mtk_iommu.c                     |  14 +-
 drivers/iommu/mtk_iommu.h                     |   6 +-
 drivers/iommu/mtk_iommu_v1.c                  |  14 +-
 drivers/memory/mtk-smi.c                      |  10 +-
 drivers/misc/mei/hdcp/mei_hdcp.c              |  22 +-
 drivers/misc/mei/pxp/mei_pxp.c                |  22 +-
 drivers/power/supply/ab8500_charger.c         |  22 +-
 drivers/usb/typec/port-mapper.c               |  22 +-
 drivers/video/fbdev/omap2/omapfb/dss/dss.c    |  20 +-
 include/drm/drm_of.h                          |  10 +-
 include/linux/component.h                     |  96 ++-
 sound/hda/hdac_component.c                    |  21 +-
 sound/pci/hda/patch_realtek.c                 |  20 +-
 sound/soc/codecs/wcd938x.c                    |  20 +-
 37 files changed, 863 insertions(+), 532 deletions(-)

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emma Anholt <emma@anholt.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Jyri Sarha <jyri.sarha@iki.fi>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Kevin Tang <kevin3.tang@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: <linux-fbdev@vger.kernel.org>
Cc: <linux-omap@vger.kernel.org>
Cc: <linux-pm@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Lucas Tanure <tanureal@opensource.cirrus.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Tian Tao <tiantao6@hisilicon.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Tomi Valkeinen <tomba@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Xinliang Liu <xinliang.liu@linaro.org>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Yong Wu <yong.wu@mediatek.com>
Cc: Vitaly Lubart <vitaly.lubart@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>

base-commit: e783362eb54cd99b2cac8b3a9aeac942e6f6ac07
-- 
https://chromeos.dev


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2022-02-15 17:35 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 20:01 [PATCH v6 00/35] component: Make into an aggregate bus Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 01/35] component: Replace most references to 'master' with 'aggregate device' Stephen Boyd
2022-01-31 13:48   ` Greg Kroah-Hartman
2022-01-27 20:01 ` [PATCH v6 02/35] component: Introduce the aggregate bus_type Stephen Boyd
2022-01-31 13:48   ` Greg Kroah-Hartman
2022-01-31 15:15     ` Daniel Vetter
2022-01-31 15:32       ` Laurent Pinchart
2022-01-31 16:34       ` Greg Kroah-Hartman
2022-02-08 12:53         ` Daniel Vetter
2022-02-11  2:04           ` Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 03/35] component: Add aggregate_device_parent() for driver use Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 04/35] component: Add {bind,unbind}_component() ops that take aggregate device Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 05/35] drm/of: Add a drm_of_aggregate_probe() API Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 06/35] drm/msm: Migrate to aggregate driver Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 07/35] drm/komeda: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 08/35] drm/arm/hdlcd: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 09/35] drm/malidp: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 10/35] drm/armada: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 11/35] drm/etnaviv: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 12/35] drm/kirin: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 13/35] drm/exynos: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 14/35] drm/imx: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 15/35] drm/ingenic: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 16/35] drm/mcde: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 17/35] drm/mediatek: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 18/35] drm/meson: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 19/35] drm/omap: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 20/35] drm/rockchip: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 21/35] drm/sti: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 22/35] drm/sun4i: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 23/35] drm/tilcdc: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 24/35] drm/vc4: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 25/35] iommu/mediatek: " Stephen Boyd
2022-02-10 11:03   ` Yong Wu
2022-02-15 17:35     ` Krzysztof Kozlowski
2022-01-27 20:01 ` [PATCH v6 26/35] mei: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 27/35] power: supply: ab8500: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 28/35] fbdev: omap2: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 29/35] sound: hdac: " Stephen Boyd
2022-01-31  8:18   ` Takashi Iwai
2022-01-27 20:01 ` [PATCH v6 30/35] ASoC: codecs: wcd938x: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 31/35] drm/sprd: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 32/35] usb: typec: port-mapper: " Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 33/35] ALSA: hda/realtek: " Stephen Boyd
2022-01-28 15:31   ` Stefan Binding
2022-01-27 20:01 ` [PATCH v6 34/35] component: Get rid of drm_of_component_probe() Stephen Boyd
2022-01-27 20:01 ` [PATCH v6 35/35] component: Remove component_master_ops and friends Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).