blob: b26dc4fb7ba8283f22b0d8f646a58a06fd00d510 [file] [log] [blame]
Matthew Garrett74a365b2009-03-19 21:35:39 +00001#ifndef __ACPI_VIDEO_H
2#define __ACPI_VIDEO_H
3
Chris Wilsonb72512e2010-09-05 14:51:49 +01004#include <linux/errno.h> /* for ENODEV */
5
6struct acpi_device;
7
Matthew Garrettf5a3d0c2011-07-12 18:30:52 -04008#define ACPI_VIDEO_CLASS "video"
9
Matthew Garrette92a7162010-01-12 14:17:03 -050010#define ACPI_VIDEO_DISPLAY_CRT 1
11#define ACPI_VIDEO_DISPLAY_TV 2
12#define ACPI_VIDEO_DISPLAY_DVI 3
13#define ACPI_VIDEO_DISPLAY_LCD 4
14
15#define ACPI_VIDEO_DISPLAY_LEGACY_MONITOR 0x0100
16#define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110
17#define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200
18
Matthew Garrett74a365b2009-03-19 21:35:39 +000019#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
Rafael J. Wysocki8c5bd7a2013-07-18 02:08:06 +020020extern int __acpi_video_register(bool backlight_quirks);
21static inline int acpi_video_register(void)
22{
23 return __acpi_video_register(false);
24}
25static inline int acpi_video_register_with_quirks(void)
26{
27 return __acpi_video_register(true);
28}
Zhao Yakui86e437f2009-06-16 11:23:13 +080029extern void acpi_video_unregister(void);
Matthew Garrette92a7162010-01-12 14:17:03 -050030extern int acpi_video_get_edid(struct acpi_device *device, int type,
31 int device_id, void **edid);
Matthew Garrett74a365b2009-03-19 21:35:39 +000032#else
33static inline int acpi_video_register(void) { return 0; }
Rafael J. Wysocki8c5bd7a2013-07-18 02:08:06 +020034static inline int acpi_video_register_with_quirks(void) { return 0; }
Zhao Yakui86e437f2009-06-16 11:23:13 +080035static inline void acpi_video_unregister(void) { return; }
Matthew Garrette92a7162010-01-12 14:17:03 -050036static inline int acpi_video_get_edid(struct acpi_device *device, int type,
37 int device_id, void **edid)
38{
39 return -ENODEV;
40}
Matthew Garrett74a365b2009-03-19 21:35:39 +000041#endif
42
43#endif