aux-bridge.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2023 Linaro Ltd.
  4. *
  5. * Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
  6. */
  7. #ifndef DRM_AUX_BRIDGE_H
  8. #define DRM_AUX_BRIDGE_H
  9. #include <drm/drm_connector.h>
  10. struct auxiliary_device;
  11. #if IS_ENABLED(CONFIG_DRM_AUX_BRIDGE)
  12. int drm_aux_bridge_register(struct device *parent);
  13. #else
  14. static inline int drm_aux_bridge_register(struct device *parent)
  15. {
  16. return 0;
  17. }
  18. #endif
  19. #if IS_ENABLED(CONFIG_DRM_AUX_HPD_BRIDGE)
  20. struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, struct device_node *np);
  21. int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev);
  22. struct device *drm_dp_hpd_bridge_register(struct device *parent,
  23. struct device_node *np);
  24. void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status);
  25. #else
  26. static inline struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent,
  27. struct device_node *np)
  28. {
  29. return NULL;
  30. }
  31. static inline int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev)
  32. {
  33. return 0;
  34. }
  35. static inline struct device *drm_dp_hpd_bridge_register(struct device *parent,
  36. struct device_node *np)
  37. {
  38. return NULL;
  39. }
  40. static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)
  41. {
  42. }
  43. #endif
  44. #endif