uboot/drivers/video/dsi-host-uclass.c
<<
>>
Prefs
   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
   8#include <common.h>
   9#include <dm.h>
  10#include <dsi_host.h>
  11
  12int dsi_host_init(struct udevice *dev,
  13                  struct mipi_dsi_device *device,
  14                  struct display_timing *timings,
  15                  unsigned int max_data_lanes,
  16                  const struct mipi_dsi_phy_ops *phy_ops)
  17{
  18        struct dsi_host_ops *ops = dsi_host_get_ops(dev);
  19
  20        if (!ops->init)
  21                return -ENOSYS;
  22
  23        return ops->init(dev, device, timings, max_data_lanes, phy_ops);
  24}
  25
  26int dsi_host_enable(struct udevice *dev)
  27{
  28        struct dsi_host_ops *ops = dsi_host_get_ops(dev);
  29
  30        if (!ops->enable)
  31                return -ENOSYS;
  32
  33        return ops->enable(dev);
  34}
  35
  36UCLASS_DRIVER(dsi_host) = {
  37        .id             = UCLASS_DSI_HOST,
  38        .name           = "dsi_host",
  39};
  40