blob: fde275ad7e2ed575b84382648c663be75544c275 [file] [log] [blame]
Yannick Fertré9712c822019-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
Patrick Delaunay81313352021-04-27 11:02:19 +02008#define LOG_CATEGORY UCLASS_DSI_HOST
9
Yannick Fertré9712c822019-10-07 15:29:05 +020010#include <dm.h>
11#include <dsi_host.h>
12
13int dsi_host_init(struct udevice *dev,
14 struct mipi_dsi_device *device,
15 struct display_timing *timings,
16 unsigned int max_data_lanes,
17 const struct mipi_dsi_phy_ops *phy_ops)
18{
19 struct dsi_host_ops *ops = dsi_host_get_ops(dev);
20
21 if (!ops->init)
22 return -ENOSYS;
23
24 return ops->init(dev, device, timings, max_data_lanes, phy_ops);
25}
26
27int dsi_host_enable(struct udevice *dev)
28{
29 struct dsi_host_ops *ops = dsi_host_get_ops(dev);
30
31 if (!ops->enable)
32 return -ENOSYS;
33
34 return ops->enable(dev);
35}
36
37UCLASS_DRIVER(dsi_host) = {
38 .id = UCLASS_DSI_HOST,
39 .name = "dsi_host",
40};