Lines Matching refs:result

728 	union acpi_object *result = NULL;  in __call_snc_method()  local
753 result = (union acpi_object *) output.pointer; in __call_snc_method()
754 if (!result) in __call_snc_method()
757 return result; in __call_snc_method()
793 *result) in sony_nc_int_call() argument
800 ret = sony_nc_buffer_call(handle, name, &v, result, in sony_nc_int_call()
801 sizeof(*result)); in sony_nc_int_call()
803 ret = sony_nc_buffer_call(handle, name, NULL, result, in sony_nc_int_call()
804 sizeof(*result)); in sony_nc_int_call()
833 int i, r, result, arg; in sony_nc_handles_setup() local
842 &result); in sony_nc_handles_setup()
845 result, i); in sony_nc_handles_setup()
846 handles->cap[i] = result; in sony_nc_handles_setup()
897 static int sony_call_snc_handle(int handle, int argument, int *result) in sony_call_snc_handle() argument
906 ret = sony_nc_int_call(sony_nc_acpi_handle, "SN07", &arg, result); in sony_call_snc_handle()
907 dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", arg, *result); in sony_call_snc_handle()
1035 int result; in sony_nc_get_brightness_ng() local
1039 sony_call_snc_handle(sdev->handle, sdev->cmd_base + 0x100, &result); in sony_nc_get_brightness_ng()
1041 return (result & 0xff) - sdev->offset; in sony_nc_get_brightness_ng()
1046 int value, result; in sony_nc_update_status_ng() local
1052 &result)) in sony_nc_update_status_ng()
1144 unsigned int result = 0; in sony_nc_hotkeys_decode() local
1147 if (sony_call_snc_handle(handle, 0x200, &result)) { in sony_nc_hotkeys_decode()
1153 result &= 0xFF; in sony_nc_hotkeys_decode()
1161 if (key_event->data == result) { in sony_nc_hotkeys_decode()
1169 event, result, handle); in sony_nc_hotkeys_decode()
1191 unsigned int result = 0; in sony_nc_notify() local
1228 sony_call_snc_handle(handle, 0x0100, &result); in sony_nc_notify()
1229 real_ev = result & 0x03; in sony_nc_notify()
1240 sony_call_snc_handle(handle, 0x0000, &result); in sony_nc_notify()
1242 (result == 0x1) ? "switch change" : in sony_nc_notify()
1243 (result == 0x2) ? "output switch" : in sony_nc_notify()
1244 (result == 0x3) ? "output switch" : in sony_nc_notify()
1264 sony_nc_int_call(sony_nc_acpi_handle, "SN05", &arg, &result); in sony_nc_notify()
1296 unsigned int i, result, bitmask, arg; in sony_nc_function_setup() local
1315 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_setup()
1319 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_setup()
1324 result = sony_nc_touchpad_setup(pf_device, handle); in sony_nc_function_setup()
1325 if (result) in sony_nc_function_setup()
1327 result); in sony_nc_function_setup()
1332 result = sony_nc_battery_care_setup(pf_device, handle); in sony_nc_function_setup()
1333 if (result) in sony_nc_function_setup()
1335 result); in sony_nc_function_setup()
1339 result = sony_nc_lid_resume_setup(pf_device, handle); in sony_nc_function_setup()
1340 if (result) in sony_nc_function_setup()
1342 result); in sony_nc_function_setup()
1345 result = sony_nc_thermal_setup(pf_device); in sony_nc_function_setup()
1346 if (result) in sony_nc_function_setup()
1348 result); in sony_nc_function_setup()
1353 result = sony_nc_gfx_switch_setup(pf_device, handle); in sony_nc_function_setup()
1354 if (result) in sony_nc_function_setup()
1356 result); in sony_nc_function_setup()
1359 result = sony_nc_highspeed_charging_setup(pf_device); in sony_nc_function_setup()
1360 if (result) in sony_nc_function_setup()
1362 result); in sony_nc_function_setup()
1366 result = sony_nc_rfkill_setup(device, handle); in sony_nc_function_setup()
1367 if (result) in sony_nc_function_setup()
1369 result); in sony_nc_function_setup()
1377 result = sony_nc_kbd_backlight_setup(pf_device, handle); in sony_nc_function_setup()
1378 if (result) in sony_nc_function_setup()
1380 result); in sony_nc_function_setup()
1383 result = sony_nc_lowbatt_setup(pf_device); in sony_nc_function_setup()
1384 if (result) in sony_nc_function_setup()
1386 result); in sony_nc_function_setup()
1389 result = sony_nc_fanspeed_setup(pf_device); in sony_nc_function_setup()
1390 if (result) in sony_nc_function_setup()
1392 result); in sony_nc_function_setup()
1395 result = sony_nc_usb_charge_setup(pf_device); in sony_nc_function_setup()
1396 if (result) in sony_nc_function_setup()
1398 result); in sony_nc_function_setup()
1401 result = sony_nc_panelid_setup(pf_device); in sony_nc_function_setup()
1402 if (result) in sony_nc_function_setup()
1404 result); in sony_nc_function_setup()
1407 result = sony_nc_smart_conn_setup(pf_device); in sony_nc_function_setup()
1408 if (result) in sony_nc_function_setup()
1410 result); in sony_nc_function_setup()
1421 &result); in sony_nc_function_setup()
1426 unsigned int i, result, bitmask, handle; in sony_nc_function_cleanup() local
1433 sony_nc_int_call(sony_nc_acpi_handle, "SN03", &bitmask, &result); in sony_nc_function_cleanup()
1507 unsigned int i, result, bitmask, arg; in sony_nc_function_resume() local
1522 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_resume()
1526 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_resume()
1544 &result); in sony_nc_function_resume()
1593 int result; in sony_nc_rfkill_set() local
1599 return sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_set()
1613 int result; in sony_nc_setup_rfkill() local
1642 err = sony_call_snc_handle(sony_rfkill_handle, 0x200, &result); in sony_nc_setup_rfkill()
1647 hwblock = !(result & 0x1); in sony_nc_setup_rfkill()
1651 &result); in sony_nc_setup_rfkill()
1656 swblock = !(result & 0x2); in sony_nc_setup_rfkill()
1673 int result; in sony_nc_rfkill_update() local
1676 sony_call_snc_handle(sony_rfkill_handle, 0x200, &result); in sony_nc_rfkill_update()
1677 hwblock = !(result & 0x1); in sony_nc_rfkill_update()
1692 sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_update()
1694 !(result & 0x2), false); in sony_nc_rfkill_update()
1771 int result; in __sony_nc_kbd_backlight_mode_set() local
1777 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1784 &result); in __sony_nc_kbd_backlight_mode_set()
1821 int result; in __sony_nc_kbd_backlight_timeout_set() local
1827 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1866 int result; in sony_nc_kbd_backlight_setup() local
1895 ret = sony_call_snc_handle(handle, probe_base, &result); in sony_nc_kbd_backlight_setup()
1899 if ((handle == 0x0137 && !(result & 0x02)) || in sony_nc_kbd_backlight_setup()
1900 !(result & 0x01)) { in sony_nc_kbd_backlight_setup()
1977 unsigned int result, cmd; in sony_nc_battery_care_limit_store() local
2024 if (sony_call_snc_handle(bcare_ctl->handle, cmd | 0x0100, &result)) in sony_nc_battery_care_limit_store()
2033 unsigned int result, status; in sony_nc_battery_care_limit_show() local
2035 if (sony_call_snc_handle(bcare_ctl->handle, 0x0000, &result)) in sony_nc_battery_care_limit_show()
2038 status = (result & 0x01) ? ((result & 0x30) >> 0x04) : 0; in sony_nc_battery_care_limit_show()
2146 unsigned int result; in sony_nc_thermal_mode_set() local
2157 if (sony_call_snc_handle(0x0122, mode << 0x10 | 0x0200, &result)) in sony_nc_thermal_mode_set()
2167 unsigned int result; in sony_nc_thermal_mode_get() local
2169 if (sony_call_snc_handle(0x0122, 0x0100, &result)) in sony_nc_thermal_mode_get()
2172 return result & 0xff; in sony_nc_thermal_mode_get()
2319 unsigned int result; in sony_nc_lid_resume_store() local
2348 &result)) in sony_nc_lid_resume_store()
2374 unsigned int result; in sony_nc_lid_resume_setup() local
2377 if (sony_call_snc_handle(handle, 0x0000, &result)) in sony_nc_lid_resume_setup()
2384 lid_ctl->status = result & 0x7; in sony_nc_lid_resume_setup()
2408 result = device_create_file(&pd->dev, &lid_ctl->attrs[i]); in sony_nc_lid_resume_setup()
2409 if (result) in sony_nc_lid_resume_setup()
2422 return result; in sony_nc_lid_resume_setup()
2457 unsigned int result; in __sony_nc_gfx_switch_status_get() local
2461 &result)) in __sony_nc_gfx_switch_status_get()
2469 return result & 0x1 ? SPEED : STAMINA; in __sony_nc_gfx_switch_status_get()
2475 return result & 0x1 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2482 dprintk("GFX Status: 0x%x\n", result); in __sony_nc_gfx_switch_status_get()
2483 return result & 0x80 ? AUTO : in __sony_nc_gfx_switch_status_get()
2484 result & 0x02 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2508 unsigned int result; in sony_nc_gfx_switch_setup() local
2521 result = device_create_file(&pd->dev, &gfxs_ctl->attr); in sony_nc_gfx_switch_setup()
2522 if (result) in sony_nc_gfx_switch_setup()
2531 return result; in sony_nc_gfx_switch_setup()
2551 unsigned int result; in sony_nc_highspeed_charging_store() local
2560 if (sony_call_snc_handle(0x0131, value << 0x10 | 0x0200, &result)) in sony_nc_highspeed_charging_store()
2569 unsigned int result; in sony_nc_highspeed_charging_show() local
2571 if (sony_call_snc_handle(0x0131, 0x0100, &result)) in sony_nc_highspeed_charging_show()
2574 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_highspeed_charging_show()
2579 unsigned int result; in sony_nc_highspeed_charging_setup() local
2581 if (sony_call_snc_handle(0x0131, 0x0000, &result) || !(result & 0x01)) { in sony_nc_highspeed_charging_setup()
2599 result = device_create_file(&pd->dev, hsc_handle); in sony_nc_highspeed_charging_setup()
2600 if (result) { in sony_nc_highspeed_charging_setup()
2603 return result; in sony_nc_highspeed_charging_setup()
2625 unsigned int result; in sony_nc_lowbatt_store() local
2634 if (sony_call_snc_handle(0x0121, value << 8, &result)) in sony_nc_lowbatt_store()
2643 unsigned int result; in sony_nc_lowbatt_show() local
2645 if (sony_call_snc_handle(0x0121, 0x0200, &result)) in sony_nc_lowbatt_show()
2648 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 1); in sony_nc_lowbatt_show()
2653 unsigned int result; in sony_nc_lowbatt_setup() local
2665 result = device_create_file(&pd->dev, lowbatt_handle); in sony_nc_lowbatt_setup()
2666 if (result) { in sony_nc_lowbatt_setup()
2669 return result; in sony_nc_lowbatt_setup()
2691 unsigned int result; in sony_nc_hsfan_store() local
2700 if (sony_call_snc_handle(0x0149, value << 0x10 | 0x0200, &result)) in sony_nc_hsfan_store()
2709 unsigned int result; in sony_nc_hsfan_show() local
2711 if (sony_call_snc_handle(0x0149, 0x0100, &result)) in sony_nc_hsfan_show()
2714 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_hsfan_show()
2720 unsigned int result; in sony_nc_fanspeed_show() local
2722 if (sony_call_snc_handle(0x0149, 0x0300, &result)) in sony_nc_fanspeed_show()
2725 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0xff); in sony_nc_fanspeed_show()
2730 unsigned int result; in sony_nc_fanspeed_setup() local
2738 result = -ENOMEM; in sony_nc_fanspeed_setup()
2754 result = device_create_file(&pd->dev, fan_handle); in sony_nc_fanspeed_setup()
2755 if (result) in sony_nc_fanspeed_setup()
2758 result = device_create_file(&pd->dev, hsf_handle); in sony_nc_fanspeed_setup()
2759 if (result) in sony_nc_fanspeed_setup()
2774 return result; in sony_nc_fanspeed_setup()
2798 unsigned int result; in sony_nc_usb_charge_store() local
2807 if (sony_call_snc_handle(0x0155, value << 0x10 | 0x0100, &result)) in sony_nc_usb_charge_store()
2816 unsigned int result; in sony_nc_usb_charge_show() local
2818 if (sony_call_snc_handle(0x0155, 0x0000, &result)) in sony_nc_usb_charge_show()
2821 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_usb_charge_show()
2826 unsigned int result; in sony_nc_usb_charge_setup() local
2828 if (sony_call_snc_handle(0x0155, 0x0000, &result) || !(result & 0x01)) { in sony_nc_usb_charge_setup()
2846 result = device_create_file(&pd->dev, uc_handle); in sony_nc_usb_charge_setup()
2847 if (result) { in sony_nc_usb_charge_setup()
2850 return result; in sony_nc_usb_charge_setup()
2871 unsigned int result; in sony_nc_panelid_show() local
2873 if (sony_call_snc_handle(0x011D, 0x0000, &result)) in sony_nc_panelid_show()
2876 return snprintf(buffer, PAGE_SIZE, "%d\n", result); in sony_nc_panelid_show()
2881 unsigned int result; in sony_nc_panelid_setup() local
2893 result = device_create_file(&pd->dev, panel_handle); in sony_nc_panelid_setup()
2894 if (result) { in sony_nc_panelid_setup()
2897 return result; in sony_nc_panelid_setup()
2919 unsigned int result; in sony_nc_smart_conn_store() local
2928 if (sony_call_snc_handle(0x0168, value << 0x10, &result)) in sony_nc_smart_conn_store()
2936 unsigned int result; in sony_nc_smart_conn_setup() local
2948 result = device_create_file(&pd->dev, sc_handle); in sony_nc_smart_conn_setup()
2949 if (result) { in sony_nc_smart_conn_setup()
2952 return result; in sony_nc_smart_conn_setup()
2977 unsigned int result; in sony_nc_touchpad_store() local
2990 (!value << 0x10) | 0x100, &result)) in sony_nc_touchpad_store()
2999 unsigned int result; in sony_nc_touchpad_show() local
3001 if (sony_call_snc_handle(tp_ctl->handle, 0x000, &result)) in sony_nc_touchpad_show()
3004 return snprintf(buffer, PAGE_SIZE, "%d\n", !(result & 0x01)); in sony_nc_touchpad_show()
3165 int result = 0; in sony_nc_add() local
3174 result = acpi_bus_get_status(device); in sony_nc_add()
3176 if (!result && !device->status.present) { in sony_nc_add()
3178 result = -ENODEV; in sony_nc_add()
3182 result = sony_pf_add(); in sony_nc_add()
3183 if (result) in sony_nc_add()
3192 result = -ENODEV; in sony_nc_add()
3197 result = sony_laptop_setup_input(device); in sony_nc_add()
3198 if (result) { in sony_nc_add()
3212 result = sony_nc_handles_setup(sony_pf_device); in sony_nc_add()
3213 if (!result) in sony_nc_add()
3249 result = in sony_nc_add()
3252 if (result) in sony_nc_add()
3276 return result; in sony_nc_add()
4425 int result = 0; in sony_pic_possible_resources() local
4434 result = acpi_bus_get_status(device); in sony_pic_possible_resources()
4435 if (result) { in sony_pic_possible_resources()
4453 result = -ENODEV; in sony_pic_possible_resources()
4456 return result; in sony_pic_possible_resources()
4484 int result = 0; in sony_pic_enable() local
4567 result = -ENODEV; in sony_pic_enable()
4578 return result; in sony_pic_enable()
4693 int result; in sony_pic_add() local
4703 result = sony_pic_possible_resources(device); in sony_pic_add()
4704 if (result) { in sony_pic_add()
4710 result = sony_laptop_setup_input(device); in sony_pic_add()
4711 if (result) { in sony_pic_add()
4716 result = sonypi_compat_init(); in sony_pic_add()
4717 if (result) in sony_pic_add()
4755 result = -ENODEV; in sony_pic_add()
4775 result = -ENODEV; in sony_pic_add()
4780 result = sony_pic_enable(device, spic_dev.cur_ioport, spic_dev.cur_irq); in sony_pic_add()
4781 if (result) { in sony_pic_add()
4788 result = sony_pf_add(); in sony_pic_add()
4789 if (result) in sony_pic_add()
4792 result = sysfs_create_group(&sony_pf_device->dev.kobj, &spic_attribute_group); in sony_pic_add()
4793 if (result) in sony_pic_add()
4833 return result; in sony_pic_add()
4891 int result; in sony_laptop_init() local
4894 result = acpi_bus_register_driver(&sony_pic_driver); in sony_laptop_init()
4895 if (result) { in sony_laptop_init()
4902 result = acpi_bus_register_driver(&sony_nc_driver); in sony_laptop_init()
4903 if (result) { in sony_laptop_init()
4914 return result; in sony_laptop_init()