diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-04-21 10:08:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-04-21 23:30:34 -0400 |
commit | 83f34724643a3b0ec9322490b9ad9f1b60170a6c (patch) | |
tree | dcd6da273723dc713c920414506212073ffe738d /drivers/misc/thinkpad_acpi.h | |
parent | d6fdd1e91a8a4cd852dc1d945165e3a69ac9e257 (diff) |
ACPI: thinkpad-acpi: cleanup video subdriver
Cleanup video subdriver for sysfs conversion, and properly check
result status of acpi_evalf.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.h')
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index e06bad5c8fe..3a8718a0811 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -446,17 +446,32 @@ enum video_access_mode { | |||
446 | TPACPI_VIDEO_NEW, /* all others */ | 446 | TPACPI_VIDEO_NEW, /* all others */ |
447 | }; | 447 | }; |
448 | 448 | ||
449 | enum { /* video status flags, based on VIDEO_570 */ | ||
450 | TP_ACPI_VIDEO_S_LCD = 0x01, /* LCD output enabled */ | ||
451 | TP_ACPI_VIDEO_S_CRT = 0x02, /* CRT output enabled */ | ||
452 | TP_ACPI_VIDEO_S_DVI = 0x08, /* DVI output enabled */ | ||
453 | }; | ||
454 | |||
455 | enum { /* TPACPI_VIDEO_570 constants */ | ||
456 | TP_ACPI_VIDEO_570_PHSCMD = 0x87, /* unknown magic constant :( */ | ||
457 | TP_ACPI_VIDEO_570_PHSMASK = 0x03, /* PHS bits that map to | ||
458 | * video_status_flags */ | ||
459 | TP_ACPI_VIDEO_570_PHS2CMD = 0x8b, /* unknown magic constant :( */ | ||
460 | TP_ACPI_VIDEO_570_PHS2SET = 0x80, /* unknown magic constant :( */ | ||
461 | }; | ||
462 | |||
449 | static enum video_access_mode video_supported; | 463 | static enum video_access_mode video_supported; |
450 | static int video_orig_autosw; | 464 | static int video_orig_autosw; |
451 | static acpi_handle vid_handle, vid2_handle; | 465 | static acpi_handle vid_handle, vid2_handle; |
452 | 466 | ||
453 | static int video_init(struct ibm_init_struct *iibm); | 467 | static int video_init(struct ibm_init_struct *iibm); |
454 | static void video_exit(void); | 468 | static void video_exit(void); |
455 | static int video_status(void); | 469 | static int video_outputsw_get(void); |
456 | static int video_autosw(void); | 470 | static int video_outputsw_set(int status); |
457 | static int video_switch(void); | 471 | static int video_autosw_get(void); |
458 | static int video_switch2(int status); | 472 | static int video_autosw_set(int enable); |
459 | static int video_expand(void); | 473 | static int video_outputsw_cycle(void); |
474 | static int video_expand_toggle(void); | ||
460 | static int video_read(char *p); | 475 | static int video_read(char *p); |
461 | static int video_write(char *buf); | 476 | static int video_write(char *buf); |
462 | 477 | ||