drm/connector: Add a fwnode pointer to drm_connector and register with ACPI (v2)
authorHans de Goede <hdegoede@redhat.com>
Tue, 17 Aug 2021 21:51:55 +0000 (23:51 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 20 Aug 2021 10:35:59 +0000 (12:35 +0200)
commit48c429c6d18db115c277b75000152d8fa4cd35d0
tree015f1e3aa9c11f2e4187d069dcd1ffa6ce110667
parent331de7db3012b8e8e8d77beebc8f743e288d4c42
drm/connector: Add a fwnode pointer to drm_connector and register with ACPI (v2)

Add a fwnode pointer to struct drm_connector and register an acpi_bus_type
for the connectors with the ACPI subsystem (when CONFIG_ACPI is enabled).

The adding of the fwnode pointer allows drivers to associate a fwnode
that represents a connector with that connector.

When the new fwnode pointer points to an ACPI-companion, then the new
acpi_bus_type will cause the ACPI subsys to bind the device instantiated
for the connector with the fwnode by calling acpi_bind_one(). This will
result in a firmware_node symlink under /sys/class/card#-<connecter-name>/
which helps to verify that the fwnode-s and connectors are properly
matched.

Changes in v2:
- Make drm_connector_cleanup() call fwnode_handle_put() on
  connector->fwnode and document this

Co-developed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20210817215201.795062-3-hdegoede@redhat.com
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/drm_sysfs.c
include/drm/drm_connector.h