aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/video/omap-panel-data.h209
-rw-r--r--include/video/omapdss.h192
2 files changed, 396 insertions, 5 deletions
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h
index 0c3b46d3daf3..6b2366fb6e53 100644
--- a/include/video/omap-panel-data.h
+++ b/include/video/omap-panel-data.h
@@ -27,6 +27,9 @@
27#ifndef __OMAP_PANEL_DATA_H 27#ifndef __OMAP_PANEL_DATA_H
28#define __OMAP_PANEL_DATA_H 28#define __OMAP_PANEL_DATA_H
29 29
30#include <video/omapdss.h>
31#include <video/display_timing.h>
32
30struct omap_dss_device; 33struct omap_dss_device;
31 34
32/** 35/**
@@ -147,4 +150,210 @@ struct panel_tpo_td043_data {
147 int nreset_gpio; 150 int nreset_gpio;
148}; 151};
149 152
153/**
154 * encoder_tfp410 platform data
155 * @name: name for this display entity
156 * @power_down_gpio: gpio number for PD pin (or -1 if not available)
157 * @data_lines: number of DPI datalines
158 */
159struct encoder_tfp410_platform_data {
160 const char *name;
161 const char *source;
162 int power_down_gpio;
163 int data_lines;
164};
165
166/**
167 * encoder_tpd12s015 platform data
168 * @name: name for this display entity
169 * @ct_cp_hpd_gpio: CT_CP_HPD gpio number
170 * @ls_oe_gpio: LS_OE gpio number
171 * @hpd_gpio: HPD gpio number
172 */
173struct encoder_tpd12s015_platform_data {
174 const char *name;
175 const char *source;
176
177 int ct_cp_hpd_gpio;
178 int ls_oe_gpio;
179 int hpd_gpio;
180};
181
182/**
183 * connector_dvi platform data
184 * @name: name for this display entity
185 * @source: name of the display entity used as a video source
186 * @i2c_bus_num: i2c bus number to be used for reading EDID
187 */
188struct connector_dvi_platform_data {
189 const char *name;
190 const char *source;
191 int i2c_bus_num;
192};
193
194/**
195 * connector_hdmi platform data
196 * @name: name for this display entity
197 * @source: name of the display entity used as a video source
198 */
199struct connector_hdmi_platform_data {
200 const char *name;
201 const char *source;
202};
203
204/**
205 * connector_atv platform data
206 * @name: name for this display entity
207 * @source: name of the display entity used as a video source
208 * @connector_type: composite/svideo
209 * @invert_polarity: invert signal polarity
210 */
211struct connector_atv_platform_data {
212 const char *name;
213 const char *source;
214
215 enum omap_dss_venc_type connector_type;
216 bool invert_polarity;
217};
218
219/**
220 * panel_dpi platform data
221 * @name: name for this display entity
222 * @source: name of the display entity used as a video source
223 * @data_lines: number of DPI datalines
224 * @display_timing: timings for this panel
225 * @backlight_gpio: gpio to enable/disable the backlight (or -1)
226 * @enable_gpio: gpio to enable/disable the panel (or -1)
227 */
228struct panel_dpi_platform_data {
229 const char *name;
230 const char *source;
231
232 int data_lines;
233
234 const struct display_timing *display_timing;
235
236 int backlight_gpio;
237 int enable_gpio;
238};
239
240/**
241 * panel_dsicm platform data
242 * @name: name for this display entity
243 * @source: name of the display entity used as a video source
244 * @reset_gpio: gpio to reset the panel (or -1)
245 * @use_ext_te: use external TE GPIO
246 * @ext_te_gpio: external TE GPIO
247 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
248 * @use_dsi_backlight: true if panel uses DSI command to control backlight
249 * @pin_config: DSI pin configuration
250 */
251struct panel_dsicm_platform_data {
252 const char *name;
253 const char *source;
254
255 int reset_gpio;
256
257 bool use_ext_te;
258 int ext_te_gpio;
259
260 unsigned ulps_timeout;
261
262 bool use_dsi_backlight;
263
264 struct omap_dsi_pin_config pin_config;
265};
266
267/**
268 * panel_acx565akm platform data
269 * @name: name for this display entity
270 * @source: name of the display entity used as a video source
271 * @reset_gpio: gpio to reset the panel (or -1)
272 * @datapairs: number of SDI datapairs
273 */
274struct panel_acx565akm_platform_data {
275 const char *name;
276 const char *source;
277
278 int reset_gpio;
279
280 int datapairs;
281};
282
283/**
284 * panel_lb035q02 platform data
285 * @name: name for this display entity
286 * @source: name of the display entity used as a video source
287 * @data_lines: number of DPI datalines
288 * @backlight_gpio: gpio to enable/disable the backlight (or -1)
289 * @enable_gpio: gpio to enable/disable the panel (or -1)
290 */
291struct panel_lb035q02_platform_data {
292 const char *name;
293 const char *source;
294
295 int data_lines;
296
297 int backlight_gpio;
298 int enable_gpio;
299};
300
301/**
302 * panel_sharp_ls037v7dw01 platform data
303 * @name: name for this display entity
304 * @source: name of the display entity used as a video source
305 * @data_lines: number of DPI datalines
306 * @resb_gpio: reset signal GPIO
307 * @ini_gpio: power on control GPIO
308 * @mo_gpio: selection for resolution(VGA/QVGA) GPIO
309 * @lr_gpio: selection for horizontal scanning direction GPIO
310 * @ud_gpio: selection for vertical scanning direction GPIO
311 */
312struct panel_sharp_ls037v7dw01_platform_data {
313 const char *name;
314 const char *source;
315
316 int data_lines;
317
318 int resb_gpio;
319 int ini_gpio;
320 int mo_gpio;
321 int lr_gpio;
322 int ud_gpio;
323};
324
325/**
326 * panel-tpo-td043mtea1 platform data
327 * @name: name for this display entity
328 * @source: name of the display entity used as a video source
329 * @data_lines: number of DPI datalines
330 * @nreset_gpio: reset signal
331 */
332struct panel_tpo_td043mtea1_platform_data {
333 const char *name;
334 const char *source;
335
336 int data_lines;
337
338 int nreset_gpio;
339};
340
341/**
342 * panel-nec-nl8048hl11 platform data
343 * @name: name for this display entity
344 * @source: name of the display entity used as a video source
345 * @data_lines: number of DPI datalines
346 * @res_gpio: reset signal
347 * @qvga_gpio: selection for resolution(QVGA/WVGA)
348 */
349struct panel_nec_nl8048hl11_platform_data {
350 const char *name;
351 const char *source;
352
353 int data_lines;
354
355 int res_gpio;
356 int qvga_gpio;
357};
358
150#endif /* __OMAP_PANEL_DATA_H */ 359#endif /* __OMAP_PANEL_DATA_H */
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ef9db241b4a1..b39463553845 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -70,6 +70,7 @@ enum omap_display_type {
70 OMAP_DISPLAY_TYPE_DSI = 1 << 3, 70 OMAP_DISPLAY_TYPE_DSI = 1 << 3,
71 OMAP_DISPLAY_TYPE_VENC = 1 << 4, 71 OMAP_DISPLAY_TYPE_VENC = 1 << 4,
72 OMAP_DISPLAY_TYPE_HDMI = 1 << 5, 72 OMAP_DISPLAY_TYPE_HDMI = 1 << 5,
73 OMAP_DISPLAY_TYPE_DVI = 1 << 6,
73}; 74};
74 75
75enum omap_plane { 76enum omap_plane {
@@ -171,6 +172,11 @@ enum omap_dss_audio_state {
171 OMAP_DSS_AUDIO_PLAYING, 172 OMAP_DSS_AUDIO_PLAYING,
172}; 173};
173 174
175struct omap_dss_audio {
176 struct snd_aes_iec958 *iec;
177 struct snd_cea_861_aud_if *cea;
178};
179
174enum omap_dss_rotation_type { 180enum omap_dss_rotation_type {
175 OMAP_DSS_ROT_DMA = 1 << 0, 181 OMAP_DSS_ROT_DMA = 1 << 0,
176 OMAP_DSS_ROT_VRFB = 1 << 1, 182 OMAP_DSS_ROT_VRFB = 1 << 1,
@@ -572,6 +578,176 @@ struct omap_dss_writeback_info {
572 u8 pre_mult_alpha; 578 u8 pre_mult_alpha;
573}; 579};
574 580
581struct omapdss_dpi_ops {
582 int (*connect)(struct omap_dss_device *dssdev,
583 struct omap_dss_device *dst);
584 void (*disconnect)(struct omap_dss_device *dssdev,
585 struct omap_dss_device *dst);
586
587 int (*enable)(struct omap_dss_device *dssdev);
588 void (*disable)(struct omap_dss_device *dssdev);
589
590 int (*check_timings)(struct omap_dss_device *dssdev,
591 struct omap_video_timings *timings);
592 void (*set_timings)(struct omap_dss_device *dssdev,
593 struct omap_video_timings *timings);
594 void (*get_timings)(struct omap_dss_device *dssdev,
595 struct omap_video_timings *timings);
596
597 void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines);
598};
599
600struct omapdss_sdi_ops {
601 int (*connect)(struct omap_dss_device *dssdev,
602 struct omap_dss_device *dst);
603 void (*disconnect)(struct omap_dss_device *dssdev,
604 struct omap_dss_device *dst);
605
606 int (*enable)(struct omap_dss_device *dssdev);
607 void (*disable)(struct omap_dss_device *dssdev);
608
609 int (*check_timings)(struct omap_dss_device *dssdev,
610 struct omap_video_timings *timings);
611 void (*set_timings)(struct omap_dss_device *dssdev,
612 struct omap_video_timings *timings);
613 void (*get_timings)(struct omap_dss_device *dssdev,
614 struct omap_video_timings *timings);
615
616 void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs);
617};
618
619struct omapdss_dvi_ops {
620 int (*connect)(struct omap_dss_device *dssdev,
621 struct omap_dss_device *dst);
622 void (*disconnect)(struct omap_dss_device *dssdev,
623 struct omap_dss_device *dst);
624
625 int (*enable)(struct omap_dss_device *dssdev);
626 void (*disable)(struct omap_dss_device *dssdev);
627
628 int (*check_timings)(struct omap_dss_device *dssdev,
629 struct omap_video_timings *timings);
630 void (*set_timings)(struct omap_dss_device *dssdev,
631 struct omap_video_timings *timings);
632 void (*get_timings)(struct omap_dss_device *dssdev,
633 struct omap_video_timings *timings);
634};
635
636struct omapdss_atv_ops {
637 int (*connect)(struct omap_dss_device *dssdev,
638 struct omap_dss_device *dst);
639 void (*disconnect)(struct omap_dss_device *dssdev,
640 struct omap_dss_device *dst);
641
642 int (*enable)(struct omap_dss_device *dssdev);
643 void (*disable)(struct omap_dss_device *dssdev);
644
645 int (*check_timings)(struct omap_dss_device *dssdev,
646 struct omap_video_timings *timings);
647 void (*set_timings)(struct omap_dss_device *dssdev,
648 struct omap_video_timings *timings);
649 void (*get_timings)(struct omap_dss_device *dssdev,
650 struct omap_video_timings *timings);
651
652 void (*set_type)(struct omap_dss_device *dssdev,
653 enum omap_dss_venc_type type);
654 void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev,
655 bool invert_polarity);
656
657 int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
658 u32 (*get_wss)(struct omap_dss_device *dssdev);
659};
660
661struct omapdss_hdmi_ops {
662 int (*connect)(struct omap_dss_device *dssdev,
663 struct omap_dss_device *dst);
664 void (*disconnect)(struct omap_dss_device *dssdev,
665 struct omap_dss_device *dst);
666
667 int (*enable)(struct omap_dss_device *dssdev);
668 void (*disable)(struct omap_dss_device *dssdev);
669
670 int (*check_timings)(struct omap_dss_device *dssdev,
671 struct omap_video_timings *timings);
672 void (*set_timings)(struct omap_dss_device *dssdev,
673 struct omap_video_timings *timings);
674 void (*get_timings)(struct omap_dss_device *dssdev,
675 struct omap_video_timings *timings);
676
677 int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
678 bool (*detect)(struct omap_dss_device *dssdev);
679
680 /*
681 * Note: These functions might sleep. Do not call while
682 * holding a spinlock/readlock.
683 */
684 int (*audio_enable)(struct omap_dss_device *dssdev);
685 void (*audio_disable)(struct omap_dss_device *dssdev);
686 bool (*audio_supported)(struct omap_dss_device *dssdev);
687 int (*audio_config)(struct omap_dss_device *dssdev,
688 struct omap_dss_audio *audio);
689 /* Note: These functions may not sleep */
690 int (*audio_start)(struct omap_dss_device *dssdev);
691 void (*audio_stop)(struct omap_dss_device *dssdev);
692};
693
694struct omapdss_dsi_ops {
695 int (*connect)(struct omap_dss_device *dssdev,
696 struct omap_dss_device *dst);
697 void (*disconnect)(struct omap_dss_device *dssdev,
698 struct omap_dss_device *dst);
699
700 int (*enable)(struct omap_dss_device *dssdev);
701 void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
702 bool enter_ulps);
703
704 /* bus configuration */
705 int (*set_config)(struct omap_dss_device *dssdev,
706 const struct omap_dss_dsi_config *cfg);
707 int (*configure_pins)(struct omap_dss_device *dssdev,
708 const struct omap_dsi_pin_config *pin_cfg);
709
710 void (*enable_hs)(struct omap_dss_device *dssdev, int channel,
711 bool enable);
712 int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
713
714 int (*update)(struct omap_dss_device *dssdev, int channel,
715 void (*callback)(int, void *), void *data);
716
717 void (*bus_lock)(struct omap_dss_device *dssdev);
718 void (*bus_unlock)(struct omap_dss_device *dssdev);
719
720 int (*enable_video_output)(struct omap_dss_device *dssdev, int channel);
721 void (*disable_video_output)(struct omap_dss_device *dssdev,
722 int channel);
723
724 int (*request_vc)(struct omap_dss_device *dssdev, int *channel);
725 int (*set_vc_id)(struct omap_dss_device *dssdev, int channel,
726 int vc_id);
727 void (*release_vc)(struct omap_dss_device *dssdev, int channel);
728
729 /* data transfer */
730 int (*dcs_write)(struct omap_dss_device *dssdev, int channel,
731 u8 *data, int len);
732 int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel,
733 u8 *data, int len);
734 int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd,
735 u8 *data, int len);
736
737 int (*gen_write)(struct omap_dss_device *dssdev, int channel,
738 u8 *data, int len);
739 int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel,
740 u8 *data, int len);
741 int (*gen_read)(struct omap_dss_device *dssdev, int channel,
742 u8 *reqdata, int reqlen,
743 u8 *data, int len);
744
745 int (*bta_sync)(struct omap_dss_device *dssdev, int channel);
746
747 int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev,
748 int channel, u16 plen);
749};
750
575struct omap_dss_device { 751struct omap_dss_device {
576 /* old device, to be removed */ 752 /* old device, to be removed */
577 struct device old_dev; 753 struct device old_dev;
@@ -637,6 +813,15 @@ struct omap_dss_device {
637 813
638 struct omap_dss_driver *driver; 814 struct omap_dss_driver *driver;
639 815
816 union {
817 const struct omapdss_dpi_ops *dpi;
818 const struct omapdss_sdi_ops *sdi;
819 const struct omapdss_dvi_ops *dvi;
820 const struct omapdss_hdmi_ops *hdmi;
821 const struct omapdss_atv_ops *atv;
822 const struct omapdss_dsi_ops *dsi;
823 } ops;
824
640 /* helper variable for driver suspend/resume */ 825 /* helper variable for driver suspend/resume */
641 bool activate_after_resume; 826 bool activate_after_resume;
642 827
@@ -671,11 +856,6 @@ struct omap_dss_hdmi_data
671 int hpd_gpio; 856 int hpd_gpio;
672}; 857};
673 858
674struct omap_dss_audio {
675 struct snd_aes_iec958 *iec;
676 struct snd_cea_861_aud_if *cea;
677};
678
679struct omap_dss_driver { 859struct omap_dss_driver {
680 struct device_driver driver; 860 struct device_driver driver;
681 861
@@ -780,6 +960,8 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
780int omap_dss_get_num_overlays(void); 960int omap_dss_get_num_overlays(void);
781struct omap_overlay *omap_dss_get_overlay(int num); 961struct omap_overlay *omap_dss_get_overlay(int num);
782 962
963int omapdss_register_output(struct omap_dss_device *output);
964void omapdss_unregister_output(struct omap_dss_device *output);
783struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); 965struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
784struct omap_dss_device *omap_dss_find_output(const char *name); 966struct omap_dss_device *omap_dss_find_output(const char *name);
785struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node); 967struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node);