]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drivers: base: component: add function to query the bound status
authorHeiko Stuebner <heiko@sntech.de>
Thu, 20 Feb 2025 23:41:40 +0000 (00:41 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 27 Feb 2025 13:52:37 +0000 (14:52 +0100)
commita6ba2dad0aa4f623ab0def8b6e6888ac00639055
tree0ff3e070d89cbae98c59c744702648131b9aff34
parentb06d1ef3355571383cdb463cf0195b7a02efdfbf
drivers: base: component: add function to query the bound status

The component helpers already expose the bound status in debugfs, but at
times it might be necessary to also check that state in the kernel and
act differently depending on the result.

For example the shutdown handler of a drm-driver might need to stop
a whole output pipeline if the drm device is up and running, but may
run into problems if that drm-device has never been set up before,
for example because the binding deferred.

So add a little helper that returns the bound status for a componet
device.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250220234141.2788785-2-heiko@sntech.de
drivers/base/component.c
include/linux/component.h