All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: <hdegoede@redhat.com>, <markgross@kernel.org>,
	<ilpo.jarvinen@linux.intel.com>, <basavaraj.natikar@amd.com>,
	<jikos@kernel.org>, <benjamin.tissoires@redhat.com>
Cc: <Patil.Reddy@amd.com>, <mario.limonciello@amd.com>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-input@vger.kernel.org>,
	"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>
Subject: [PATCH v7 05/12] platform/x86/amd/pmf: change amd_pmf_init_features() call sequence
Date: Tue, 12 Dec 2023 07:16:58 +0530	[thread overview]
Message-ID: <20231212014705.2017474-6-Shyam-sundar.S-k@amd.com> (raw)
In-Reply-To: <20231212014705.2017474-1-Shyam-sundar.S-k@amd.com>

To sideload pmf policy binaries, the Smart PC Solution Builder provides a
debugfs file called "update_policy"; that gets created under a new debugfs
directory called "pb" and this new directory has to be associated with
existing parent directory for PMF driver called "amd_pmf".

In the current code structure, amd_pmf_dbgfs_register() is called after
amd_pmf_init_features(). This will not help when the Smart PC builder
feature has to be assoicated to the parent directory.

Hence change the order of amd_pmf_dbgfs_register() and call it before
amd_pmf_init_features() so that when the Smart PC init happens, it has the
parent debugfs directory to get itself hooked.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd/pmf/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index c10d40b33667..feaa09f5b35a 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -431,9 +431,9 @@ static int amd_pmf_probe(struct platform_device *pdev)
 
 	apmf_acpi_init(dev);
 	platform_set_drvdata(pdev, dev);
+	amd_pmf_dbgfs_register(dev);
 	amd_pmf_init_features(dev);
 	apmf_install_handler(dev);
-	amd_pmf_dbgfs_register(dev);
 
 	dev_info(dev->dev, "registered PMF device successfully\n");
 
-- 
2.25.1


  parent reply	other threads:[~2023-12-12  1:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12  1:46 [PATCH v7 00/12] Introduce PMF Smart PC Solution Builder Feature Shyam Sundar S K
2023-12-12  1:46 ` [PATCH v7 01/12] platform/x86/amd/pmf: Add PMF TEE interface Shyam Sundar S K
2023-12-12  1:46 ` [PATCH v7 02/12] platform/x86/amd/pmf: Add support for PMF-TA interaction Shyam Sundar S K
2023-12-12  1:46 ` [PATCH v7 03/12] platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr() Shyam Sundar S K
2023-12-12  1:46 ` [PATCH v7 04/12] platform/x86/amd/pmf: Add support for PMF Policy Binary Shyam Sundar S K
2023-12-12  1:46 ` Shyam Sundar S K [this message]
2023-12-12  1:46 ` [PATCH v7 06/12] platform/x86/amd/pmf: Add support to get inputs from other subsystems Shyam Sundar S K
2023-12-12  1:47 ` [PATCH v7 07/12] platform/x86/amd/pmf: Add support update p3t limit Shyam Sundar S K
2023-12-12  1:47 ` [PATCH v7 08/12] platform/x86/amd/pmf: Add support to update system state Shyam Sundar S K
2023-12-12  1:47 ` [PATCH v7 09/12] platform/x86/amd/pmf: Make source_as_str() as non-static Shyam Sundar S K
2023-12-12  1:47 ` [PATCH v7 10/12] platform/x86/amd/pmf: Add facility to dump TA inputs Shyam Sundar S K
2023-12-12  1:47 ` [PATCH v7 11/12] platform/x86/amd/pmf: Add capability to sideload of policy binary Shyam Sundar S K
2023-12-18 11:58   ` Hans de Goede
2023-12-12  1:47 ` [PATCH v7 12/12] platform/x86/amd/pmf: dump policy binary data Shyam Sundar S K
2023-12-18 12:05 ` [PATCH v7 00/12] Introduce PMF Smart PC Solution Builder Feature Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231212014705.2017474-6-Shyam-sundar.S-k@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=Patil.Reddy@amd.com \
    --cc=basavaraj.natikar@amd.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.