mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Joseph, Jithu" <jithu.joseph@intel.com>
To: Armin Wolf <W_Armin@gmx.de>, <maurice.ma@intel.com>,
	<hdegoede@redhat.com>, <markgross@kernel.org>,
	<ilpo.jarvinen@linux.intel.com>
Cc: <Dell.Client.Kernel@dell.com>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface
Date: Thu, 2 Nov 2023 11:49:29 -0700	[thread overview]
Message-ID: <929f2e54-0778-4376-8cd7-8e1b906924fb@intel.com> (raw)
In-Reply-To: <20231102042959.11816-3-W_Armin@gmx.de>



On 11/1/2023 9:29 PM, Armin Wolf wrote:
> Currently, the driver was still using the deprecated GUID-based
> interface to query/set data blocks. Use the modern bus-based
> interface for this.
> 
> Tested with a custom SSDT from the Intel Slim Bootloader project.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> ---
>  drivers/platform/x86/intel/wmi/sbl-fw-update.c | 13 ++++---------
>  drivers/platform/x86/wmi.c                     |  1 +
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/wmi/sbl-fw-update.c b/drivers/platform/x86/intel/wmi/sbl-fw-update.c
> index 3c86e0108a24..9cf5ed0f8dc2 100644
> --- a/drivers/platform/x86/intel/wmi/sbl-fw-update.c
> +++ b/drivers/platform/x86/intel/wmi/sbl-fw-update.c
> @@ -25,18 +25,13 @@
> 
>  static int get_fwu_request(struct device *dev, u32 *out)
>  {
> -	struct acpi_buffer result = {ACPI_ALLOCATE_BUFFER, NULL};
>  	union acpi_object *obj;
> -	acpi_status status;
> 
> -	status = wmi_query_block(INTEL_WMI_SBL_GUID, 0, &result);
> -	if (ACPI_FAILURE(status)) {
> -		dev_err(dev, "wmi_query_block failed\n");
> +	obj = wmidev_block_query(to_wmi_device(dev), 0);
> +	if (!obj)
>  		return -ENODEV;
> -	}
> 
> -	obj = (union acpi_object *)result.pointer;
> -	if (!obj || obj->type != ACPI_TYPE_INTEGER) {
> +	if (obj->type != ACPI_TYPE_INTEGER) {
>  		dev_warn(dev, "wmi_query_block returned invalid value\n");
>  		kfree(obj);
>  		return -EINVAL;
> @@ -58,7 +53,7 @@ static int set_fwu_request(struct device *dev, u32 in)
>  	input.length = sizeof(u32);
>  	input.pointer = &value;
> 
> -	status = wmi_set_block(INTEL_WMI_SBL_GUID, 0, &input);
> +	status = wmidev_block_set(to_wmi_device(dev), 0, &input);
>  	if (ACPI_FAILURE(status)) {
>  		dev_err(dev, "wmi_set_block failed\n");
>  		return -ENODEV;
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 9d9a050e7086..4c4effc883ae 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -106,6 +106,7 @@ MODULE_DEVICE_TABLE(acpi, wmi_device_ids);
>  static const char * const allow_duplicates[] = {
>  	"05901221-D566-11D1-B2F0-00A0C9062910",	/* wmi-bmof */
>  	"8A42EA14-4F2A-FD45-6422-0087F7A7E608",	/* dell-wmi-ddv */
> +	"44FADEB1-B204-40F2-8581-394BBDC1B651",	/* intel-wmi-sbl-fw-update */
>  	NULL
>  };
> 

sbl driver specific changes looks okay to me
Reviewed-by: Jithu Joseph <jithu.joseph@intel.com>

Jithu

  reply	other threads:[~2023-11-02 18:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  4:29 [PATCH 1/4] platform/x86: wmi: Add wmidev_block_set() Armin Wolf
2023-11-02  4:29 ` [PATCH 2/4] platform/x86: wmi: Add to_wmi_device() helper macro Armin Wolf
2023-11-02  4:29 ` [PATCH 3/4] platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface Armin Wolf
2023-11-02 18:49   ` Joseph, Jithu [this message]
2023-11-02  4:29 ` [PATCH 4/4] platform/x86/intel/wmi: thunderbolt: " Armin Wolf
2023-11-02 13:28   ` Mario Limonciello
2023-11-02 19:08 ` [PATCH 1/4] platform/x86: wmi: Add wmidev_block_set() Joseph, Jithu

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=929f2e54-0778-4376-8cd7-8e1b906924fb@intel.com \
    --to=jithu.joseph@intel.com \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=W_Armin@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=maurice.ma@intel.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

all inboxes | Powered by JetHome®