From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com,
mario.limonciello@amd.com
Subject: Re: [PATCH v1 1/2] platform/x86/amd/pmf: Use existing input event codes to update system states
Date: Wed, 10 Jul 2024 14:06:44 +0300 (EEST) [thread overview]
Message-ID: <1af52145-bc2c-4406-9564-dccd3da3664d@linux.intel.com> (raw)
In-Reply-To: <20240702080626.2902171-1-Shyam-sundar.S-k@amd.com>
On Tue, 2 Jul 2024, Shyam Sundar S K wrote:
> At present, the PMF driver employs custom system state codes to update
> system states. It is recommended to replace these with existing input
> event codes (KEY_SLEEP, KEY_SUSPEND, and KEY_SCREENLOCK) to align system
> updates with the PMF-TA output actions.
>
> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
> @@ -475,6 +506,10 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
> if (pb_side_load)
> amd_pmf_open_pb(dev, dev->dbgfs_dir);
>
> + ret = amd_pmf_register_input_device(dev);
> + if (ret)
> + goto error;
> +
> return 0;
>
> error:
> @@ -488,6 +523,9 @@ void amd_pmf_deinit_smart_pc(struct amd_pmf_dev *dev)
> if (pb_side_load && dev->esbin)
> amd_pmf_remove_pb(dev);
>
> + if (dev->pmf_idev)
> + input_unregister_device(dev->pmf_idev);
> +
Why is the ordering in the init and deinit asymmetric? Is that
intentional?
--
i.
> cancel_delayed_work_sync(&dev->pb_work);
> kfree(dev->prev_data);
> dev->prev_data = NULL;
next prev parent reply other threads:[~2024-07-10 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 8:06 [PATCH v1 1/2] platform/x86/amd/pmf: Use existing input event codes to update system states Shyam Sundar S K
2024-07-02 8:06 ` [PATCH v1 2/2] platform/x86/amd/pmf: Remove update system state document Shyam Sundar S K
2024-07-02 13:14 ` Mario Limonciello
2024-07-02 13:14 ` [PATCH v1 1/2] platform/x86/amd/pmf: Use existing input event codes to update system states Mario Limonciello
2024-07-06 13:09 ` Ilpo Järvinen
2024-07-06 14:28 ` Shyam Sundar S K
2024-07-10 8:43 ` Hans de Goede
2024-07-10 11:03 ` Ilpo Järvinen
2024-07-10 11:06 ` Ilpo Järvinen [this message]
2024-07-11 5:06 ` Shyam Sundar S K
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=1af52145-bc2c-4406-9564-dccd3da3664d@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.com \
--cc=mario.limonciello@amd.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox