mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
When a connector is created, add a `status` file to allow to update the connector status to: - 1 connector_status_connected - 2 connector_status_disconnected - 3 connector_status_unknown If the device is enabled, updating the status hot-plug or unplugs the connector. Tested-by: Mark Yacoub <markyacoub@google.com> Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: José Expósito <jose.exposito89@gmail.com> Link: https://lore.kernel.org/r/20251016175618.10051-17-jose.exposito89@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
36 lines
850 B
C
36 lines
850 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
#ifndef _VKMS_CONNECTOR_H_
|
|
#define _VKMS_CONNECTOR_H_
|
|
|
|
#include "vkms_drv.h"
|
|
|
|
#define drm_connector_to_vkms_connector(target) \
|
|
container_of(target, struct vkms_connector, base)
|
|
|
|
/**
|
|
* struct vkms_connector - VKMS custom type wrapping around the DRM connector
|
|
*
|
|
* @drm: Base DRM connector
|
|
*/
|
|
struct vkms_connector {
|
|
struct drm_connector base;
|
|
};
|
|
|
|
/**
|
|
* vkms_connector_init() - Initialize a connector
|
|
* @vkmsdev: VKMS device containing the connector
|
|
*
|
|
* Returns:
|
|
* The connector or an error on failure.
|
|
*/
|
|
struct vkms_connector *vkms_connector_init(struct vkms_device *vkmsdev);
|
|
|
|
/**
|
|
* vkms_trigger_connector_hotplug() - Update the device's connectors status
|
|
* @vkmsdev: VKMS device to update
|
|
*/
|
|
void vkms_trigger_connector_hotplug(struct vkms_device *vkmsdev);
|
|
|
|
#endif /* _VKMS_CONNECTOR_H_ */
|