diff options
author | malattia@linux.it <malattia@linux.it> | 2007-04-28 10:34:36 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-04-28 22:06:01 -0400 |
commit | 1ce82c14d06ff68380d7c647f768858e077930c5 (patch) | |
tree | c2b0bdefc3110076ab7187b60fff9a36da1c48ea | |
parent | e364632e740fe9fcb401e5ece3be69e4d81c5a80 (diff) |
sony-laptop: add a meye-usable include file for camera ops
Copy and rename (for easier co-existence) the MEYE-wise exported interface.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/misc/sony-laptop.c | 17 | ||||
-rw-r--r-- | include/linux/sony-laptop.h | 34 |
2 files changed, 43 insertions, 8 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index bc863f5efd5d..9c2e80b38241 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <acpi/acpi_bus.h> | 62 | #include <acpi/acpi_bus.h> |
63 | #include <asm/uaccess.h> | 63 | #include <asm/uaccess.h> |
64 | #include <linux/sonypi.h> | 64 | #include <linux/sonypi.h> |
65 | #include <linux/sony-laptop.h> | ||
65 | #ifdef CONFIG_SONY_LAPTOP_OLD | 66 | #ifdef CONFIG_SONY_LAPTOP_OLD |
66 | #include <linux/poll.h> | 67 | #include <linux/poll.h> |
67 | #include <linux/miscdevice.h> | 68 | #include <linux/miscdevice.h> |
@@ -1359,37 +1360,37 @@ int sony_pic_camera_command(int command, u8 value) | |||
1359 | mutex_lock(&spic_dev.lock); | 1360 | mutex_lock(&spic_dev.lock); |
1360 | 1361 | ||
1361 | switch (command) { | 1362 | switch (command) { |
1362 | case SONYPI_COMMAND_SETCAMERA: | 1363 | case SONY_PIC_COMMAND_SETCAMERA: |
1363 | if (value) | 1364 | if (value) |
1364 | __sony_pic_camera_on(); | 1365 | __sony_pic_camera_on(); |
1365 | else | 1366 | else |
1366 | __sony_pic_camera_off(); | 1367 | __sony_pic_camera_off(); |
1367 | break; | 1368 | break; |
1368 | case SONYPI_COMMAND_SETCAMERABRIGHTNESS: | 1369 | case SONY_PIC_COMMAND_SETCAMERABRIGHTNESS: |
1369 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_BRIGHTNESS, value), | 1370 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_BRIGHTNESS, value), |
1370 | ITERATIONS_SHORT); | 1371 | ITERATIONS_SHORT); |
1371 | break; | 1372 | break; |
1372 | case SONYPI_COMMAND_SETCAMERACONTRAST: | 1373 | case SONY_PIC_COMMAND_SETCAMERACONTRAST: |
1373 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_CONTRAST, value), | 1374 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_CONTRAST, value), |
1374 | ITERATIONS_SHORT); | 1375 | ITERATIONS_SHORT); |
1375 | break; | 1376 | break; |
1376 | case SONYPI_COMMAND_SETCAMERAHUE: | 1377 | case SONY_PIC_COMMAND_SETCAMERAHUE: |
1377 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_HUE, value), | 1378 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_HUE, value), |
1378 | ITERATIONS_SHORT); | 1379 | ITERATIONS_SHORT); |
1379 | break; | 1380 | break; |
1380 | case SONYPI_COMMAND_SETCAMERACOLOR: | 1381 | case SONY_PIC_COMMAND_SETCAMERACOLOR: |
1381 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_COLOR, value), | 1382 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_COLOR, value), |
1382 | ITERATIONS_SHORT); | 1383 | ITERATIONS_SHORT); |
1383 | break; | 1384 | break; |
1384 | case SONYPI_COMMAND_SETCAMERASHARPNESS: | 1385 | case SONY_PIC_COMMAND_SETCAMERASHARPNESS: |
1385 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_SHARPNESS, value), | 1386 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_SHARPNESS, value), |
1386 | ITERATIONS_SHORT); | 1387 | ITERATIONS_SHORT); |
1387 | break; | 1388 | break; |
1388 | case SONYPI_COMMAND_SETCAMERAPICTURE: | 1389 | case SONY_PIC_COMMAND_SETCAMERAPICTURE: |
1389 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_PICTURE, value), | 1390 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_PICTURE, value), |
1390 | ITERATIONS_SHORT); | 1391 | ITERATIONS_SHORT); |
1391 | break; | 1392 | break; |
1392 | case SONYPI_COMMAND_SETCAMERAAGC: | 1393 | case SONY_PIC_COMMAND_SETCAMERAAGC: |
1393 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_AGC, value), | 1394 | wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_AGC, value), |
1394 | ITERATIONS_SHORT); | 1395 | ITERATIONS_SHORT); |
1395 | break; | 1396 | break; |
diff --git a/include/linux/sony-laptop.h b/include/linux/sony-laptop.h new file mode 100644 index 000000000000..e2e036d94e4a --- /dev/null +++ b/include/linux/sony-laptop.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef _SONYLAPTOP_H_ | ||
2 | #define _SONYLAPTOP_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #ifdef __KERNEL__ | ||
7 | |||
8 | /* used only for communication between v4l and sony-laptop */ | ||
9 | |||
10 | #define SONY_PIC_COMMAND_GETCAMERA 1 /* obsolete */ | ||
11 | #define SONY_PIC_COMMAND_SETCAMERA 2 | ||
12 | #define SONY_PIC_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */ | ||
13 | #define SONY_PIC_COMMAND_SETCAMERABRIGHTNESS 4 | ||
14 | #define SONY_PIC_COMMAND_GETCAMERACONTRAST 5 /* obsolete */ | ||
15 | #define SONY_PIC_COMMAND_SETCAMERACONTRAST 6 | ||
16 | #define SONY_PIC_COMMAND_GETCAMERAHUE 7 /* obsolete */ | ||
17 | #define SONY_PIC_COMMAND_SETCAMERAHUE 8 | ||
18 | #define SONY_PIC_COMMAND_GETCAMERACOLOR 9 /* obsolete */ | ||
19 | #define SONY_PIC_COMMAND_SETCAMERACOLOR 10 | ||
20 | #define SONY_PIC_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */ | ||
21 | #define SONY_PIC_COMMAND_SETCAMERASHARPNESS 12 | ||
22 | #define SONY_PIC_COMMAND_GETCAMERAPICTURE 13 /* obsolete */ | ||
23 | #define SONY_PIC_COMMAND_SETCAMERAPICTURE 14 | ||
24 | #define SONY_PIC_COMMAND_GETCAMERAAGC 15 /* obsolete */ | ||
25 | #define SONY_PIC_COMMAND_SETCAMERAAGC 16 | ||
26 | #define SONY_PIC_COMMAND_GETCAMERADIRECTION 17 /* obsolete */ | ||
27 | #define SONY_PIC_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ | ||
28 | #define SONY_PIC_COMMAND_GETCAMERAREVISION 19 /* obsolete */ | ||
29 | |||
30 | int sony_pic_camera_command(int command, u8 value); | ||
31 | |||
32 | #endif /* __KERNEL__ */ | ||
33 | |||
34 | #endif /* _SONYLAPTOP_H_ */ | ||