get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1288057/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1288057,
    "url": "http://patchwork.ozlabs.org/api/patches/1288057/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200511204146.19176-3-ranjani.sridharan@linux.intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20200511204146.19176-3-ranjani.sridharan@linux.intel.com>",
    "list_archive_url": null,
    "date": "2020-05-11T20:41:45",
    "name": "[2/3] ASoC: SOF: Create client driver for IPC test",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "2a1e7f59099e12d284e8fc347e72208173ada18d",
    "submitter": {
        "id": 78604,
        "url": "http://patchwork.ozlabs.org/api/people/78604/?format=api",
        "name": "Ranjani Sridharan",
        "email": "ranjani.sridharan@linux.intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200511204146.19176-3-ranjani.sridharan@linux.intel.com/mbox/",
    "series": [
        {
            "id": 176214,
            "url": "http://patchwork.ozlabs.org/api/series/176214/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=176214",
            "date": "2020-05-11T20:41:43",
            "name": "Virtual bus usage in the audio driver",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/176214/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1288057/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1288057/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=none (p=none dis=none) header.from=linux.intel.com"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49LXt52c0vz9sPF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 12 May 2020 06:42:05 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A1CB7252CF;\n\tMon, 11 May 2020 20:42:03 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 53ORQRPN-B+c; Mon, 11 May 2020 20:41:58 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id EF46E251E1;\n\tMon, 11 May 2020 20:41:53 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by ash.osuosl.org (Postfix) with ESMTP id 6DFFF1BF968\n for <intel-wired-lan@osuosl.org>; Mon, 11 May 2020 20:41:50 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by hemlock.osuosl.org (Postfix) with ESMTP id 6A72B882F7\n for <intel-wired-lan@osuosl.org>; Mon, 11 May 2020 20:41:50 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id j1Z69sSPRVQp for <intel-wired-lan@osuosl.org>;\n Mon, 11 May 2020 20:41:47 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by hemlock.osuosl.org (Postfix) with ESMTPS id 3B6CA882F3\n for <intel-wired-lan@osuosl.org>; Mon, 11 May 2020 20:41:47 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 May 2020 13:41:46 -0700",
            "from ajgalle-mobl.amr.corp.intel.com (HELO localhost.localdomain)\n ([10.254.179.28])\n by FMSMGA003.fm.intel.com with ESMTP; 11 May 2020 13:41:46 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "IronPort-SDR": [
            "\n f9jSG4M40cQqh/HAkGOtxYqC8kzlu6EAbbNpG+ccjV5DWKL2wCJ2Td5BRzWL7snkG/B6GTrG/x\n qXEZT5A2jsDQ==",
            "\n 0ZWOKtrwYZFLwEMJSJl6InVbDRNTWkNb1FrKlBglMdr6d8NxkdJwsGgrQzzecpWLsnPa5jjjAH\n XGl469zFgaYw=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,381,1583222400\"; d=\"scan'208\";a=\"306281701\"",
        "From": "Ranjani Sridharan <ranjani.sridharan@linux.intel.com>",
        "To": "intel-wired-lan@osuosl.org",
        "Date": "Mon, 11 May 2020 13:41:45 -0700",
        "Message-Id": "<20200511204146.19176-3-ranjani.sridharan@linux.intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200511204146.19176-1-ranjani.sridharan@linux.intel.com>",
        "References": "<20200511204146.19176-1-ranjani.sridharan@linux.intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 2/3] ASoC: SOF: Create client driver for\n IPC test",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "Fred Oh <fred.oh@linux.intel.com>, pierre-louis.bossart@linux.intel.com",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Create an SOF client driver for IPC flood test. This\ndriver is used to set up the debugfs entries and the\nread/write ops for initiating the IPC flood test that\nwould be used to measure the min/max/avg response times\nfor sending IPCs to the DSP.\n\nSigned-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>\nSigned-off-by: Fred Oh <fred.oh@linux.intel.com>\nReviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>\n---\n sound/soc/sof/Kconfig               |  10 +\n sound/soc/sof/Makefile              |   5 +-\n sound/soc/sof/sof-ipc-test-client.c | 325 ++++++++++++++++++++++++++++\n 3 files changed, 339 insertions(+), 1 deletion(-)\n create mode 100644 sound/soc/sof/sof-ipc-test-client.c",
    "diff": "diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig\nindex 609989daf85b..54cebe1fb1ec 100644\n--- a/sound/soc/sof/Kconfig\n+++ b/sound/soc/sof/Kconfig\n@@ -191,6 +191,16 @@ config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST\n \t  Say Y if you want to enable IPC flood test.\n \t  If unsure, select \"N\".\n \n+config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_CLIENT\n+\ttristate \"SOF enable IPC flood test client\"\n+\tdepends on SND_SOC_SOF_CLIENT\n+\thelp\n+\t  This option enables a separate client device for IPC flood test\n+\t  which can be used to flood the DSP with test IPCs and gather stats\n+\t  about response times.\n+\t  Say Y if you want to enable IPC flood test.\n+\t  If unsure, select \"N\".\n+\n config SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT\n \tbool \"SOF retain DSP context on any FW exceptions\"\n \thelp\ndiff --git a/sound/soc/sof/Makefile b/sound/soc/sof/Makefile\nindex 19d996d78468..cb98aee79f9b 100644\n--- a/sound/soc/sof/Makefile\n+++ b/sound/soc/sof/Makefile\n@@ -9,16 +9,19 @@ snd-sof-pci-objs := sof-pci-dev.o\n snd-sof-acpi-objs := sof-acpi-dev.o\n snd-sof-of-objs := sof-of-dev.o\n \n+snd-sof-ipc-test-objs := sof-ipc-test-client.o\n+\n snd-sof-nocodec-objs := nocodec.o\n \n obj-$(CONFIG_SND_SOC_SOF) += snd-sof.o\n obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o\n \n-\n obj-$(CONFIG_SND_SOC_SOF_ACPI) += snd-sof-acpi.o\n obj-$(CONFIG_SND_SOC_SOF_OF) += snd-sof-of.o\n obj-$(CONFIG_SND_SOC_SOF_PCI) += snd-sof-pci.o\n \n+obj-$(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_CLIENT) += snd-sof-ipc-test.o\n+\n obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/\n obj-$(CONFIG_SND_SOC_SOF_IMX_TOPLEVEL) += imx/\n obj-$(CONFIG_SND_SOC_SOF_XTENSA) += xtensa/\ndiff --git a/sound/soc/sof/sof-ipc-test-client.c b/sound/soc/sof/sof-ipc-test-client.c\nnew file mode 100644\nindex 000000000000..548417ebfdf8\n--- /dev/null\n+++ b/sound/soc/sof/sof-ipc-test-client.c\n@@ -0,0 +1,325 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+//\n+// Copyright(c) 2020 Intel Corporation. All rights reserved.\n+//\n+// Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>\n+//\n+\n+#include <linux/completion.h>\n+#include <linux/debugfs.h>\n+#include <linux/ktime.h>\n+#include <linux/mod_devicetable.h>\n+#include <linux/module.h>\n+#include <linux/pm_runtime.h>\n+#include <linux/slab.h>\n+#include <linux/uaccess.h>\n+#include <linux/virtual_bus.h>\n+#include <sound/sof/header.h>\n+#include \"sof-client.h\"\n+\n+#define MAX_IPC_FLOOD_DURATION_MS 1000\n+#define MAX_IPC_FLOOD_COUNT 10000\n+#define IPC_FLOOD_TEST_RESULT_LEN 512\n+#define SOF_IPC_CLIENT_SUSPEND_DELAY_MS 3000\n+\n+struct sof_ipc_client_data {\n+\tstruct dentry *dfs_root;\n+\tchar *buf;\n+};\n+\n+static int sof_debug_ipc_flood_test(struct sof_client_dev *cdev,\n+\t\t\t\t    bool flood_duration_test,\n+\t\t\t\t    unsigned long ipc_duration_ms,\n+\t\t\t\t    unsigned long ipc_count)\n+{\n+\tstruct sof_ipc_client_data *ipc_client_data = cdev->data;\n+\tstruct device *dev = &cdev->vdev.dev;\n+\tstruct sof_ipc_cmd_hdr hdr;\n+\tstruct sof_ipc_reply reply;\n+\tu64 min_response_time = U64_MAX;\n+\tu64 avg_response_time = 0;\n+\tu64 max_response_time = 0;\n+\tktime_t cur = ktime_get();\n+\tktime_t test_end;\n+\tint i = 0;\n+\tint ret = 0;\n+\n+\t/* configure test IPC */\n+\thdr.cmd = SOF_IPC_GLB_TEST_MSG | SOF_IPC_TEST_IPC_FLOOD;\n+\thdr.size = sizeof(hdr);\n+\n+\t/* set test end time for duration flood test */\n+\ttest_end = ktime_get_ns() + ipc_duration_ms * NSEC_PER_MSEC;\n+\n+\t/* send test IPC's */\n+\tfor (i = 0;\n+\t     flood_duration_test ? ktime_to_ns(cur) < test_end : i < ipc_count;\n+\t     i++) {\n+\t\tktime_t start;\n+\t\tu64 ipc_response_time;\n+\n+\t\tstart = ktime_get();\n+\t\tret = sof_client_ipc_tx_message(cdev, hdr.cmd,\n+\t\t\t\t\t\t&hdr, hdr.size, &reply,\n+\t\t\t\t\t\tsizeof(reply));\n+\t\tif (ret < 0)\n+\t\t\tbreak;\n+\t\tcur = ktime_get();\n+\n+\t\t/* compute min and max response times */\n+\t\tipc_response_time = ktime_to_ns(ktime_sub(cur, start));\n+\t\tmin_response_time = min(min_response_time, ipc_response_time);\n+\t\tmax_response_time = max(max_response_time, ipc_response_time);\n+\n+\t\t/* sum up response times */\n+\t\tavg_response_time += ipc_response_time;\n+\t}\n+\n+\tif (ret < 0)\n+\t\tdev_err(dev, \"error: ipc flood test failed at %d iterations\\n\",\n+\t\t\ti);\n+\n+\t/* return if the first IPC fails */\n+\tif (!i)\n+\t\treturn ret;\n+\n+\t/* compute average response time */\n+\tDIV_ROUND_CLOSEST(avg_response_time, i);\n+\n+\t/* clear previous test output */\n+\tmemset(ipc_client_data->buf, 0, IPC_FLOOD_TEST_RESULT_LEN);\n+\n+\tif (flood_duration_test) {\n+\t\tdev_dbg(dev, \"IPC Flood test duration: %lums\\n\",\n+\t\t\tipc_duration_ms);\n+\t\tsnprintf(ipc_client_data->buf, IPC_FLOOD_TEST_RESULT_LEN,\n+\t\t\t \"IPC Flood test duration: %lums\\n\", ipc_duration_ms);\n+\t}\n+\n+\tdev_dbg(dev,\n+\t\t\"IPC Flood count: %d, Avg response time: %lluns\\n\",\n+\t\ti, avg_response_time);\n+\tdev_dbg(dev, \"Max response time: %lluns\\n\",\n+\t\tmax_response_time);\n+\tdev_dbg(dev, \"Min response time: %lluns\\n\",\n+\t\tmin_response_time);\n+\n+\t/* format output string and save test results */\n+\tsnprintf(ipc_client_data->buf + strlen(ipc_client_data->buf),\n+\t\t IPC_FLOOD_TEST_RESULT_LEN - strlen(ipc_client_data->buf),\n+\t\t \"IPC Flood count: %d\\nAvg response time: %lluns\\n\",\n+\t\t i, avg_response_time);\n+\n+\tsnprintf(ipc_client_data->buf + strlen(ipc_client_data->buf),\n+\t\t IPC_FLOOD_TEST_RESULT_LEN - strlen(ipc_client_data->buf),\n+\t\t \"Max response time: %lluns\\nMin response time: %lluns\\n\",\n+\t\t max_response_time, min_response_time);\n+\n+\treturn ret;\n+}\n+\n+static ssize_t sof_ipc_dfsentry_write(struct file *file,\n+\t\t\t\t      const char __user *buffer,\n+\t\t\t\t      size_t count, loff_t *ppos)\n+{\n+\tstruct dentry *dentry = file->f_path.dentry;\n+\tstruct sof_client_dev *cdev = file->private_data;\n+\tstruct device *dev = &cdev->vdev.dev;\n+\tunsigned long ipc_duration_ms = 0;\n+\tbool flood_duration_test;\n+\tunsigned long ipc_count = 0;\n+\tchar *string;\n+\tsize_t size;\n+\tint err;\n+\tint ret;\n+\n+\tstring = kzalloc(count, GFP_KERNEL);\n+\tif (!string)\n+\t\treturn -ENOMEM;\n+\n+\tsize = simple_write_to_buffer(string, count, ppos, buffer, count);\n+\n+\tflood_duration_test = !strcmp(dentry->d_name.name,\n+\t\t\t\t      \"ipc_flood_duration_ms\");\n+\n+\t/* set test completion criterion */\n+\tret = flood_duration_test ? kstrtoul(string, 0, &ipc_duration_ms) :\n+\t\t\tkstrtoul(string, 0, &ipc_count);\n+\tif (ret < 0)\n+\t\tgoto out;\n+\n+\t/* limit max duration/ipc count for flood test */\n+\tif (flood_duration_test) {\n+\t\tif (!ipc_duration_ms) {\n+\t\t\tret = size;\n+\t\t\tgoto out;\n+\t\t}\n+\n+\t\tipc_duration_ms = min_t(unsigned long, ipc_duration_ms,\n+\t\t\t\t      MAX_IPC_FLOOD_DURATION_MS);\n+\t} else {\n+\t\tif (!ipc_count) {\n+\t\t\tret = size;\n+\t\t\tgoto out;\n+\t\t}\n+\n+\t\tipc_count = min_t(unsigned long, ipc_count,\n+\t\t\t\t  MAX_IPC_FLOOD_COUNT);\n+\t}\n+\n+\tret = pm_runtime_get_sync(dev);\n+\tif (ret < 0) {\n+\t\tdev_err_ratelimited(dev,\n+\t\t\t\t    \"error: debugfs write failed to resume %d\\n\",\n+\t\t\t\t    ret);\n+\t\tpm_runtime_put_noidle(dev);\n+\t\tgoto out;\n+\t}\n+\n+\t/* flood test */\n+\tret = sof_debug_ipc_flood_test(cdev, flood_duration_test,\n+\t\t\t\t       ipc_duration_ms, ipc_count);\n+\n+\tpm_runtime_mark_last_busy(dev);\n+\terr = pm_runtime_put_autosuspend(dev);\n+\tif (err < 0)\n+\t\tdev_err_ratelimited(dev,\n+\t\t\t\t    \"error: debugfs write failed to idle %d\\n\",\n+\t\t\t\t    err);\n+\n+\t/* return size if test is successful */\n+\tif (ret >= 0)\n+\t\tret = size;\n+out:\n+\tkfree(string);\n+\treturn ret;\n+}\n+\n+static ssize_t sof_ipc_dfsentry_read(struct file *file, char __user *buffer,\n+\t\t\t\t     size_t count, loff_t *ppos)\n+{\n+\tstruct sof_client_dev *cdev = file->private_data;\n+\tstruct sof_ipc_client_data *ipc_client_data = cdev->data;\n+\tsize_t size_ret;\n+\n+\tif (*ppos)\n+\t\treturn 0;\n+\n+\t/* return results of the last IPC test */\n+\tcount = strlen(ipc_client_data->buf);\n+\tsize_ret = copy_to_user(buffer, ipc_client_data->buf, count);\n+\tif (size_ret)\n+\t\treturn -EFAULT;\n+\n+\t*ppos += count;\n+\treturn count;\n+}\n+\n+static const struct file_operations sof_ipc_dfs_fops = {\n+\t.open = simple_open,\n+\t.read = sof_ipc_dfsentry_read,\n+\t.llseek = default_llseek,\n+\t.write = sof_ipc_dfsentry_write,\n+};\n+\n+static int sof_ipc_test_probe(struct virtbus_device *vdev)\n+{\n+\tstruct sof_client_dev *cdev = virtbus_dev_to_sof_client_dev(vdev);\n+\tstruct sof_ipc_client_data *ipc_client_data;\n+\n+\t/*\n+\t * The virtbus device has a usage count of 0 even before runtime PM\n+\t * is enabled. So, increment the usage count to let the device\n+\t * suspend after probe is complete.\n+\t */\n+\tpm_runtime_get_noresume(&vdev->dev);\n+\n+\t/* allocate memory for client data */\n+\tipc_client_data = devm_kzalloc(&vdev->dev, sizeof(*ipc_client_data),\n+\t\t\t\t       GFP_KERNEL);\n+\tif (!ipc_client_data)\n+\t\treturn -ENOMEM;\n+\n+\tipc_client_data->buf = devm_kzalloc(&vdev->dev,\n+\t\t\t\t\t    IPC_FLOOD_TEST_RESULT_LEN,\n+\t\t\t\t\t    GFP_KERNEL);\n+\tif (!ipc_client_data->buf)\n+\t\treturn -ENOMEM;\n+\n+\tcdev->data = ipc_client_data;\n+\n+\t/* create debugfs root folder with device name under parent SOF dir */\n+\tipc_client_data->dfs_root =\n+\t\tdebugfs_create_dir(dev_name(&vdev->dev),\n+\t\t\t\t   sof_client_get_debugfs_root(cdev));\n+\n+\t/* create read-write ipc_flood_count debugfs entry */\n+\tdebugfs_create_file(\"ipc_flood_count\", 0644, ipc_client_data->dfs_root,\n+\t\t\t    cdev, &sof_ipc_dfs_fops);\n+\n+\t/* create read-write ipc_flood_duration_ms debugfs entry */\n+\tdebugfs_create_file(\"ipc_flood_duration_ms\", 0644,\n+\t\t\t    ipc_client_data->dfs_root,\n+\t\t\t    cdev, &sof_ipc_dfs_fops);\n+\n+\t/* enable runtime PM */\n+\tpm_runtime_set_autosuspend_delay(&vdev->dev,\n+\t\t\t\t\t SOF_IPC_CLIENT_SUSPEND_DELAY_MS);\n+\tpm_runtime_use_autosuspend(&vdev->dev);\n+\tpm_runtime_set_active(&vdev->dev);\n+\tpm_runtime_enable(&vdev->dev);\n+\tpm_runtime_mark_last_busy(&vdev->dev);\n+\tpm_runtime_put_autosuspend(&vdev->dev);\n+\n+\t/* complete client device registration */\n+\tcomplete(&cdev->probe_complete);\n+\n+\treturn 0;\n+}\n+\n+static int sof_ipc_test_cleanup(struct virtbus_device *vdev)\n+{\n+\tstruct sof_client_dev *cdev = virtbus_dev_to_sof_client_dev(vdev);\n+\tstruct sof_ipc_client_data *ipc_client_data = cdev->data;\n+\n+\tpm_runtime_disable(&vdev->dev);\n+\tdebugfs_remove_recursive(ipc_client_data->dfs_root);\n+\n+\treturn 0;\n+}\n+\n+static int sof_ipc_test_remove(struct virtbus_device *vdev)\n+{\n+\treturn sof_ipc_test_cleanup(vdev);\n+}\n+\n+static void sof_ipc_test_shutdown(struct virtbus_device *vdev)\n+{\n+\tsof_ipc_test_cleanup(vdev);\n+}\n+\n+static const struct virtbus_dev_id sof_ipc_virtbus_id_table[] = {\n+\t{\"sof-ipc-test\"},\n+\t{},\n+};\n+\n+static struct sof_client_drv sof_ipc_test_client_drv = {\n+\t.name = \"sof-ipc-test-client-drv\",\n+\t.type = SOF_CLIENT_IPC,\n+\t.virtbus_drv = {\n+\t\t.driver = {\n+\t\t\t.name = \"sof-ipc-test-virtbus-drv\",\n+\t\t},\n+\t\t.id_table = sof_ipc_virtbus_id_table,\n+\t\t.probe = sof_ipc_test_probe,\n+\t\t.remove = sof_ipc_test_remove,\n+\t\t.shutdown = sof_ipc_test_shutdown,\n+\t},\n+};\n+\n+module_sof_client_driver(sof_ipc_test_client_drv);\n+\n+MODULE_DESCRIPTION(\"SOF IPC Test Client Driver\");\n+MODULE_LICENSE(\"GPL v2\");\n+MODULE_IMPORT_NS(SND_SOC_SOF_CLIENT);\n+MODULE_ALIAS(\"virtbus:sof-ipc-test\");\n",
    "prefixes": [
        "2/3"
    ]
}