Lines Matching refs:handle

231 static int eval_int(acpi_handle handle, const char *name, unsigned long *res)  in eval_int()  argument
236 status = acpi_evaluate_integer(handle, (char *)name, NULL, &result); in eval_int()
245 static int exec_simple_method(acpi_handle handle, const char *name, unsigned long arg) in exec_simple_method() argument
247 acpi_status status = acpi_execute_simple_method(handle, (char *)name, arg); in exec_simple_method()
252 static int eval_gbmd(acpi_handle handle, unsigned long *res) in eval_gbmd() argument
254 return eval_int(handle, "GBMD", res); in eval_gbmd()
257 static int exec_sbmc(acpi_handle handle, unsigned long arg) in exec_sbmc() argument
259 return exec_simple_method(handle, "SBMC", arg); in exec_sbmc()
262 static int eval_hals(acpi_handle handle, unsigned long *res) in eval_hals() argument
264 return eval_int(handle, "HALS", res); in eval_hals()
267 static int exec_sals(acpi_handle handle, unsigned long arg) in exec_sals() argument
269 return exec_simple_method(handle, "SALS", arg); in exec_sals()
272 static int exec_kblc(acpi_handle handle, unsigned long arg) in exec_kblc() argument
274 return exec_simple_method(handle, "KBLC", arg); in exec_kblc()
277 static int eval_kblc(acpi_handle handle, unsigned long cmd, unsigned long *res) in eval_kblc() argument
279 return eval_int_with_arg(handle, "KBLC", cmd, res); in eval_kblc()
282 static int eval_dytc(acpi_handle handle, unsigned long cmd, unsigned long *res) in eval_dytc() argument
284 return eval_int_with_arg(handle, "DYTC", cmd, res); in eval_dytc()
295 if (!read_ec_data(priv->adev->handle, VPCCMD_R_BL_MAX, &value)) in debugfs_status_show()
297 if (!read_ec_data(priv->adev->handle, VPCCMD_R_BL, &value)) in debugfs_status_show()
299 if (!read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &value)) in debugfs_status_show()
304 if (!read_ec_data(priv->adev->handle, VPCCMD_R_RF, &value)) in debugfs_status_show()
306 if (!read_ec_data(priv->adev->handle, VPCCMD_R_WIFI, &value)) in debugfs_status_show()
308 if (!read_ec_data(priv->adev->handle, VPCCMD_R_BT, &value)) in debugfs_status_show()
310 if (!read_ec_data(priv->adev->handle, VPCCMD_R_3G, &value)) in debugfs_status_show()
315 if (!read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value)) in debugfs_status_show()
317 if (!read_ec_data(priv->adev->handle, VPCCMD_R_CAMERA, &value)) in debugfs_status_show()
322 if (!eval_gbmd(priv->adev->handle, &value)) in debugfs_status_show()
324 if (!eval_hals(priv->adev->handle, &value)) in debugfs_status_show()
413 err = read_ec_data(priv->adev->handle, VPCCMD_R_CAMERA, &result); in camera_power_show()
432 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_CAMERA, state); in camera_power_store()
449 err = eval_gbmd(priv->adev->handle, &result); in conservation_mode_show()
468 err = exec_sbmc(priv->adev->handle, state ? SBMC_CONSERVATION_ON : SBMC_CONSERVATION_OFF); in conservation_mode_store()
485 err = read_ec_data(priv->adev->handle, VPCCMD_R_FAN, &result); in fan_mode_show()
507 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_FAN, state); in fan_mode_store()
524 err = eval_hals(priv->adev->handle, &hals); in fn_lock_show()
543 err = exec_sals(priv->adev->handle, state ? SALS_FNLOCK_ON : SALS_FNLOCK_OFF); in fn_lock_store()
560 err = read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &result); in touchpad_show()
581 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_TOUCHPAD, state); in touchpad_store()
600 err = eval_hals(priv->adev->handle, &hals); in usb_charging_show()
619 err = exec_sals(priv->adev->handle, state ? SALS_USB_CHARGING_ON : SALS_USB_CHARGING_OFF); in usb_charging_store()
767 err = eval_dytc(priv->adev->handle, DYTC_CMD_GET, output); in dytc_cql_command()
777 err = eval_dytc(priv->adev->handle, DYTC_DISABLE_CQL, NULL); in dytc_cql_command()
782 cmd_err = eval_dytc(priv->adev->handle, cmd, output); in dytc_cql_command()
786 err = eval_dytc(priv->adev->handle, DYTC_ENABLE_CQL, NULL); in dytc_cql_command()
812 err = eval_dytc(priv->adev->handle, DYTC_CMD_RESET, NULL); in dytc_profile_set()
887 err = eval_dytc(priv->adev->handle, DYTC_CMD_QUERY, &output); in ideapad_dytc_profile_init()
978 return write_ec_cmd(priv->priv->adev->handle, opcode, !blocked); in ideapad_rfk_set()
991 if (read_ec_data(priv->adev->handle, VPCCMD_R_RF, &hw_blocked)) in ideapad_sync_rfk_state()
1008 write_ec_cmd(priv->adev->handle, ideapad_rfk_data[dev].opcode, 1); in ideapad_register_rfkill()
1023 err = read_ec_data(priv->adev->handle, ideapad_rfk_data[dev].opcode - 1, &rf_enabled); in ideapad_register_rfkill()
1162 if (read_ec_data(priv->adev->handle, VPCCMD_R_NOVO, &long_pressed)) in ideapad_input_novokey()
1175 if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value)) in ideapad_check_special_buttons()
1206 err = read_ec_data(priv->adev->handle, VPCCMD_R_BL, &now); in ideapad_backlight_get_brightness()
1218 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL, in ideapad_backlight_update_status()
1223 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER, in ideapad_backlight_update_status()
1243 err = read_ec_data(priv->adev->handle, VPCCMD_R_BL_MAX, &max); in ideapad_backlight_init()
1247 err = read_ec_data(priv->adev->handle, VPCCMD_R_BL, &now); in ideapad_backlight_init()
1251 err = read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power); in ideapad_backlight_init()
1295 if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power)) in ideapad_backlight_notify_power()
1307 read_ec_data(priv->adev->handle, VPCCMD_R_BL, &now); in ideapad_backlight_notify_brightness()
1326 err = eval_kblc(priv->adev->handle, in ideapad_kbd_bl_brightness_get()
1351 err = eval_hals(priv->adev->handle, &value); in ideapad_kbd_bl_brightness_get()
1378 err = exec_kblc(priv->adev->handle, value); in ideapad_kbd_bl_brightness_set()
1380 err = exec_sals(priv->adev->handle, brightness ? SALS_KBD_BL_ON : SALS_KBD_BL_OFF); in ideapad_kbd_bl_brightness_set()
1473 ret = read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value); in ideapad_sync_touchpad_state()
1501 static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) in ideapad_acpi_notify() argument
1506 if (read_ec_data(handle, VPCCMD_R_VPC1, &vpc1)) in ideapad_acpi_notify()
1509 if (read_ec_data(handle, VPCCMD_R_VPC2, &vpc2)) in ideapad_acpi_notify()
1627 acpi_handle handle = priv->adev->handle; in ideapad_check_features() local
1638 if (!read_ec_data(handle, VPCCMD_R_FAN, &val)) in ideapad_check_features()
1641 if (acpi_has_method(handle, "GBMD") && acpi_has_method(handle, "SBMC")) in ideapad_check_features()
1644 if (acpi_has_method(handle, "DYTC")) in ideapad_check_features()
1647 if (acpi_has_method(handle, "HALS") && acpi_has_method(handle, "SALS")) { in ideapad_check_features()
1648 if (!eval_hals(handle, &val)) { in ideapad_check_features()
1662 if (acpi_has_method(handle, "KBLC")) { in ideapad_check_features()
1663 if (!eval_kblc(priv->adev->handle, KBD_BL_QUERY_TYPE, &val)) { in ideapad_check_features()
1724 !eval_hals(priv->adev->handle, &result)) { in ideapad_wmi_notify()
1727 exec_sals(priv->adev->handle, state ? SALS_FNLOCK_ON : SALS_FNLOCK_OFF); in ideapad_wmi_notify()
1799 if (!adev || eval_int(adev->handle, "_CFG", &cfg)) in ideapad_acpi_add()
1837 write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1); in ideapad_acpi_add()
1860 status = acpi_install_notify_handler(adev->handle, in ideapad_acpi_add()
1875 acpi_remove_notify_handler(priv->adev->handle, in ideapad_acpi_add()
1905 acpi_remove_notify_handler(priv->adev->handle, in ideapad_acpi_remove()