meye: make meye use sony-laptop instead of sonypi
authormalattia@linux.it <malattia@linux.it>
Sat, 28 Apr 2007 14:36:26 +0000 (23:36 +0900)
committerLen Brown <len.brown@intel.com>
Sun, 29 Apr 2007 02:06:02 +0000 (22:06 -0400)
Change sonypi_camera_command() calls to sony_pic_camera_command() and use
the renamed macros.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Documentation/video4linux/meye.txt
drivers/media/video/Kconfig
drivers/media/video/meye.c
drivers/media/video/meye.h

index ecb34160e61d5ca2fafad4bba259b782199cc66e..5e51c59bf2b024e2915d747e76f63d00e11d53f9 100644 (file)
@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
        Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
 
 This driver enable the use of video4linux compatible applications with the
-Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O
-Control Device" driver (which can be found in the "Character drivers"
-section of the kernel configuration utility) to be compiled and installed
-(using its "camera=1" parameter).
+Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
+can be found in the "Misc devices" section of the kernel configuration utility)
+to be compiled and installed (using its "camera=1" parameter).
 
 It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
 
index 7a6105153f23231ef971e46bd603c1d1b5b1f76a..ff6aefde10df258f0955b75199006ab6106ca9da 100644 (file)
@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES
 
 config VIDEO_MEYE
        tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
-       depends on PCI && SONYPI && VIDEO_V4L1
+       depends on PCI && SONY_LAPTOP && VIDEO_V4L1
        ---help---
          This is the video4linux driver for the Motion Eye camera found
          in the Vaio Picturebook laptops. Please read the material in
          <file:Documentation/video4linux/meye.txt> for more information.
 
-         If you say Y or M here, you need to say Y or M to "Sony Programmable
-         I/O Control Device" in the character device section.
+         If you say Y or M here, you need to say Y or M to "Sony Laptop
+         Extras" in the misc device section.
 
          To compile this driver as a module, choose M here: the
          module will be called meye.
index 98681da5e3b91fbbd72d9c665c277eaf22e48cea..664aba8b4d85231895954ac48df4447212796d48 100644 (file)
@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
                        return -EINVAL;
                mutex_lock(&meye.lock);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS,
                                      p->brightness >> 10);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE,
                                      p->hue >> 10);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR,
                                      p->colour >> 10);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST,
                                      p->contrast >> 10);
                meye.picture = *p;
                mutex_unlock(&meye.lock);
@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                    meye.params.quality != jp->quality)
                        mchip_hic_stop();       /* need restart */
                meye.params = *jp;
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
                                      meye.params.sharpness);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
                                      meye.params.agc);
-               sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE,
+               sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
                                      meye.params.picture);
                mutex_unlock(&meye.lock);
                break;
@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                mutex_lock(&meye.lock);
                switch (c->id) {
                case V4L2_CID_BRIGHTNESS:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
                        meye.picture.brightness = c->value << 10;
                        break;
                case V4L2_CID_HUE:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERAHUE, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
                        meye.picture.hue = c->value << 10;
                        break;
                case V4L2_CID_CONTRAST:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERACONTRAST, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
                        meye.picture.contrast = c->value << 10;
                        break;
                case V4L2_CID_SATURATION:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERACOLOR, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
                        meye.picture.colour = c->value << 10;
                        break;
                case V4L2_CID_AGC:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERAAGC, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
                        meye.params.agc = c->value;
                        break;
                case V4L2_CID_SHARPNESS:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERASHARPNESS, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
                        meye.params.sharpness = c->value;
                        break;
                case V4L2_CID_PICTURE:
-                       sonypi_camera_command(
-                               SONYPI_COMMAND_SETCAMERAPICTURE, c->value);
+                       sony_pic_camera_command(
+                               SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
                        meye.params.picture = c->value;
                        break;
                case V4L2_CID_JPEGQUAL:
@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
        memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
        meye.video_dev->dev = &meye.mchip_dev->dev;
 
-       if ((ret = sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1))) {
+       if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
                printk(KERN_ERR "meye: unable to power on the camera\n");
                printk(KERN_ERR "meye: did you enable the camera in "
                                "sonypi using the module options ?\n");
@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
        meye.params.picture = 0;
        meye.params.framerate = 0;
 
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 32);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 32);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 32);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, 32);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, 32);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 0);
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 48);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
 
        printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n",
               MEYE_DRIVER_VERSION);
@@ -1953,7 +1953,7 @@ outremap:
 outregions:
        pci_disable_device(meye.mchip_dev);
 outenabledev:
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
 outsonypienable:
        kfifo_free(meye.doneq);
 outkfifoalloc2:
@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev)
 
        pci_disable_device(meye.mchip_dev);
 
-       sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
+       sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
 
        kfifo_free(meye.doneq);
        kfifo_free(meye.grabq);
index ea107cb5c845baf46b928bf880e1b54944257077..323d0074120da4aa5ad7f0c87413abd72212e219 100644 (file)
 /****************************************************************************/
 
 /* Sony Programmable I/O Controller for accessing the camera commands */
-#include <linux/sonypi.h>
+#include <linux/sony-laptop.h>
 
 /* private API definitions */
 #include <linux/meye.h>