Lines Matching refs:pmf_dev
163 struct amd_pmf_dev *pmf_dev = data; in apmf_event_handler() local
167 mutex_lock(&pmf_dev->update_mutex); in apmf_event_handler()
168 ret = apmf_get_sbios_requests(pmf_dev, &req); in apmf_event_handler()
170 dev_err(pmf_dev->dev, "Failed to get SBIOS requests:%d\n", ret); in apmf_event_handler()
175 dev_dbg(pmf_dev->dev, "AMT is supported and notifications %s\n", in apmf_event_handler()
177 pmf_dev->amt_enabled = !!req.amt_event; in apmf_event_handler()
179 if (pmf_dev->amt_enabled) in apmf_event_handler()
180 amd_pmf_handle_amt(pmf_dev); in apmf_event_handler()
182 amd_pmf_reset_amt(pmf_dev); in apmf_event_handler()
186 dev_dbg(pmf_dev->dev, "CQL is supported and notifications %s\n", in apmf_event_handler()
190 if (pmf_dev->amt_enabled) in apmf_event_handler()
191 amd_pmf_update_2_cql(pmf_dev, req.cql_event); in apmf_event_handler()
194 mutex_unlock(&pmf_dev->update_mutex); in apmf_event_handler()
246 int apmf_install_handler(struct amd_pmf_dev *pmf_dev) in apmf_install_handler() argument
248 acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); in apmf_install_handler()
252 if (is_apmf_func_supported(pmf_dev, APMF_FUNC_AUTO_MODE) && in apmf_install_handler()
253 is_apmf_func_supported(pmf_dev, APMF_FUNC_SBIOS_REQUESTS)) { in apmf_install_handler()
255 apmf_event_handler, pmf_dev); in apmf_install_handler()
257 dev_err(pmf_dev->dev, "failed to install notify handler\n"); in apmf_install_handler()
262 apmf_event_handler(ahandle, 0, pmf_dev); in apmf_install_handler()
268 void apmf_acpi_deinit(struct amd_pmf_dev *pmf_dev) in apmf_acpi_deinit() argument
270 acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); in apmf_acpi_deinit()
272 if (pmf_dev->hb_interval) in apmf_acpi_deinit()
273 cancel_delayed_work_sync(&pmf_dev->heart_beat); in apmf_acpi_deinit()
275 if (is_apmf_func_supported(pmf_dev, APMF_FUNC_AUTO_MODE) && in apmf_acpi_deinit()
276 is_apmf_func_supported(pmf_dev, APMF_FUNC_SBIOS_REQUESTS)) in apmf_acpi_deinit()
280 int apmf_acpi_init(struct amd_pmf_dev *pmf_dev) in apmf_acpi_init() argument
284 ret = apmf_if_verify_interface(pmf_dev); in apmf_acpi_init()
286 dev_err(pmf_dev->dev, "APMF verify interface failed :%d\n", ret); in apmf_acpi_init()
290 ret = apmf_get_system_params(pmf_dev); in apmf_acpi_init()
292 dev_err(pmf_dev->dev, "APMF apmf_get_system_params failed :%d\n", ret); in apmf_acpi_init()
296 if (pmf_dev->hb_interval) { in apmf_acpi_init()
298 INIT_DELAYED_WORK(&pmf_dev->heart_beat, apmf_sbios_heartbeat_notify); in apmf_acpi_init()
299 schedule_delayed_work(&pmf_dev->heart_beat, 0); in apmf_acpi_init()