12a047391SDmitry Baryshkov /* SPDX-License-Identifier: GPL-2.0+ */ 22a047391SDmitry Baryshkov /* 32a047391SDmitry Baryshkov * Copyright (C) 2023 Linaro Ltd. 42a047391SDmitry Baryshkov * 52a047391SDmitry Baryshkov * Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 62a047391SDmitry Baryshkov */ 72a047391SDmitry Baryshkov #ifndef DRM_AUX_BRIDGE_H 82a047391SDmitry Baryshkov #define DRM_AUX_BRIDGE_H 92a047391SDmitry Baryshkov 10e560518aSDmitry Baryshkov #include <drm/drm_connector.h> 11e560518aSDmitry Baryshkov 12e5ca2635SJohan Hovold struct auxiliary_device; 13e5ca2635SJohan Hovold 142a047391SDmitry Baryshkov #if IS_ENABLED(CONFIG_DRM_AUX_BRIDGE) 152a047391SDmitry Baryshkov int drm_aux_bridge_register(struct device *parent); 162a047391SDmitry Baryshkov #else 172a047391SDmitry Baryshkov static inline int drm_aux_bridge_register(struct device *parent) 182a047391SDmitry Baryshkov { 192a047391SDmitry Baryshkov return 0; 202a047391SDmitry Baryshkov } 212a047391SDmitry Baryshkov #endif 222a047391SDmitry Baryshkov 23e560518aSDmitry Baryshkov #if IS_ENABLED(CONFIG_DRM_AUX_HPD_BRIDGE) 24e5ca2635SJohan Hovold struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, struct device_node *np); 25e5ca2635SJohan Hovold int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev); 26e560518aSDmitry Baryshkov struct device *drm_dp_hpd_bridge_register(struct device *parent, 27e560518aSDmitry Baryshkov struct device_node *np); 28e560518aSDmitry Baryshkov void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status); 29e560518aSDmitry Baryshkov #else 30e5ca2635SJohan Hovold static inline struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, 31e5ca2635SJohan Hovold struct device_node *np) 32e5ca2635SJohan Hovold { 33e5ca2635SJohan Hovold return NULL; 34e5ca2635SJohan Hovold } 35e5ca2635SJohan Hovold 36*51474ab4SDmitry Baryshkov static inline int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev) 37e5ca2635SJohan Hovold { 38e5ca2635SJohan Hovold return 0; 39e5ca2635SJohan Hovold } 40e5ca2635SJohan Hovold 41e560518aSDmitry Baryshkov static inline struct device *drm_dp_hpd_bridge_register(struct device *parent, 42e560518aSDmitry Baryshkov struct device_node *np) 43e560518aSDmitry Baryshkov { 44812cc1daSNathan Chancellor return NULL; 45e560518aSDmitry Baryshkov } 46e560518aSDmitry Baryshkov 47e560518aSDmitry Baryshkov static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status) 48e560518aSDmitry Baryshkov { 49e560518aSDmitry Baryshkov } 50e560518aSDmitry Baryshkov #endif 51e560518aSDmitry Baryshkov 522a047391SDmitry Baryshkov #endif 53