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