All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" 
	<linux-usb@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v2] usb: core: Add ACPI support for USB interface devices
Date: Tue, 24 Mar 2020 12:45:29 +0100	[thread overview]
Message-ID: <CAJZ5v0gMbpBNu=C+YoNY1jSGFfXkwro=srtxAXc8NmBZV+cP+Q@mail.gmail.com> (raw)
In-Reply-To: <20200324100923.8332-1-andriy.shevchenko@linux.intel.com>

On Tue, Mar 24, 2020 at 11:09 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Currently on ACPI-enabled systems the USB interface device has no link to
> the actual firmware node and thus drivers may not parse additional information
> given in the table. The new feature, proposed here, allows to pass properties
> or other information to the drivers.
>
> The ACPI companion of the device has to be set for USB interface devices
> to achieve above. Use ACPI_COMPANION_SET macro to set this.
>
> Note, OF already does link of_node and this is the same for ACPI case.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
> v2: rewrite commit message to emphasize that it is a new feature (Greg)
>  drivers/usb/core/message.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
> index 5adf489428aa..d5f834f16993 100644
> --- a/drivers/usb/core/message.c
> +++ b/drivers/usb/core/message.c
> @@ -5,6 +5,7 @@
>   * Released under the GPLv2 only.
>   */
>
> +#include <linux/acpi.h>
>  #include <linux/pci.h> /* for scatterlist macros */
>  #include <linux/usb.h>
>  #include <linux/module.h>
> @@ -1941,6 +1942,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
>                         intf->dev.of_node = usb_of_get_interface_node(dev,
>                                         configuration, ifnum);
>                 }
> +               ACPI_COMPANION_SET(&intf->dev, ACPI_COMPANION(&dev->dev));
>                 intf->dev.driver = NULL;
>                 intf->dev.bus = &usb_bus_type;
>                 intf->dev.type = &usb_if_device_type;
> --
> 2.25.1
>

      reply	other threads:[~2020-03-24 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 10:09 [PATCH v2] usb: core: Add ACPI support for USB interface devices Andy Shevchenko
2020-03-24 11:45 ` Rafael J. Wysocki [this message]

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='CAJZ5v0gMbpBNu=C+YoNY1jSGFfXkwro=srtxAXc8NmBZV+cP+Q@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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.