Lines Matching defs:handle

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