blob: 1db1f88a17998c57072d30e4490d2ea60d67ab28 [file] [log] [blame]
Yannick Fertré23f965a2019-10-07 15:29:05 +02001// 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};