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 <[email protected]>
11 * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
17 * Copyright (C) 2000 Takaya Kinjo <t-[email protected]-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()
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()
1087 if (camera && camera_on) in sonypi_enable()
1094 if (camera) in sonypi_disable()
1155 return -ENOMEM; in sonypi_create_input_devices()
1157 jog_dev->name = "Sony Vaio Jogdial"; in sonypi_create_input_devices()
1158 jog_dev->id.bustype = BUS_ISA; in sonypi_create_input_devices()
1159 jog_dev->id.vendor = PCI_VENDOR_ID_SONY; in sonypi_create_input_devices()
1160 jog_dev->dev.parent = &pdev->dev; in sonypi_create_input_devices()
1162 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in sonypi_create_input_devices()
1163 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); in sonypi_create_input_devices()
1164 jog_dev->relbit[0] = BIT_MASK(REL_WHEEL); in sonypi_create_input_devices()
1168 error = -ENOMEM; in sonypi_create_input_devices()
1172 key_dev->name = "Sony Vaio Keys"; in sonypi_create_input_devices()
1173 key_dev->id.bustype = BUS_ISA; in sonypi_create_input_devices()
1174 key_dev->id.vendor = PCI_VENDOR_ID_SONY; in sonypi_create_input_devices()
1175 key_dev->dev.parent = &pdev->dev; in sonypi_create_input_devices()
1178 key_dev->evbit[0] = BIT_MASK(EV_KEY); in sonypi_create_input_devices()
1181 set_bit(sonypi_inputkeys[i].inputev, key_dev->keybit); in sonypi_create_input_devices()
1195 /* Set to NULL so we don't free it again below */ in sonypi_create_input_devices()
1210 /* try to detect if sony-laptop is being used and thus in sonypi_setup_ioports()
1215 * attempt to be some more user-friendly as we currently are, in sonypi_setup_ioports()
1219 while (check_ioport && check->port1) { in sonypi_setup_ioports()
1220 if (!request_region(check->port1, in sonypi_setup_ioports()
1223 printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? " in sonypi_setup_ioports()
1225 check->port1); in sonypi_setup_ioports()
1226 return -EBUSY; in sonypi_setup_ioports()
1228 release_region(check->port1, sonypi_device.region_size); in sonypi_setup_ioports()
1232 while (ioport_list->port1) { in sonypi_setup_ioports()
1234 if (request_region(ioport_list->port1, in sonypi_setup_ioports()
1237 dev->ioport1 = ioport_list->port1; in sonypi_setup_ioports()
1238 dev->ioport2 = ioport_list->port2; in sonypi_setup_ioports()
1244 return -EBUSY; in sonypi_setup_ioports()
1250 while (irq_list->irq) { in sonypi_setup_irq()
1252 if (!request_irq(irq_list->irq, sonypi_irq, in sonypi_setup_irq()
1254 dev->irq = irq_list->irq; in sonypi_setup_irq()
1255 dev->bits = irq_list->bits; in sonypi_setup_irq()
1261 return -EBUSY; in sonypi_setup_irq()
1267 "verbose = %d, fnkeyinit = %s, camera = %s, " in sonypi_display_info()
1272 camera ? "on" : "off", in sonypi_display_info()
1281 if (minor == -1) in sonypi_display_info()
1293 printk(KERN_WARNING "sonypi: please try the sony-laptop module instead " in sonypi_probe()
1306 sonypi_device.bluetooth_power = -1; in sonypi_probe()
1322 error = -EIO; in sonypi_probe()
1357 if (minor != -1) in sonypi_probe()
1481 DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
1488 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-"),
1503 return -ENODEV; in sonypi_init()
1509 sonypi_platform_device = platform_device_alloc("sonypi", -1); in sonypi_init()
1511 error = -ENOMEM; in sonypi_init()