dsi-host-uclass.c 834 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2019 STMicroelectronics - All Rights Reserved
  4. * Author(s): Yannick Fertre <yannick.fertre@st.com> for STMicroelectronics.
  5. *
  6. */
  7. #include <common.h>
  8. #include <dm.h>
  9. #include <dsi_host.h>
  10. int dsi_host_init(struct udevice *dev,
  11. struct mipi_dsi_device *device,
  12. struct display_timing *timings,
  13. unsigned int max_data_lanes,
  14. const struct mipi_dsi_phy_ops *phy_ops)
  15. {
  16. struct dsi_host_ops *ops = dsi_host_get_ops(dev);
  17. if (!ops->init)
  18. return -ENOSYS;
  19. return ops->init(dev, device, timings, max_data_lanes, phy_ops);
  20. }
  21. int dsi_host_enable(struct udevice *dev)
  22. {
  23. struct dsi_host_ops *ops = dsi_host_get_ops(dev);
  24. if (!ops->enable)
  25. return -ENOSYS;
  26. return ops->enable(dev);
  27. }
  28. UCLASS_DRIVER(dsi_host) = {
  29. .id = UCLASS_DSI_HOST,
  30. .name = "dsi_host",
  31. };