Blame view

include/dsi_host.h 1.83 KB
23f965a4c   Yannick Fertré   dm: Add a dsi hos...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  /* SPDX-License-Identifier: GPL-2.0+ */
  /*
   * Copyright (C) 2019 STMicroelectronics - All Rights Reserved
   * Author(s): Yannick Fertre <yannick.fertre@st.com> for STMicroelectronics.
   *
   */
  
  #ifndef _DSI_HOST_H
  #define _DSI_HOST_H
  
  #include <mipi_dsi.h>
  
  struct dsi_host_ops {
  	/**
  	 * init() - initialized the dsi_host
  	 *
  	 * @dev: dsi host device
  	 * @device: DSI peripheral device
  	 * @timing: Display timings
  	 * @max_data_lanes: maximum number of data lines
  	 * @phy_ops: set of function pointers for performing physical operations
  	 * @return 0 if OK, -ve on error
  	 */
  	int (*init)(struct udevice *dev,
  		    struct mipi_dsi_device *device,
  		    struct display_timing *timings,
  		    unsigned int max_data_lanes,
  		    const struct mipi_dsi_phy_ops *phy_ops);
  
  	/**
  	 * enable() - Enable the dsi_host
  	 *
  	 * @dev: dsi host device
  	 * @return 0 if OK, -ve on error
  	 */
  	int (*enable)(struct udevice *dev);
  
  	/**
  	 * disable() - Disable the dsi_host
  	 *
  	 * @dev: dsi host device
  	 * @return 0 if OK, -ve on error
  	 */
  	int (*disable)(struct udevice *dev);
  };
  
  #define dsi_host_get_ops(dev)	((struct dsi_host_ops *)(dev)->driver->ops)
  
  /**
   * dsi_host_init
   *
   * @dev: dsi host device
   * @device: DSI peripheral device
   * @timing: Display timings
   * @max_data_lanes: maximum number of data lines
   * @phy_ops: set of function pointers for performing physical operations
   * @return 0 if OK, -ve on error
   */
  int dsi_host_init(struct udevice *dev,
  		  struct mipi_dsi_device *device,
  		  struct display_timing *timings,
  		  unsigned int max_data_lanes,
  		  const struct mipi_dsi_phy_ops *phy_ops);
  
  /**
   * dsi_host_enable
   *
   * @dev:	dsi host device
   * @return 0 if OK, -ve on error
   */
  int dsi_host_enable(struct udevice *dev);
bbf72dc8e   Ye Li   MLK-23964-6 video...
72
73
74
75
76
77
78
  /**
   * dsi_host_disable
   *
   * @dev:	dsi host device
   * @return 0 if OK, -ve on error
   */
  int dsi_host_disable(struct udevice *dev);
23f965a4c   Yannick Fertré   dm: Add a dsi hos...
79
  #endif