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>
This commit is contained in:
parent
e364632e74
commit
1ce82c14d0
|
@ -62,6 +62,7 @@
|
|||
#include <acpi/acpi_bus.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/sonypi.h>
|
||||
#include <linux/sony-laptop.h>
|
||||
#ifdef CONFIG_SONY_LAPTOP_OLD
|
||||
#include <linux/poll.h>
|
||||
#include <linux/miscdevice.h>
|
||||
|
@ -1359,37 +1360,37 @@ int sony_pic_camera_command(int command, u8 value)
|
|||
mutex_lock(&spic_dev.lock);
|
||||
|
||||
switch (command) {
|
||||
case SONYPI_COMMAND_SETCAMERA:
|
||||
case SONY_PIC_COMMAND_SETCAMERA:
|
||||
if (value)
|
||||
__sony_pic_camera_on();
|
||||
else
|
||||
__sony_pic_camera_off();
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERABRIGHTNESS:
|
||||
case SONY_PIC_COMMAND_SETCAMERABRIGHTNESS:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_BRIGHTNESS, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERACONTRAST:
|
||||
case SONY_PIC_COMMAND_SETCAMERACONTRAST:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_CONTRAST, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERAHUE:
|
||||
case SONY_PIC_COMMAND_SETCAMERAHUE:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_HUE, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERACOLOR:
|
||||
case SONY_PIC_COMMAND_SETCAMERACOLOR:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_COLOR, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERASHARPNESS:
|
||||
case SONY_PIC_COMMAND_SETCAMERASHARPNESS:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_SHARPNESS, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERAPICTURE:
|
||||
case SONY_PIC_COMMAND_SETCAMERAPICTURE:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_PICTURE, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
case SONYPI_COMMAND_SETCAMERAAGC:
|
||||
case SONY_PIC_COMMAND_SETCAMERAAGC:
|
||||
wait_on_command(sony_pic_call3(0x90, SONYPI_CAMERA_AGC, value),
|
||||
ITERATIONS_SHORT);
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef _SONYLAPTOP_H_
|
||||
#define _SONYLAPTOP_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* used only for communication between v4l and sony-laptop */
|
||||
|
||||
#define SONY_PIC_COMMAND_GETCAMERA 1 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERA 2
|
||||
#define SONY_PIC_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERABRIGHTNESS 4
|
||||
#define SONY_PIC_COMMAND_GETCAMERACONTRAST 5 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERACONTRAST 6
|
||||
#define SONY_PIC_COMMAND_GETCAMERAHUE 7 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERAHUE 8
|
||||
#define SONY_PIC_COMMAND_GETCAMERACOLOR 9 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERACOLOR 10
|
||||
#define SONY_PIC_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERASHARPNESS 12
|
||||
#define SONY_PIC_COMMAND_GETCAMERAPICTURE 13 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERAPICTURE 14
|
||||
#define SONY_PIC_COMMAND_GETCAMERAAGC 15 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_SETCAMERAAGC 16
|
||||
#define SONY_PIC_COMMAND_GETCAMERADIRECTION 17 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */
|
||||
#define SONY_PIC_COMMAND_GETCAMERAREVISION 19 /* obsolete */
|
||||
|
||||
int sony_pic_camera_command(int command, u8 value);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _SONYLAPTOP_H_ */
|
Loading…
Reference in New Issue