Lines Matching refs:result

741 	union acpi_object *result = NULL;  in __call_snc_method()  local
766 result = (union acpi_object *) output.pointer; in __call_snc_method()
767 if (!result) in __call_snc_method()
770 return result; in __call_snc_method()
774 int *result) in sony_nc_int_call() argument
793 if (result) in sony_nc_int_call()
794 *result = object->integer.value; in sony_nc_int_call()
853 int i, r, result, arg; in sony_nc_handles_setup() local
862 &result); in sony_nc_handles_setup()
865 result, i); in sony_nc_handles_setup()
866 handles->cap[i] = result; in sony_nc_handles_setup()
917 static int sony_call_snc_handle(int handle, int argument, int *result) in sony_call_snc_handle() argument
926 ret = sony_nc_int_call(sony_nc_acpi_handle, "SN07", &arg, result); in sony_call_snc_handle()
927 dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", arg, *result); in sony_call_snc_handle()
1055 int result; in sony_nc_get_brightness_ng() local
1059 sony_call_snc_handle(sdev->handle, sdev->cmd_base + 0x100, &result); in sony_nc_get_brightness_ng()
1061 return (result & 0xff) - sdev->offset; in sony_nc_get_brightness_ng()
1066 int value, result; in sony_nc_update_status_ng() local
1072 &result)) in sony_nc_update_status_ng()
1164 unsigned int result = 0; in sony_nc_hotkeys_decode() local
1167 if (sony_call_snc_handle(handle, 0x200, &result)) { in sony_nc_hotkeys_decode()
1173 result &= 0xFF; in sony_nc_hotkeys_decode()
1181 if (key_event->data == result) { in sony_nc_hotkeys_decode()
1189 event, result, handle); in sony_nc_hotkeys_decode()
1209 unsigned int result = 0; in sony_nc_notify() local
1247 sony_call_snc_handle(handle, 0x0100, &result); in sony_nc_notify()
1248 real_ev = result & 0x03; in sony_nc_notify()
1259 sony_call_snc_handle(handle, 0x0000, &result); in sony_nc_notify()
1261 (result == 0x1) ? "switch change" : in sony_nc_notify()
1262 (result == 0x2) ? "output switch" : in sony_nc_notify()
1263 (result == 0x3) ? "output switch" : in sony_nc_notify()
1283 sony_nc_int_call(sony_nc_acpi_handle, "SN05", &arg, &result); in sony_nc_notify()
1315 unsigned int i, result, bitmask, arg; in sony_nc_function_setup() local
1334 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_setup()
1338 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_setup()
1343 result = sony_nc_touchpad_setup(pf_device, handle); in sony_nc_function_setup()
1344 if (result) in sony_nc_function_setup()
1346 result); in sony_nc_function_setup()
1351 result = sony_nc_battery_care_setup(pf_device, handle); in sony_nc_function_setup()
1352 if (result) in sony_nc_function_setup()
1354 result); in sony_nc_function_setup()
1358 result = sony_nc_lid_resume_setup(pf_device, handle); in sony_nc_function_setup()
1359 if (result) in sony_nc_function_setup()
1361 result); in sony_nc_function_setup()
1364 result = sony_nc_thermal_setup(pf_device); in sony_nc_function_setup()
1365 if (result) in sony_nc_function_setup()
1367 result); in sony_nc_function_setup()
1372 result = sony_nc_gfx_switch_setup(pf_device, handle); in sony_nc_function_setup()
1373 if (result) in sony_nc_function_setup()
1375 result); in sony_nc_function_setup()
1378 result = sony_nc_highspeed_charging_setup(pf_device); in sony_nc_function_setup()
1379 if (result) in sony_nc_function_setup()
1381 result); in sony_nc_function_setup()
1385 result = sony_nc_rfkill_setup(device, handle); in sony_nc_function_setup()
1386 if (result) in sony_nc_function_setup()
1388 result); in sony_nc_function_setup()
1395 result = sony_nc_kbd_backlight_setup(pf_device, handle); in sony_nc_function_setup()
1396 if (result) in sony_nc_function_setup()
1398 result); in sony_nc_function_setup()
1401 result = sony_nc_lowbatt_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_fanspeed_setup(pf_device); in sony_nc_function_setup()
1408 if (result) in sony_nc_function_setup()
1410 result); in sony_nc_function_setup()
1413 result = sony_nc_usb_charge_setup(pf_device); in sony_nc_function_setup()
1414 if (result) in sony_nc_function_setup()
1416 result); in sony_nc_function_setup()
1419 result = sony_nc_panelid_setup(pf_device); in sony_nc_function_setup()
1420 if (result) in sony_nc_function_setup()
1422 result); in sony_nc_function_setup()
1425 result = sony_nc_smart_conn_setup(pf_device); in sony_nc_function_setup()
1426 if (result) in sony_nc_function_setup()
1428 result); in sony_nc_function_setup()
1439 &result); in sony_nc_function_setup()
1444 unsigned int i, result, bitmask, handle; in sony_nc_function_cleanup() local
1448 sony_nc_int_call(sony_nc_acpi_handle, "SN03", &bitmask, &result); in sony_nc_function_cleanup()
1521 unsigned int i, result, bitmask, arg; in sony_nc_function_resume() local
1536 sony_call_snc_handle(handle, 0, &result); in sony_nc_function_resume()
1540 sony_call_snc_handle(handle, 0x100, &result); in sony_nc_function_resume()
1558 &result); in sony_nc_function_resume()
1607 int result; in sony_nc_rfkill_set() local
1613 return sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_set()
1627 int result; in sony_nc_setup_rfkill() local
1656 if (sony_call_snc_handle(sony_rfkill_handle, 0x200, &result) < 0) { in sony_nc_setup_rfkill()
1660 hwblock = !(result & 0x1); in sony_nc_setup_rfkill()
1664 &result) < 0) { in sony_nc_setup_rfkill()
1668 swblock = !(result & 0x2); in sony_nc_setup_rfkill()
1685 int result; in sony_nc_rfkill_update() local
1688 sony_call_snc_handle(sony_rfkill_handle, 0x200, &result); in sony_nc_rfkill_update()
1689 hwblock = !(result & 0x1); in sony_nc_rfkill_update()
1704 sony_call_snc_handle(sony_rfkill_handle, argument, &result); in sony_nc_rfkill_update()
1706 !(result & 0x2), false); in sony_nc_rfkill_update()
1782 int result; in __sony_nc_kbd_backlight_mode_set() local
1788 (value << 0x10) | (kbdbl_ctl->base), &result)) in __sony_nc_kbd_backlight_mode_set()
1795 &result); in __sony_nc_kbd_backlight_mode_set()
1832 int result; in __sony_nc_kbd_backlight_timeout_set() local
1838 (kbdbl_ctl->base + 0x200), &result)) in __sony_nc_kbd_backlight_timeout_set()
1877 int result; in sony_nc_kbd_backlight_setup() local
1890 &result); in sony_nc_kbd_backlight_setup()
1894 if ((handle == 0x0137 && !(result & 0x02)) || in sony_nc_kbd_backlight_setup()
1895 !(result & 0x01)) { in sony_nc_kbd_backlight_setup()
1966 unsigned int result, cmd; in sony_nc_battery_care_limit_store() local
2013 if (sony_call_snc_handle(bcare_ctl->handle, cmd | 0x0100, &result)) in sony_nc_battery_care_limit_store()
2022 unsigned int result, status; in sony_nc_battery_care_limit_show() local
2024 if (sony_call_snc_handle(bcare_ctl->handle, 0x0000, &result)) in sony_nc_battery_care_limit_show()
2027 status = (result & 0x01) ? ((result & 0x30) >> 0x04) : 0; in sony_nc_battery_care_limit_show()
2135 unsigned int result; in sony_nc_thermal_mode_set() local
2146 if (sony_call_snc_handle(0x0122, mode << 0x10 | 0x0200, &result)) in sony_nc_thermal_mode_set()
2156 unsigned int result; in sony_nc_thermal_mode_get() local
2158 if (sony_call_snc_handle(0x0122, 0x0100, &result)) in sony_nc_thermal_mode_get()
2161 return result & 0xff; in sony_nc_thermal_mode_get()
2303 unsigned int result; in sony_nc_lid_resume_store() local
2332 &result)) in sony_nc_lid_resume_store()
2358 unsigned int result; in sony_nc_lid_resume_setup() local
2361 if (sony_call_snc_handle(handle, 0x0000, &result)) in sony_nc_lid_resume_setup()
2368 lid_ctl->status = result & 0x7; in sony_nc_lid_resume_setup()
2392 result = device_create_file(&pd->dev, &lid_ctl->attrs[i]); in sony_nc_lid_resume_setup()
2393 if (result) in sony_nc_lid_resume_setup()
2406 return result; in sony_nc_lid_resume_setup()
2441 unsigned int result; in __sony_nc_gfx_switch_status_get() local
2445 &result)) in __sony_nc_gfx_switch_status_get()
2453 return result & 0x1 ? SPEED : STAMINA; in __sony_nc_gfx_switch_status_get()
2459 return result & 0x1 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2466 dprintk("GFX Status: 0x%x\n", result); in __sony_nc_gfx_switch_status_get()
2467 return result & 0x80 ? AUTO : in __sony_nc_gfx_switch_status_get()
2468 result & 0x02 ? STAMINA : SPEED; in __sony_nc_gfx_switch_status_get()
2492 unsigned int result; in sony_nc_gfx_switch_setup() local
2505 result = device_create_file(&pd->dev, &gfxs_ctl->attr); in sony_nc_gfx_switch_setup()
2506 if (result) in sony_nc_gfx_switch_setup()
2515 return result; in sony_nc_gfx_switch_setup()
2535 unsigned int result; in sony_nc_highspeed_charging_store() local
2544 if (sony_call_snc_handle(0x0131, value << 0x10 | 0x0200, &result)) in sony_nc_highspeed_charging_store()
2553 unsigned int result; in sony_nc_highspeed_charging_show() local
2555 if (sony_call_snc_handle(0x0131, 0x0100, &result)) in sony_nc_highspeed_charging_show()
2558 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_highspeed_charging_show()
2563 unsigned int result; in sony_nc_highspeed_charging_setup() local
2565 if (sony_call_snc_handle(0x0131, 0x0000, &result) || !(result & 0x01)) { in sony_nc_highspeed_charging_setup()
2583 result = device_create_file(&pd->dev, hsc_handle); in sony_nc_highspeed_charging_setup()
2584 if (result) { in sony_nc_highspeed_charging_setup()
2587 return result; in sony_nc_highspeed_charging_setup()
2609 unsigned int result; in sony_nc_lowbatt_store() local
2618 if (sony_call_snc_handle(0x0121, value << 8, &result)) in sony_nc_lowbatt_store()
2627 unsigned int result; in sony_nc_lowbatt_show() local
2629 if (sony_call_snc_handle(0x0121, 0x0200, &result)) in sony_nc_lowbatt_show()
2632 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 1); in sony_nc_lowbatt_show()
2637 unsigned int result; in sony_nc_lowbatt_setup() local
2649 result = device_create_file(&pd->dev, lowbatt_handle); in sony_nc_lowbatt_setup()
2650 if (result) { in sony_nc_lowbatt_setup()
2653 return result; in sony_nc_lowbatt_setup()
2675 unsigned int result; in sony_nc_hsfan_store() local
2684 if (sony_call_snc_handle(0x0149, value << 0x10 | 0x0200, &result)) in sony_nc_hsfan_store()
2693 unsigned int result; in sony_nc_hsfan_show() local
2695 if (sony_call_snc_handle(0x0149, 0x0100, &result)) in sony_nc_hsfan_show()
2698 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_hsfan_show()
2704 unsigned int result; in sony_nc_fanspeed_show() local
2706 if (sony_call_snc_handle(0x0149, 0x0300, &result)) in sony_nc_fanspeed_show()
2709 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0xff); in sony_nc_fanspeed_show()
2714 unsigned int result; in sony_nc_fanspeed_setup() local
2722 result = -ENOMEM; in sony_nc_fanspeed_setup()
2738 result = device_create_file(&pd->dev, fan_handle); in sony_nc_fanspeed_setup()
2739 if (result) in sony_nc_fanspeed_setup()
2742 result = device_create_file(&pd->dev, hsf_handle); in sony_nc_fanspeed_setup()
2743 if (result) in sony_nc_fanspeed_setup()
2758 return result; in sony_nc_fanspeed_setup()
2782 unsigned int result; in sony_nc_usb_charge_store() local
2791 if (sony_call_snc_handle(0x0155, value << 0x10 | 0x0100, &result)) in sony_nc_usb_charge_store()
2800 unsigned int result; in sony_nc_usb_charge_show() local
2802 if (sony_call_snc_handle(0x0155, 0x0000, &result)) in sony_nc_usb_charge_show()
2805 return snprintf(buffer, PAGE_SIZE, "%d\n", result & 0x01); in sony_nc_usb_charge_show()
2810 unsigned int result; in sony_nc_usb_charge_setup() local
2812 if (sony_call_snc_handle(0x0155, 0x0000, &result) || !(result & 0x01)) { in sony_nc_usb_charge_setup()
2830 result = device_create_file(&pd->dev, uc_handle); in sony_nc_usb_charge_setup()
2831 if (result) { in sony_nc_usb_charge_setup()
2834 return result; in sony_nc_usb_charge_setup()
2855 unsigned int result; in sony_nc_panelid_show() local
2857 if (sony_call_snc_handle(0x011D, 0x0000, &result)) in sony_nc_panelid_show()
2860 return snprintf(buffer, PAGE_SIZE, "%d\n", result); in sony_nc_panelid_show()
2865 unsigned int result; in sony_nc_panelid_setup() local
2877 result = device_create_file(&pd->dev, panel_handle); in sony_nc_panelid_setup()
2878 if (result) { in sony_nc_panelid_setup()
2881 return result; in sony_nc_panelid_setup()
2903 unsigned int result; in sony_nc_smart_conn_store() local
2912 if (sony_call_snc_handle(0x0168, value << 0x10, &result)) in sony_nc_smart_conn_store()
2920 unsigned int result; in sony_nc_smart_conn_setup() local
2932 result = device_create_file(&pd->dev, sc_handle); in sony_nc_smart_conn_setup()
2933 if (result) { in sony_nc_smart_conn_setup()
2936 return result; in sony_nc_smart_conn_setup()
2961 unsigned int result; in sony_nc_touchpad_store() local
2974 (!value << 0x10) | 0x100, &result)) in sony_nc_touchpad_store()
2983 unsigned int result; in sony_nc_touchpad_show() local
2985 if (sony_call_snc_handle(tp_ctl->handle, 0x000, &result)) in sony_nc_touchpad_show()
2988 return snprintf(buffer, PAGE_SIZE, "%d\n", !(result & 0x01)); in sony_nc_touchpad_show()
3149 int result = 0; in sony_nc_add() local
3158 result = acpi_bus_get_status(device); in sony_nc_add()
3160 if (!result && !device->status.present) { in sony_nc_add()
3162 result = -ENODEV; in sony_nc_add()
3166 result = sony_pf_add(); in sony_nc_add()
3167 if (result) in sony_nc_add()
3176 result = -ENODEV; in sony_nc_add()
3181 result = sony_laptop_setup_input(device); in sony_nc_add()
3182 if (result) { in sony_nc_add()
3196 result = sony_nc_handles_setup(sony_pf_device); in sony_nc_add()
3197 if (!result) in sony_nc_add()
3237 result = in sony_nc_add()
3240 if (result) in sony_nc_add()
3264 return result; in sony_nc_add()
4411 int result = 0; in sony_pic_possible_resources() local
4420 result = acpi_bus_get_status(device); in sony_pic_possible_resources()
4421 if (result) { in sony_pic_possible_resources()
4439 result = -ENODEV; in sony_pic_possible_resources()
4442 return result; in sony_pic_possible_resources()
4470 int result = 0; in sony_pic_enable() local
4553 result = -ENODEV; in sony_pic_enable()
4564 return result; in sony_pic_enable()
4679 int result; in sony_pic_add() local
4689 result = sony_pic_possible_resources(device); in sony_pic_add()
4690 if (result) { in sony_pic_add()
4696 result = sony_laptop_setup_input(device); in sony_pic_add()
4697 if (result) { in sony_pic_add()
4702 result = sonypi_compat_init(); in sony_pic_add()
4703 if (result) in sony_pic_add()
4741 result = -ENODEV; in sony_pic_add()
4761 result = -ENODEV; in sony_pic_add()
4766 result = sony_pic_enable(device, spic_dev.cur_ioport, spic_dev.cur_irq); in sony_pic_add()
4767 if (result) { in sony_pic_add()
4774 result = sony_pf_add(); in sony_pic_add()
4775 if (result) in sony_pic_add()
4778 result = sysfs_create_group(&sony_pf_device->dev.kobj, &spic_attribute_group); in sony_pic_add()
4779 if (result) in sony_pic_add()
4819 return result; in sony_pic_add()
4877 int result; in sony_laptop_init() local
4880 result = acpi_bus_register_driver(&sony_pic_driver); in sony_laptop_init()
4881 if (result) { in sony_laptop_init()
4888 result = acpi_bus_register_driver(&sony_nc_driver); in sony_laptop_init()
4889 if (result) { in sony_laptop_init()
4900 return result; in sony_laptop_init()