Lines Matching refs:result

742 	union acpi_object *result = NULL;  in __call_snc_method()  local
767 result = (union acpi_object *) output.pointer; in __call_snc_method()
768 if (!result) in __call_snc_method()
771 return result; in __call_snc_method()
775 int *result) in sony_nc_int_call() argument
794 if (result) in sony_nc_int_call()
795 *result = object->integer.value; in sony_nc_int_call()
854 int i, r, result, arg; in sony_nc_handles_setup() local
863 &result); in sony_nc_handles_setup()
866 result, i); in sony_nc_handles_setup()
867 handles->cap[i] = result; in sony_nc_handles_setup()
918 static int sony_call_snc_handle(int handle, int argument, int *result) in sony_call_snc_handle() argument
927 ret = sony_nc_int_call(sony_nc_acpi_handle, "SN07", &arg, result); in sony_call_snc_handle()
928 dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", arg, *result); in sony_call_snc_handle()
1056 int result; in sony_nc_get_brightness_ng() local
1060 sony_call_snc_handle(sdev->handle, sdev->cmd_base + 0x100, &result); in sony_nc_get_brightness_ng()
1062 return (result & 0xff) - sdev->offset; in sony_nc_get_brightness_ng()
1067 int value, result; in sony_nc_update_status_ng() local
1073 &result)) in sony_nc_update_status_ng()
1165 unsigned int result = 0; in sony_nc_hotkeys_decode() local
1168 if (sony_call_snc_handle(handle, 0x200, &result)) { in sony_nc_hotkeys_decode()
1174 result &= 0xFF; in sony_nc_hotkeys_decode()
1182 if (key_event->data == result) { in sony_nc_hotkeys_decode()
1190 event, result, handle); in sony_nc_hotkeys_decode()
1212 unsigned int result = 0; in sony_nc_notify() local
1249 sony_call_snc_handle(handle, 0x0100, &result); in sony_nc_notify()
1250 real_ev = result & 0x03; in sony_nc_notify()
1261 sony_call_snc_handle(handle, 0x0000, &result); in sony_nc_notify()
1263 (result == 0x1) ? "switch change" : in sony_nc_notify()
1264 (result == 0x2) ? "output switch" : in sony_nc_notify()
1265 (result == 0x3) ? "output switch" : in sony_nc_notify()
1285 sony_nc_int_call(sony_nc_acpi_handle, "SN05", &arg, &result); in sony_nc_notify()
1317 unsigned int i, result, bitmask, arg; in sony_nc_function_setup() local
1336 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_setup()
1340 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_setup()
1345 result = sony_nc_touchpad_setup(pf_device, handle); in sony_nc_function_setup()
1346 if (result) in sony_nc_function_setup()
1348 result); in sony_nc_function_setup()
1353 result = sony_nc_battery_care_setup(pf_device, handle); in sony_nc_function_setup()
1354 if (result) in sony_nc_function_setup()
1356 result); in sony_nc_function_setup()
1360 result = sony_nc_lid_resume_setup(pf_device, handle); in sony_nc_function_setup()
1361 if (result) in sony_nc_function_setup()
1363 result); in sony_nc_function_setup()
1366 result = sony_nc_thermal_setup(pf_device); in sony_nc_function_setup()
1367 if (result) in sony_nc_function_setup()
1369 result); in sony_nc_function_setup()
1374 result = sony_nc_gfx_switch_setup(pf_device, handle); in sony_nc_function_setup()
1375 if (result) in sony_nc_function_setup()
1377 result); in sony_nc_function_setup()
1380 result = sony_nc_highspeed_charging_setup(pf_device); in sony_nc_function_setup()
1381 if (result) in sony_nc_function_setup()
1383 result); in sony_nc_function_setup()
1387 result = sony_nc_rfkill_setup(device, handle); in sony_nc_function_setup()
1388 if (result) in sony_nc_function_setup()
1390 result); in sony_nc_function_setup()
1397 result = sony_nc_kbd_backlight_setup(pf_device, handle); in sony_nc_function_setup()
1398 if (result) in sony_nc_function_setup()
1400 result); in sony_nc_function_setup()
1403 result = sony_nc_lowbatt_setup(pf_device); in sony_nc_function_setup()
1404 if (result) in sony_nc_function_setup()
1406 result); in sony_nc_function_setup()
1409 result = sony_nc_fanspeed_setup(pf_device); in sony_nc_function_setup()
1410 if (result) in sony_nc_function_setup()
1412 result); in sony_nc_function_setup()
1415 result = sony_nc_usb_charge_setup(pf_device); in sony_nc_function_setup()
1416 if (result) in sony_nc_function_setup()
1418 result); in sony_nc_function_setup()
1421 result = sony_nc_panelid_setup(pf_device); in sony_nc_function_setup()
1422 if (result) in sony_nc_function_setup()
1424 result); in sony_nc_function_setup()
1427 result = sony_nc_smart_conn_setup(pf_device); in sony_nc_function_setup()
1428 if (result) in sony_nc_function_setup()
1430 result); in sony_nc_function_setup()
1441 &result); in sony_nc_function_setup()
1446 unsigned int i, result, bitmask, handle; in sony_nc_function_cleanup() local
1450 sony_nc_int_call(sony_nc_acpi_handle, "SN03", &bitmask, &result); in sony_nc_function_cleanup()
1523 unsigned int i, result, bitmask, arg; in sony_nc_function_resume() local
1538 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_resume()
1542 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_resume()
1560 &result); in sony_nc_function_resume()
1609 int result; in sony_nc_rfkill_set() local
1615 return sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_set()
1629 int result; in sony_nc_setup_rfkill() local
1658 if (sony_call_snc_handle(sony_rfkill_handle, 0x200, &result) < 0) { in sony_nc_setup_rfkill()
1662 hwblock = !(result & 0x1); in sony_nc_setup_rfkill()
1666 &result) < 0) { in sony_nc_setup_rfkill()
1670 swblock = !(result & 0x2); in sony_nc_setup_rfkill()
1687 int result; in sony_nc_rfkill_update() local
1690 sony_call_snc_handle(sony_rfkill_handle, 0x200, &result); in sony_nc_rfkill_update()
1691 hwblock = !(result & 0x1); in sony_nc_rfkill_update()
1706 sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_update()
1708 !(result & 0x2), false); in sony_nc_rfkill_update()
1784 int result; in __sony_nc_kbd_backlight_mode_set() local
1790 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1797 &result); in __sony_nc_kbd_backlight_mode_set()
1834 int result; in __sony_nc_kbd_backlight_timeout_set() local
1840 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1879 int result; in sony_nc_kbd_backlight_setup() local
1892 &result); in sony_nc_kbd_backlight_setup()
1896 if ((handle == 0x0137 && !(result & 0x02)) || in sony_nc_kbd_backlight_setup()
1897 !(result & 0x01)) { in sony_nc_kbd_backlight_setup()
1968 unsigned int result, cmd; in sony_nc_battery_care_limit_store() local
2015 if (sony_call_snc_handle(bcare_ctl->handle, cmd | 0x0100, &result)) in sony_nc_battery_care_limit_store()
2024 unsigned int result, status; in sony_nc_battery_care_limit_show() local
2026 if (sony_call_snc_handle(bcare_ctl->handle, 0x0000, &result)) in sony_nc_battery_care_limit_show()
2029 status = (result & 0x01) ? ((result & 0x30) >> 0x04) : 0; in sony_nc_battery_care_limit_show()
2137 unsigned int result; in sony_nc_thermal_mode_set() local
2148 if (sony_call_snc_handle(0x0122, mode << 0x10 | 0x0200, &result)) in sony_nc_thermal_mode_set()
2158 unsigned int result; in sony_nc_thermal_mode_get() local
2160 if (sony_call_snc_handle(0x0122, 0x0100, &result)) in sony_nc_thermal_mode_get()
2163 return result & 0xff; in sony_nc_thermal_mode_get()
2305 unsigned int result; in sony_nc_lid_resume_store() local
2334 &result)) in sony_nc_lid_resume_store()
2360 unsigned int result; in sony_nc_lid_resume_setup() local
2363 if (sony_call_snc_handle(handle, 0x0000, &result)) in sony_nc_lid_resume_setup()
2370 lid_ctl->status = result & 0x7; in sony_nc_lid_resume_setup()
2394 result = device_create_file(&pd->dev, &lid_ctl->attrs[i]); in sony_nc_lid_resume_setup()
2395 if (result) in sony_nc_lid_resume_setup()
2408 return result; in sony_nc_lid_resume_setup()
2443 unsigned int result; in __sony_nc_gfx_switch_status_get() local
2447 &result)) in __sony_nc_gfx_switch_status_get()
2455 return result & 0x1 ? SPEED : STAMINA; in __sony_nc_gfx_switch_status_get()
2461 return result & 0x1 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2468 dprintk("GFX Status: 0x%x\n", result); in __sony_nc_gfx_switch_status_get()
2469 return result & 0x80 ? AUTO : in __sony_nc_gfx_switch_status_get()
2470 result & 0x02 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2494 unsigned int result; in sony_nc_gfx_switch_setup() local
2507 result = device_create_file(&pd->dev, &gfxs_ctl->attr); in sony_nc_gfx_switch_setup()
2508 if (result) in sony_nc_gfx_switch_setup()
2517 return result; in sony_nc_gfx_switch_setup()
2537 unsigned int result; in sony_nc_highspeed_charging_store() local
2546 if (sony_call_snc_handle(0x0131, value << 0x10 | 0x0200, &result)) in sony_nc_highspeed_charging_store()
2555 unsigned int result; in sony_nc_highspeed_charging_show() local
2557 if (sony_call_snc_handle(0x0131, 0x0100, &result)) in sony_nc_highspeed_charging_show()
2560 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_highspeed_charging_show()
2565 unsigned int result; in sony_nc_highspeed_charging_setup() local
2567 if (sony_call_snc_handle(0x0131, 0x0000, &result) || !(result & 0x01)) { in sony_nc_highspeed_charging_setup()
2585 result = device_create_file(&pd->dev, hsc_handle); in sony_nc_highspeed_charging_setup()
2586 if (result) { in sony_nc_highspeed_charging_setup()
2589 return result; in sony_nc_highspeed_charging_setup()
2611 unsigned int result; in sony_nc_lowbatt_store() local
2620 if (sony_call_snc_handle(0x0121, value << 8, &result)) in sony_nc_lowbatt_store()
2629 unsigned int result; in sony_nc_lowbatt_show() local
2631 if (sony_call_snc_handle(0x0121, 0x0200, &result)) in sony_nc_lowbatt_show()
2634 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 1); in sony_nc_lowbatt_show()
2639 unsigned int result; in sony_nc_lowbatt_setup() local
2651 result = device_create_file(&pd->dev, lowbatt_handle); in sony_nc_lowbatt_setup()
2652 if (result) { in sony_nc_lowbatt_setup()
2655 return result; in sony_nc_lowbatt_setup()
2677 unsigned int result; in sony_nc_hsfan_store() local
2686 if (sony_call_snc_handle(0x0149, value << 0x10 | 0x0200, &result)) in sony_nc_hsfan_store()
2695 unsigned int result; in sony_nc_hsfan_show() local
2697 if (sony_call_snc_handle(0x0149, 0x0100, &result)) in sony_nc_hsfan_show()
2700 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_hsfan_show()
2706 unsigned int result; in sony_nc_fanspeed_show() local
2708 if (sony_call_snc_handle(0x0149, 0x0300, &result)) in sony_nc_fanspeed_show()
2711 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0xff); in sony_nc_fanspeed_show()
2716 unsigned int result; in sony_nc_fanspeed_setup() local
2724 result = -ENOMEM; in sony_nc_fanspeed_setup()
2740 result = device_create_file(&pd->dev, fan_handle); in sony_nc_fanspeed_setup()
2741 if (result) in sony_nc_fanspeed_setup()
2744 result = device_create_file(&pd->dev, hsf_handle); in sony_nc_fanspeed_setup()
2745 if (result) in sony_nc_fanspeed_setup()
2760 return result; in sony_nc_fanspeed_setup()
2784 unsigned int result; in sony_nc_usb_charge_store() local
2793 if (sony_call_snc_handle(0x0155, value << 0x10 | 0x0100, &result)) in sony_nc_usb_charge_store()
2802 unsigned int result; in sony_nc_usb_charge_show() local
2804 if (sony_call_snc_handle(0x0155, 0x0000, &result)) in sony_nc_usb_charge_show()
2807 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_usb_charge_show()
2812 unsigned int result; in sony_nc_usb_charge_setup() local
2814 if (sony_call_snc_handle(0x0155, 0x0000, &result) || !(result & 0x01)) { in sony_nc_usb_charge_setup()
2832 result = device_create_file(&pd->dev, uc_handle); in sony_nc_usb_charge_setup()
2833 if (result) { in sony_nc_usb_charge_setup()
2836 return result; in sony_nc_usb_charge_setup()
2857 unsigned int result; in sony_nc_panelid_show() local
2859 if (sony_call_snc_handle(0x011D, 0x0000, &result)) in sony_nc_panelid_show()
2862 return snprintf(buffer, PAGE_SIZE, "%d\n", result); in sony_nc_panelid_show()
2867 unsigned int result; in sony_nc_panelid_setup() local
2879 result = device_create_file(&pd->dev, panel_handle); in sony_nc_panelid_setup()
2880 if (result) { in sony_nc_panelid_setup()
2883 return result; in sony_nc_panelid_setup()
2905 unsigned int result; in sony_nc_smart_conn_store() local
2914 if (sony_call_snc_handle(0x0168, value << 0x10, &result)) in sony_nc_smart_conn_store()
2922 unsigned int result; in sony_nc_smart_conn_setup() local
2934 result = device_create_file(&pd->dev, sc_handle); in sony_nc_smart_conn_setup()
2935 if (result) { in sony_nc_smart_conn_setup()
2938 return result; in sony_nc_smart_conn_setup()
2963 unsigned int result; in sony_nc_touchpad_store() local
2976 (!value << 0x10) | 0x100, &result)) in sony_nc_touchpad_store()
2985 unsigned int result; in sony_nc_touchpad_show() local
2987 if (sony_call_snc_handle(tp_ctl->handle, 0x000, &result)) in sony_nc_touchpad_show()
2990 return snprintf(buffer, PAGE_SIZE, "%d\n", !(result & 0x01)); in sony_nc_touchpad_show()
3151 int result = 0; in sony_nc_add() local
3160 result = acpi_bus_get_status(device); in sony_nc_add()
3162 if (!result && !device->status.present) { in sony_nc_add()
3164 result = -ENODEV; in sony_nc_add()
3168 result = sony_pf_add(); in sony_nc_add()
3169 if (result) in sony_nc_add()
3178 result = -ENODEV; in sony_nc_add()
3183 result = sony_laptop_setup_input(device); in sony_nc_add()
3184 if (result) { in sony_nc_add()
3198 result = sony_nc_handles_setup(sony_pf_device); in sony_nc_add()
3199 if (!result) in sony_nc_add()
3235 result = in sony_nc_add()
3238 if (result) in sony_nc_add()
3262 return result; in sony_nc_add()
4409 int result = 0; in sony_pic_possible_resources() local
4418 result = acpi_bus_get_status(device); in sony_pic_possible_resources()
4419 if (result) { in sony_pic_possible_resources()
4437 result = -ENODEV; in sony_pic_possible_resources()
4440 return result; in sony_pic_possible_resources()
4468 int result = 0; in sony_pic_enable() local
4551 result = -ENODEV; in sony_pic_enable()
4562 return result; in sony_pic_enable()
4677 int result; in sony_pic_add() local
4687 result = sony_pic_possible_resources(device); in sony_pic_add()
4688 if (result) { in sony_pic_add()
4694 result = sony_laptop_setup_input(device); in sony_pic_add()
4695 if (result) { in sony_pic_add()
4700 result = sonypi_compat_init(); in sony_pic_add()
4701 if (result) in sony_pic_add()
4739 result = -ENODEV; in sony_pic_add()
4759 result = -ENODEV; in sony_pic_add()
4764 result = sony_pic_enable(device, spic_dev.cur_ioport, spic_dev.cur_irq); in sony_pic_add()
4765 if (result) { in sony_pic_add()
4772 result = sony_pf_add(); in sony_pic_add()
4773 if (result) in sony_pic_add()
4776 result = sysfs_create_group(&sony_pf_device->dev.kobj, &spic_attribute_group); in sony_pic_add()
4777 if (result) in sony_pic_add()
4817 return result; in sony_pic_add()
4875 int result; in sony_laptop_init() local
4878 result = acpi_bus_register_driver(&sony_pic_driver); in sony_laptop_init()
4879 if (result) { in sony_laptop_init()
4886 result = acpi_bus_register_driver(&sony_nc_driver); in sony_laptop_init()
4887 if (result) { in sony_laptop_init()
4898 return result; in sony_laptop_init()