• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x10a0

68 module_param(minor, int, 0);
72 static int verbose; /* = 0 */
74 MODULE_PARM_DESC(verbose, "be verbose, default is 0 (no)");
76 static int fnkeyinit; /* = 0 */
81 static int camera; /* = 0 */
86 static int compat; /* = 0 */
91 static unsigned long mask = 0xffffffff;
104 "set this to 0 if you think the automatic ioport check for sony-laptop is wrong");
111 #define SONYPI_IRQ_PORT 0x8034
113 #define SONYPI_TYPE1_BASE 0x50
114 #define SONYPI_G10A (SONYPI_TYPE1_BASE+0x14)
115 #define SONYPI_TYPE1_REGION_SIZE 0x08
116 #define SONYPI_TYPE1_EVTYPE_OFFSET 0x04
119 #define SONYPI_SIRQ 0x9b
120 #define SONYPI_SLOB 0x9c
121 #define SONYPI_SHIB 0x9d
122 #define SONYPI_TYPE2_REGION_SIZE 0x20
123 #define SONYPI_TYPE2_EVTYPE_OFFSET 0x12
126 #define SONYPI_TYPE3_BASE 0x40
127 #define SONYPI_TYPE3_GID2 (SONYPI_TYPE3_BASE+0x48) /* 16 bits */
128 #define SONYPI_TYPE3_MISC (SONYPI_TYPE3_BASE+0x6d) /* 8 bits */
129 #define SONYPI_TYPE3_REGION_SIZE 0x20
130 #define SONYPI_TYPE3_EVTYPE_OFFSET 0x12
133 #define SONYPI_BAT_FLAGS 0x81
134 #define SONYPI_LCD_LIGHT 0x96
135 #define SONYPI_BAT1_PCTRM 0xa0
136 #define SONYPI_BAT1_LEFT 0xa2
137 #define SONYPI_BAT1_MAXRT 0xa4
138 #define SONYPI_BAT2_PCTRM 0xa8
139 #define SONYPI_BAT2_LEFT 0xaa
140 #define SONYPI_BAT2_MAXRT 0xac
141 #define SONYPI_BAT1_MAXTK 0xb0
142 #define SONYPI_BAT1_FULL 0xb2
143 #define SONYPI_BAT2_MAXTK 0xb8
144 #define SONYPI_BAT2_FULL 0xba
147 #define SONYPI_FAN0_STATUS 0x93
148 #define SONYPI_TEMP_STATUS 0xC1
151 #define SONYPI_DATA_IOPORT 0x62
152 #define SONYPI_CST_IOPORT 0x66
161 { 0x10c0, 0x10c4 }, /* looks like the default on C1Vx */
162 { 0x1080, 0x1084 },
163 { 0x1090, 0x1094 },
164 { 0x10a0, 0x10a4 },
165 { 0x10b0, 0x10b4 },
166 { 0x0, 0x0 }
170 { 0x1080, 0x1084 },
171 { 0x10a0, 0x10a4 },
172 { 0x10c0, 0x10c4 },
173 { 0x10e0, 0x10e4 },
174 { 0x0, 0x0 }
188 { 11, 0x2 }, /* IRQ 11, GO22=0,GO23=1 in AML */
189 { 10, 0x1 }, /* IRQ 10, GO22=1,GO23=0 in AML */
190 { 5, 0x0 }, /* IRQ 5, GO22=0,GO23=0 in AML */
191 { 0, 0x3 } /* no IRQ, GO22=1,GO23=1 in AML */
195 { 11, 0x80 }, /* IRQ 11, 0x80 in SIRQ in AML */
196 { 10, 0x40 }, /* IRQ 10, 0x40 in SIRQ in AML */
197 { 9, 0x20 }, /* IRQ 9, 0x20 in SIRQ in AML */
198 { 6, 0x10 }, /* IRQ 6, 0x10 in SIRQ in AML */
199 { 0, 0x00 } /* no IRQ, 0x00 in SIRQ in AML */
205 #define SONYPI_CAMERA_BRIGHTNESS 0
212 #define SONYPI_CAMERA_EXPOSURE_MASK 0xC
213 #define SONYPI_CAMERA_WHITE_BALANCE_MASK 0x3
214 #define SONYPI_CAMERA_PICTURE_MODE_MASK 0x30
215 #define SONYPI_CAMERA_MUTE_MASK 0x40
217 /* the rest don't need a loop until not 0xff */
219 #define SONYPI_CAMERA_AGC_MASK 0x30
220 #define SONYPI_CAMERA_SHUTTER_MASK 0x7
223 #define SONYPI_CAMERA_CONTROL 0x10
226 #define SONYPI_CAMERA_STATUS_READY 0x2
227 #define SONYPI_CAMERA_STATUS_POSITION 0x4
229 #define SONYPI_DIRECTION_BACKWARDS 0x4
235 #define SONYPI_JOGGER_MASK 0x00000001
236 #define SONYPI_CAPTURE_MASK 0x00000002
237 #define SONYPI_FNKEY_MASK 0x00000004
238 #define SONYPI_BLUETOOTH_MASK 0x00000008
239 #define SONYPI_PKEY_MASK 0x00000010
240 #define SONYPI_BACK_MASK 0x00000020
241 #define SONYPI_HELP_MASK 0x00000040
242 #define SONYPI_LID_MASK 0x00000080
243 #define SONYPI_ZOOM_MASK 0x00000100
244 #define SONYPI_THUMBPHRASE_MASK 0x00000200
245 #define SONYPI_MEYE_MASK 0x00000400
246 #define SONYPI_MEMORYSTICK_MASK 0x00000800
247 #define SONYPI_BATTERY_MASK 0x00001000
248 #define SONYPI_WIRELESS_MASK 0x00002000
257 { 0x00, SONYPI_EVENT_ANYBUTTON_RELEASED },
258 { 0, 0 }
263 { 0x1f, SONYPI_EVENT_JOGDIAL_UP },
264 { 0x01, SONYPI_EVENT_JOGDIAL_DOWN },
265 { 0x5f, SONYPI_EVENT_JOGDIAL_UP_PRESSED },
266 { 0x41, SONYPI_EVENT_JOGDIAL_DOWN_PRESSED },
267 { 0x1e, SONYPI_EVENT_JOGDIAL_FAST_UP },
268 { 0x02, SONYPI_EVENT_JOGDIAL_FAST_DOWN },
269 { 0x5e, SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED },
270 { 0x42, SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED },
271 { 0x1d, SONYPI_EVENT_JOGDIAL_VFAST_UP },
272 { 0x03, SONYPI_EVENT_JOGDIAL_VFAST_DOWN },
273 { 0x5d, SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED },
274 { 0x43, SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED },
275 { 0x40, SONYPI_EVENT_JOGDIAL_PRESSED },
276 { 0, 0 }
281 { 0x05, SONYPI_EVENT_CAPTURE_PARTIALPRESSED },
282 { 0x07, SONYPI_EVENT_CAPTURE_PRESSED },
283 { 0x01, SONYPI_EVENT_CAPTURE_PARTIALRELEASED },
284 { 0, 0 }
289 { 0x10, SONYPI_EVENT_FNKEY_ESC },
290 { 0x11, SONYPI_EVENT_FNKEY_F1 },
291 { 0x12, SONYPI_EVENT_FNKEY_F2 },
292 { 0x13, SONYPI_EVENT_FNKEY_F3 },
293 { 0x14, SONYPI_EVENT_FNKEY_F4 },
294 { 0x15, SONYPI_EVENT_FNKEY_F5 },
295 { 0x16, SONYPI_EVENT_FNKEY_F6 },
296 { 0x17, SONYPI_EVENT_FNKEY_F7 },
297 { 0x18, SONYPI_EVENT_FNKEY_F8 },
298 { 0x19, SONYPI_EVENT_FNKEY_F9 },
299 { 0x1a, SONYPI_EVENT_FNKEY_F10 },
300 { 0x1b, SONYPI_EVENT_FNKEY_F11 },
301 { 0x1c, SONYPI_EVENT_FNKEY_F12 },
302 { 0x1f, SONYPI_EVENT_FNKEY_RELEASED },
303 { 0x21, SONYPI_EVENT_FNKEY_1 },
304 { 0x22, SONYPI_EVENT_FNKEY_2 },
305 { 0x31, SONYPI_EVENT_FNKEY_D },
306 { 0x32, SONYPI_EVENT_FNKEY_E },
307 { 0x33, SONYPI_EVENT_FNKEY_F },
308 { 0x34, SONYPI_EVENT_FNKEY_S },
309 { 0x35, SONYPI_EVENT_FNKEY_B },
310 { 0x36, SONYPI_EVENT_FNKEY_ONLY },
311 { 0, 0 }
316 { 0x01, SONYPI_EVENT_PKEY_P1 },
317 { 0x02, SONYPI_EVENT_PKEY_P2 },
318 { 0x04, SONYPI_EVENT_PKEY_P3 },
319 { 0x5c, SONYPI_EVENT_PKEY_P1 },
320 { 0, 0 }
325 { 0x55, SONYPI_EVENT_BLUETOOTH_PRESSED },
326 { 0x59, SONYPI_EVENT_BLUETOOTH_ON },
327 { 0x5a, SONYPI_EVENT_BLUETOOTH_OFF },
328 { 0, 0 }
333 { 0x59, SONYPI_EVENT_WIRELESS_ON },
334 { 0x5a, SONYPI_EVENT_WIRELESS_OFF },
335 { 0, 0 }
340 { 0x20, SONYPI_EVENT_BACK_PRESSED },
341 { 0, 0 }
346 { 0x3b, SONYPI_EVENT_HELP_PRESSED },
347 { 0, 0 }
353 { 0x51, SONYPI_EVENT_LID_CLOSED },
354 { 0x50, SONYPI_EVENT_LID_OPENED },
355 { 0, 0 }
360 { 0x39, SONYPI_EVENT_ZOOM_PRESSED },
361 { 0, 0 }
366 { 0x3a, SONYPI_EVENT_THUMBPHRASE_PRESSED },
367 { 0, 0 }
372 { 0x00, SONYPI_EVENT_MEYE_FACE },
373 { 0x01, SONYPI_EVENT_MEYE_OPPOSITE },
374 { 0, 0 }
379 { 0x53, SONYPI_EVENT_MEMORYSTICK_INSERT },
380 { 0x54, SONYPI_EVENT_MEMORYSTICK_EJECT },
381 { 0, 0 }
386 { 0x20, SONYPI_EVENT_BATTERY_INSERT },
387 { 0x30, SONYPI_EVENT_BATTERY_REMOVE },
388 { 0, 0 }
397 { SONYPI_DEVICE_MODEL_TYPE1, 0, 0xffffffff, sonypi_releaseev },
398 { SONYPI_DEVICE_MODEL_TYPE1, 0x70, SONYPI_MEYE_MASK, sonypi_meyeev },
399 { SONYPI_DEVICE_MODEL_TYPE1, 0x30, SONYPI_LID_MASK, sonypi_lidev },
400 { SONYPI_DEVICE_MODEL_TYPE1, 0x60, SONYPI_CAPTURE_MASK, sonypi_captureev },
401 { SONYPI_DEVICE_MODEL_TYPE1, 0x10, SONYPI_JOGGER_MASK, sonypi_joggerev },
402 { SONYPI_DEVICE_MODEL_TYPE1, 0x20, SONYPI_FNKEY_MASK, sonypi_fnkeyev },
403 { SONYPI_DEVICE_MODEL_TYPE1, 0x30, SONYPI_BLUETOOTH_MASK, sonypi_blueev },
404 { SONYPI_DEVICE_MODEL_TYPE1, 0x40, SONYPI_PKEY_MASK, sonypi_pkeyev },
405 { SONYPI_DEVICE_MODEL_TYPE1, 0x30, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
406 { SONYPI_DEVICE_MODEL_TYPE1, 0x40, SONYPI_BATTERY_MASK, sonypi_batteryev },
408 { SONYPI_DEVICE_MODEL_TYPE2, 0, 0xffffffff, sonypi_releaseev },
409 { SONYPI_DEVICE_MODEL_TYPE2, 0x38, SONYPI_LID_MASK, sonypi_lidev },
410 { SONYPI_DEVICE_MODEL_TYPE2, 0x11, SONYPI_JOGGER_MASK, sonypi_joggerev },
411 { SONYPI_DEVICE_MODEL_TYPE2, 0x61, SONYPI_CAPTURE_MASK, sonypi_captureev },
412 { SONYPI_DEVICE_MODEL_TYPE2, 0x21, SONYPI_FNKEY_MASK, sonypi_fnkeyev },
413 { SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_BLUETOOTH_MASK, sonypi_blueev },
414 { SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_PKEY_MASK, sonypi_pkeyev },
415 { SONYPI_DEVICE_MODEL_TYPE2, 0x11, SONYPI_BACK_MASK, sonypi_backev },
416 { SONYPI_DEVICE_MODEL_TYPE2, 0x21, SONYPI_HELP_MASK, sonypi_helpev },
417 { SONYPI_DEVICE_MODEL_TYPE2, 0x21, SONYPI_ZOOM_MASK, sonypi_zoomev },
418 { SONYPI_DEVICE_MODEL_TYPE2, 0x20, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev },
419 { SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
420 { SONYPI_DEVICE_MODEL_TYPE2, 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
421 { SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev },
423 { SONYPI_DEVICE_MODEL_TYPE3, 0, 0xffffffff, sonypi_releaseev },
424 { SONYPI_DEVICE_MODEL_TYPE3, 0x21, SONYPI_FNKEY_MASK, sonypi_fnkeyev },
425 { SONYPI_DEVICE_MODEL_TYPE3, 0x31, SONYPI_WIRELESS_MASK, sonypi_wlessev },
426 { SONYPI_DEVICE_MODEL_TYPE3, 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
427 { SONYPI_DEVICE_MODEL_TYPE3, 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
428 { SONYPI_DEVICE_MODEL_TYPE3, 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev },
429 { 0 }
470 { 0, 0 },
516 #define SONYPI_ACPI_ACTIVE 0
531 outb_p(0x81, SONYPI_CST_IOPORT); in sonypi_ec_write()
532 wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); in sonypi_ec_write()
534 wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); in sonypi_ec_write()
536 wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); in sonypi_ec_write()
537 return 0; in sonypi_ec_write()
547 outb_p(0x80, SONYPI_CST_IOPORT); in sonypi_ec_read()
548 wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); in sonypi_ec_read()
550 wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); in sonypi_ec_read()
552 return 0; in sonypi_ec_read()
563 return 0; in ec_read16()
572 v = (v & 0xFFFF0000) | ((u32) sonypi_device.ioport1); in sonypi_type1_srs()
576 v = (v & 0xFFF0FFFF) | in sonypi_type1_srs()
581 v &= ~(((u32) 0x3) << SONYPI_IRQ_SHIFT); in sonypi_type1_srs()
586 v = (v & 0xFF1FFFFF) | 0x00C00000; in sonypi_type1_srs()
592 if (sonypi_ec_write(SONYPI_SHIB, (sonypi_device.ioport1 & 0xFF00) >> 8)) in sonypi_type2_srs()
594 if (sonypi_ec_write(SONYPI_SLOB, sonypi_device.ioport1 & 0x00FF)) in sonypi_type2_srs()
611 v16 = (sonypi_device.ioport1 & 0xFFF0) | 0x01; in sonypi_type3_srs()
614 v8 = (v8 & 0xCF) | 0x10; in sonypi_type3_srs()
624 v = v & 0xFF3FFFFF; in sonypi_type1_dis()
628 v |= (0x3 << SONYPI_IRQ_SHIFT); in sonypi_type1_dis()
634 if (sonypi_ec_write(SONYPI_SHIB, 0)) in sonypi_type2_dis()
636 if (sonypi_ec_write(SONYPI_SLOB, 0)) in sonypi_type2_dis()
638 if (sonypi_ec_write(SONYPI_SIRQ, 0)) in sonypi_type2_dis()
646 pci_write_config_word(sonypi_device.dev, SONYPI_TYPE3_GID2, 0); in sonypi_type3_dis()
653 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call1()
664 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call2()
666 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call2()
676 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call3()
678 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call3()
680 wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); in sonypi_call3()
686 #if 0
694 v1 = sonypi_call2(0x8f, fn);
695 v2 = sonypi_call2(0x8f, fn);
696 if (v1 == v2 && v1 != 0xff)
699 return 0xff;
706 wait_on_command(0, sonypi_call3(0x90, fn, v), ITERATIONS_SHORT); in sonypi_set()
714 v = sonypi_call2(0x8f, SONYPI_CAMERA_STATUS); in sonypi_camera_ready()
715 return (v != 0xff && (v & SONYPI_CAMERA_STATUS_READY)); in sonypi_camera_ready()
726 sonypi_call2(0x91, 0); in sonypi_camera_off()
727 sonypi_device.camera_power = 0; in sonypi_camera_off()
738 for (j = 5; j > 0; j--) { in sonypi_camera_on()
740 while (sonypi_call2(0x91, 0x1)) in sonypi_camera_on()
742 sonypi_call1(0x93); in sonypi_camera_on()
744 for (i = 400; i > 0; i--) { in sonypi_camera_on()
753 if (j == 0) { in sonypi_camera_on()
758 sonypi_set(0x10, 0x5a); in sonypi_camera_on()
770 sonypi_call2(0x96, state); in sonypi_setbluetoothpower()
771 sonypi_call1(0x82); in sonypi_setbluetoothpower()
783 input_report_key(kp.dev, kp.key, 0); in input_keyrelease()
818 for (i = 0; sonypi_inputkeys[i].sonypiev; i++) in sonypi_report_input_event()
840 u8 v1, v2, event = 0; in sonypi_irq()
846 for (i = 0; sonypi_eventtypes[i].model; i++) { in sonypi_irq()
854 for (j = 0; sonypi_eventtypes[i].events[j].event; j++) { in sonypi_irq()
864 "sonypi: unknown event port1=0x%02x,port2=0x%02x\n", in sonypi_irq()
874 "sonypi: event port1=0x%02x,port2=0x%02x\n", v1, v2); in sonypi_irq()
897 return 0; in sonypi_misc_release()
909 return 0; in sonypi_misc_open()
918 if ((kfifo_len(&sonypi_device.fifo) == 0) && in sonypi_misc_read()
923 kfifo_len(&sonypi_device.fifo) != 0); in sonypi_misc_read()
935 if (ret > 0) { in sonypi_misc_read()
948 return 0; in sonypi_misc_poll()
954 long ret = 0; in sonypi_misc_ioctl()
1014 val8 &= 0x07; in sonypi_misc_ioctl()
1094 sonypi_call1(0x82); in sonypi_enable()
1095 sonypi_call2(0x81, 0xff); in sonypi_enable()
1096 sonypi_call1(compat ? 0x92 : 0x82); in sonypi_enable()
1100 outb(0xf0, 0xb2); in sonypi_enable()
1108 sonypi_call2(0x81, 0); /* make sure we don't get any more events */ in sonypi_disable()
1114 outb(0xf1, 0xb2); in sonypi_disable()
1128 return 0; in sonypi_disable()
1137 return 0; in sonypi_acpi_add()
1143 return 0; in sonypi_acpi_remove()
1147 {"SNY6001", 0},
1148 {"", 0},
1178 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in sonypi_create_input_devices()
1180 jog_dev->relbit[0] = BIT_MASK(REL_WHEEL); in sonypi_create_input_devices()
1194 key_dev->evbit[0] = BIT_MASK(EV_KEY); in sonypi_create_input_devices()
1195 for (i = 0; sonypi_inputkeys[i].sonypiev; i++) in sonypi_create_input_devices()
1207 return 0; in sonypi_create_input_devices()
1239 printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? " in sonypi_setup_ioports()
1240 "if not use check_ioport=0\n", in sonypi_setup_ioports()
1255 return 0; in sonypi_setup_ioports()
1272 return 0; in sonypi_setup_irq()
1284 "compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n", in sonypi_display_info()
1293 printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n", in sonypi_display_info()
1403 sonypi_enable(0); in sonypi_probe()
1405 return 0; in sonypi_probe()
1451 return 0; in sonypi_remove()
1462 return 0; in sonypi_suspend()
1468 return 0; in sonypi_resume()
1538 if (acpi_bus_register_driver(&sonypi_acpi_driver) >= 0) in sonypi_init()
1542 return 0; in sonypi_init()