]>
Commit | Line | Data |
---|---|---|
23f965a4 YF |
1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | |
3 | * Copyright (C) 2019 STMicroelectronics - All Rights Reserved | |
4 | * Author(s): Yannick Fertre <[email protected]> for STMicroelectronics. | |
5 | * | |
6 | */ | |
7 | ||
b953ec2b PD |
8 | #define LOG_CATEGORY UCLASS_DSI_HOST |
9 | ||
23f965a4 YF |
10 | #include <common.h> |
11 | #include <dm.h> | |
12 | #include <dsi_host.h> | |
13 | ||
14 | int 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 | ||
28 | int 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 | ||
38 | UCLASS_DRIVER(dsi_host) = { | |
39 | .id = UCLASS_DSI_HOST, | |
40 | .name = "dsi_host", | |
41 | }; |