Lines Matching refs:pfrt_log_dev

80 				  struct pfrt_log_device *pfrt_log_dev)  in get_pfrt_log_data_info()  argument
82 acpi_handle handle = ACPI_HANDLE(pfrt_log_dev->parent_dev); in get_pfrt_log_data_info()
93 in_buf.integer.value = pfrt_log_dev->info.log_type; in get_pfrt_log_data_info()
96 pfrt_log_dev->info.log_revid, PFRT_FUNC_GET_DATA, in get_pfrt_log_data_info()
119 dev_dbg(pfrt_log_dev->parent_dev, "Error Status:%d\n", data_info->status); in get_pfrt_log_data_info()
120 dev_dbg(pfrt_log_dev->parent_dev, "Error Extend Status:%d\n", in get_pfrt_log_data_info()
152 static int set_pfrt_log_level(int level, struct pfrt_log_device *pfrt_log_dev) in set_pfrt_log_level() argument
154 acpi_handle handle = ACPI_HANDLE(pfrt_log_dev->parent_dev); in set_pfrt_log_level()
168 pfrt_log_dev->info.log_revid, PFRT_FUNC_SET_LEV, in set_pfrt_log_level()
178 dev_dbg(pfrt_log_dev->parent_dev, "Error Status:%d\n", status); in set_pfrt_log_level()
179 dev_dbg(pfrt_log_dev->parent_dev, "Error Extend Status:%d\n", ext_status); in set_pfrt_log_level()
188 static int get_pfrt_log_level(struct pfrt_log_device *pfrt_log_dev) in get_pfrt_log_level() argument
190 acpi_handle handle = ACPI_HANDLE(pfrt_log_dev->parent_dev); in get_pfrt_log_level()
196 pfrt_log_dev->info.log_revid, PFRT_FUNC_GET_LEV, in get_pfrt_log_level()
209 dev_dbg(pfrt_log_dev->parent_dev, "Error Status:%d\n", status); in get_pfrt_log_level()
210 dev_dbg(pfrt_log_dev->parent_dev, "Error Extend Status:%d\n", ext_status); in get_pfrt_log_level()
244 struct pfrt_log_device *pfrt_log_dev = to_pfrt_log_dev(file); in pfrt_log_ioctl() local
258 pfrt_log_dev->info.log_revid = info.log_revid; in pfrt_log_ioctl()
261 ret = set_pfrt_log_level(info.log_level, pfrt_log_dev); in pfrt_log_ioctl()
265 pfrt_log_dev->info.log_level = info.log_level; in pfrt_log_ioctl()
269 pfrt_log_dev->info.log_type = info.log_type; in pfrt_log_ioctl()
274 info.log_level = get_pfrt_log_level(pfrt_log_dev); in pfrt_log_ioctl()
278 info.log_type = pfrt_log_dev->info.log_type; in pfrt_log_ioctl()
279 info.log_revid = pfrt_log_dev->info.log_revid; in pfrt_log_ioctl()
286 ret = get_pfrt_log_data_info(&data_info, pfrt_log_dev); in pfrt_log_ioctl()
303 struct pfrt_log_device *pfrt_log_dev; in pfrt_log_mmap() local
315 pfrt_log_dev = to_pfrt_log_dev(file); in pfrt_log_mmap()
317 ret = get_pfrt_log_data_info(&info, pfrt_log_dev); in pfrt_log_mmap()
352 struct pfrt_log_device *pfrt_log_dev = platform_get_drvdata(pdev); in acpi_pfrt_log_remove() local
354 misc_deregister(&pfrt_log_dev->miscdev); in acpi_pfrt_log_remove()
361 struct pfrt_log_device *pfrt_log_dev = data; in pfrt_log_put_idx() local
363 ida_free(&pfrt_log_ida, pfrt_log_dev->index); in pfrt_log_put_idx()
369 struct pfrt_log_device *pfrt_log_dev; in acpi_pfrt_log_probe() local
377 pfrt_log_dev = devm_kzalloc(&pdev->dev, sizeof(*pfrt_log_dev), GFP_KERNEL); in acpi_pfrt_log_probe()
378 if (!pfrt_log_dev) in acpi_pfrt_log_probe()
385 pfrt_log_dev->index = ret; in acpi_pfrt_log_probe()
386 ret = devm_add_action_or_reset(&pdev->dev, pfrt_log_put_idx, pfrt_log_dev); in acpi_pfrt_log_probe()
390 pfrt_log_dev->info.log_revid = PFRT_DEFAULT_REV_ID; in acpi_pfrt_log_probe()
391 pfrt_log_dev->parent_dev = &pdev->dev; in acpi_pfrt_log_probe()
393 pfrt_log_dev->miscdev.minor = MISC_DYNAMIC_MINOR; in acpi_pfrt_log_probe()
394 pfrt_log_dev->miscdev.name = devm_kasprintf(&pdev->dev, GFP_KERNEL, in acpi_pfrt_log_probe()
396 pfrt_log_dev->index); in acpi_pfrt_log_probe()
397 if (!pfrt_log_dev->miscdev.name) in acpi_pfrt_log_probe()
400 pfrt_log_dev->miscdev.nodename = devm_kasprintf(&pdev->dev, GFP_KERNEL, in acpi_pfrt_log_probe()
402 pfrt_log_dev->index); in acpi_pfrt_log_probe()
403 if (!pfrt_log_dev->miscdev.nodename) in acpi_pfrt_log_probe()
406 pfrt_log_dev->miscdev.fops = &acpi_pfrt_log_fops; in acpi_pfrt_log_probe()
407 pfrt_log_dev->miscdev.parent = &pdev->dev; in acpi_pfrt_log_probe()
409 ret = misc_register(&pfrt_log_dev->miscdev); in acpi_pfrt_log_probe()
413 platform_set_drvdata(pdev, pfrt_log_dev); in acpi_pfrt_log_probe()