Lines Matching refs:pmf_dev
326 struct amd_pmf_dev *pmf_dev = data; in apmf_event_handler() local
330 mutex_lock(&pmf_dev->update_mutex); in apmf_event_handler()
331 ret = apmf_get_sbios_requests(pmf_dev, &req); in apmf_event_handler()
333 dev_err(pmf_dev->dev, "Failed to get SBIOS requests:%d\n", ret); in apmf_event_handler()
338 dev_dbg(pmf_dev->dev, "AMT is supported and notifications %s\n", in apmf_event_handler()
340 pmf_dev->amt_enabled = !!req.amt_event; in apmf_event_handler()
342 if (pmf_dev->amt_enabled) in apmf_event_handler()
343 amd_pmf_handle_amt(pmf_dev); in apmf_event_handler()
345 amd_pmf_reset_amt(pmf_dev); in apmf_event_handler()
349 dev_dbg(pmf_dev->dev, "CQL is supported and notifications %s\n", in apmf_event_handler()
353 if (pmf_dev->amt_enabled) in apmf_event_handler()
354 amd_pmf_update_2_cql(pmf_dev, req.cql_event); in apmf_event_handler()
357 mutex_unlock(&pmf_dev->update_mutex); in apmf_event_handler()
414 int apmf_install_handler(struct amd_pmf_dev *pmf_dev) in apmf_install_handler() argument
416 acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); in apmf_install_handler()
420 if (is_apmf_func_supported(pmf_dev, APMF_FUNC_AUTO_MODE) && in apmf_install_handler()
421 is_apmf_func_supported(pmf_dev, APMF_FUNC_SBIOS_REQUESTS)) { in apmf_install_handler()
423 apmf_event_handler, pmf_dev); in apmf_install_handler()
425 dev_err(pmf_dev->dev, "failed to install notify handler\n"); in apmf_install_handler()
430 apmf_event_handler(ahandle, 0, pmf_dev); in apmf_install_handler()
459 int apmf_check_smart_pc(struct amd_pmf_dev *pmf_dev) in apmf_check_smart_pc() argument
461 acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); in apmf_check_smart_pc()
464 status = acpi_walk_resources(ahandle, METHOD_NAME__CRS, apmf_walk_resources, pmf_dev); in apmf_check_smart_pc()
466 dev_dbg(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status); in apmf_check_smart_pc()
481 void apmf_acpi_deinit(struct amd_pmf_dev *pmf_dev) in apmf_acpi_deinit() argument
483 acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); in apmf_acpi_deinit()
485 if (pmf_dev->hb_interval && pmf_dev->pmf_if_version == PMF_IF_V1) in apmf_acpi_deinit()
486 cancel_delayed_work_sync(&pmf_dev->heart_beat); in apmf_acpi_deinit()
488 if (is_apmf_func_supported(pmf_dev, APMF_FUNC_AUTO_MODE) && in apmf_acpi_deinit()
489 is_apmf_func_supported(pmf_dev, APMF_FUNC_SBIOS_REQUESTS)) in apmf_acpi_deinit()
493 int apmf_acpi_init(struct amd_pmf_dev *pmf_dev) in apmf_acpi_init() argument
497 ret = apmf_if_verify_interface(pmf_dev); in apmf_acpi_init()
499 dev_err(pmf_dev->dev, "APMF verify interface failed :%d\n", ret); in apmf_acpi_init()
503 ret = apmf_get_system_params(pmf_dev); in apmf_acpi_init()
505 dev_dbg(pmf_dev->dev, "APMF apmf_get_system_params failed :%d\n", ret); in apmf_acpi_init()
509 if (pmf_dev->hb_interval && pmf_dev->pmf_if_version == PMF_IF_V1) { in apmf_acpi_init()
511 INIT_DELAYED_WORK(&pmf_dev->heart_beat, apmf_sbios_heartbeat_notify); in apmf_acpi_init()
512 schedule_delayed_work(&pmf_dev->heart_beat, 0); in apmf_acpi_init()