Lines Matching +full:camera +full:- +full:command +full:- +full:set
1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Copyright (C) 2001-2005 Stelian Pop <stelian@popies.net>
11 * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
17 * Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
53 static int minor = -1;
56 "minor number of the misc device, default is -1 (automatic)");
65 "set this if your Fn keys do not generate any event");
67 static int camera; /* = 0 */ variable
68 module_param(camera, int, 0444);
69 MODULE_PARM_DESC(camera,
70 "set this if you have a MotionEye camera (PictureBook series)");
75 "set this if you want to enable backward compatibility mode");
80 "set this to the mask of event you want to enable (see doc)");
85 "set this if you would like sonypi to feed events to the input subsystem");
90 "set this to 0 if you think the automatic ioport check for sony-laptop is wrong");
140 /* The set of possible ioports */
167 /* The set of possible interrupts */
241 /* The set of possible button release events */
247 /* The set of possible jogger events */
265 /* The set of possible capture button events */
273 /* The set of possible fnkeys events */
300 /* The set of possible program key events */
309 /* The set of possible bluetooth events */
317 /* The set of possible wireless events */
324 /* The set of possible back button events */
330 /* The set of possible help button events */
337 /* The set of possible lid events */
344 /* The set of possible zoom events */
350 /* The set of possible thumbphrase events */
356 /* The set of possible motioneye camera events */
363 /* The set of possible memorystick events */
370 /* The set of possible battery events */
491 #define wait_on_command(quiet, command, iterations) { \ argument
493 while (--n && (command)) \
496 …printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __func__, __LINE__);…
545 return -1; in ec_read16()
547 return -1; in ec_read16()
552 /* Initializes the device - this comes from the AML code in the ACPI bios */
604 /* Disables the device - this comes from the AML code in the ACPI bios */
679 while (n--) {
689 /* Set brightness, hue etc */
695 /* Tests if the camera is ready */
704 /* Turns the camera off */
716 /* Turns the camera on */
724 for (j = 5; j > 0; j--) { in sonypi_camera_on()
730 for (i = 400; i > 0; i--) { in sonypi_camera_on()
740 printk(KERN_WARNING "sonypi: failed to power on camera\n"); in sonypi_camera_on()
790 input_report_rel(jog_dev, REL_WHEEL, -1); in sonypi_report_input_event()
881 sonypi_device.open_count--; in sonypi_misc_release()
905 (file->f_flags & O_NONBLOCK)) in sonypi_misc_read()
906 return -EAGAIN; in sonypi_misc_read()
917 return -EFAULT; in sonypi_misc_read()
923 inode->i_atime = current_time(inode); in sonypi_misc_read()
949 ret = -EIO; in sonypi_misc_ioctl()
953 ret = -EFAULT; in sonypi_misc_ioctl()
957 ret = -EFAULT; in sonypi_misc_ioctl()
961 ret = -EIO; in sonypi_misc_ioctl()
965 ret = -EIO; in sonypi_misc_ioctl()
969 ret = -EFAULT; in sonypi_misc_ioctl()
973 ret = -EIO; in sonypi_misc_ioctl()
977 ret = -EFAULT; in sonypi_misc_ioctl()
981 ret = -EIO; in sonypi_misc_ioctl()
985 ret = -EFAULT; in sonypi_misc_ioctl()
989 ret = -EIO; in sonypi_misc_ioctl()
993 ret = -EFAULT; in sonypi_misc_ioctl()
997 ret = -EIO; in sonypi_misc_ioctl()
1002 ret = -EFAULT; in sonypi_misc_ioctl()
1007 ret = -EFAULT; in sonypi_misc_ioctl()
1011 ret = -EFAULT; in sonypi_misc_ioctl()
1019 ret = -EIO; in sonypi_misc_ioctl()
1023 ret = -EFAULT; in sonypi_misc_ioctl()
1027 ret = -EFAULT; in sonypi_misc_ioctl()
1031 ret = -EIO; in sonypi_misc_ioctl()
1036 ret = -EIO; in sonypi_misc_ioctl()
1040 ret = -EFAULT; in sonypi_misc_ioctl()
1043 ret = -EINVAL; in sonypi_misc_ioctl()
1088 if (camera && camera_on) in sonypi_enable()
1095 if (camera) in sonypi_disable()
1156 return -ENOMEM; in sonypi_create_input_devices()
1158 jog_dev->name = "Sony Vaio Jogdial"; in sonypi_create_input_devices()
1159 jog_dev->id.bustype = BUS_ISA; in sonypi_create_input_devices()
1160 jog_dev->id.vendor = PCI_VENDOR_ID_SONY; in sonypi_create_input_devices()
1161 jog_dev->dev.parent = &pdev->dev; in sonypi_create_input_devices()
1163 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in sonypi_create_input_devices()
1164 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); in sonypi_create_input_devices()
1165 jog_dev->relbit[0] = BIT_MASK(REL_WHEEL); in sonypi_create_input_devices()
1169 error = -ENOMEM; in sonypi_create_input_devices()
1173 key_dev->name = "Sony Vaio Keys"; in sonypi_create_input_devices()
1174 key_dev->id.bustype = BUS_ISA; in sonypi_create_input_devices()
1175 key_dev->id.vendor = PCI_VENDOR_ID_SONY; in sonypi_create_input_devices()
1176 key_dev->dev.parent = &pdev->dev; in sonypi_create_input_devices()
1179 key_dev->evbit[0] = BIT_MASK(EV_KEY); in sonypi_create_input_devices()
1182 set_bit(sonypi_inputkeys[i].inputev, key_dev->keybit); in sonypi_create_input_devices()
1196 /* Set to NULL so we don't free it again below */ in sonypi_create_input_devices()
1211 /* try to detect if sony-laptop is being used and thus in sonypi_setup_ioports()
1216 * attempt to be some more user-friendly as we currently are, in sonypi_setup_ioports()
1220 while (check_ioport && check->port1) { in sonypi_setup_ioports()
1221 if (!request_region(check->port1, in sonypi_setup_ioports()
1224 printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? " in sonypi_setup_ioports()
1226 check->port1); in sonypi_setup_ioports()
1227 return -EBUSY; in sonypi_setup_ioports()
1229 release_region(check->port1, sonypi_device.region_size); in sonypi_setup_ioports()
1233 while (ioport_list->port1) { in sonypi_setup_ioports()
1235 if (request_region(ioport_list->port1, in sonypi_setup_ioports()
1238 dev->ioport1 = ioport_list->port1; in sonypi_setup_ioports()
1239 dev->ioport2 = ioport_list->port2; in sonypi_setup_ioports()
1245 return -EBUSY; in sonypi_setup_ioports()
1251 while (irq_list->irq) { in sonypi_setup_irq()
1253 if (!request_irq(irq_list->irq, sonypi_irq, in sonypi_setup_irq()
1255 dev->irq = irq_list->irq; in sonypi_setup_irq()
1256 dev->bits = irq_list->bits; in sonypi_setup_irq()
1262 return -EBUSY; in sonypi_setup_irq()
1268 "verbose = %d, fnkeyinit = %s, camera = %s, " in sonypi_display_info()
1273 camera ? "on" : "off", in sonypi_display_info()
1282 if (minor == -1) in sonypi_display_info()
1294 printk(KERN_WARNING "sonypi: please try the sony-laptop module instead " in sonypi_probe()
1307 sonypi_device.bluetooth_power = -1; in sonypi_probe()
1323 error = -EIO; in sonypi_probe()
1358 if (minor != -1) in sonypi_probe()
1484 DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
1491 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-"),
1506 return -ENODEV; in sonypi_init()
1512 sonypi_platform_device = platform_device_alloc("sonypi", -1); in sonypi_init()
1514 error = -ENOMEM; in sonypi_init()