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/[email protected]):
 - 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/[email protected]):
 - 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/[email protected]):
 - 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/[email protected]):
 - 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/[email protected]):
 - 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/[email protected]

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 <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Chen Feng <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Christian Gmeiner <[email protected]>
Cc: Chun-Kuang Hu <[email protected]>
Cc: Chunyan Zhang <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Emma Anholt <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Cc: "Heiko Stübner" <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: James Qian Wang (Arm Technology China) <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Kai Vehmanen <[email protected]>
Cc: Kevin Tang <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Lucas Tanure <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Orson Zhai <[email protected]>
Cc: Paul Cercueil <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Russell King <[email protected]>
Cc: Russell King <[email protected]>
Cc: Russell King <[email protected]>
Cc: Sandy Huang <[email protected]>
Cc: Saravana Kannan <[email protected]>
Cc: Sebastian Reichel <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Stefan Binding <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Tian Tao <[email protected]>
Cc: Tomas Winkler <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Xinliang Liu <[email protected]>
Cc: Xinwei Kong <[email protected]>
Cc: Yong Wu <[email protected]>
Cc: Vitaly Lubart <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Kai Vehmanen <[email protected]>

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

Reply via email to