From: Greg KH <gregkh@linuxfoundation.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com,
jorge.lopez2@hp.com, acelan.kao@canonical.com,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/2] usb: linux/usb.h: Move USB port definition to usb.h
Date: Thu, 5 Sep 2024 08:49:53 +0200 [thread overview]
Message-ID: <2024090522-suggest-overpay-9fba@gregkh> (raw)
In-Reply-To: <CAAd53p5tGvTh_zP8BdBu1o0t5=s_uBQuctKQcwCNwyHo6Fx7oQ@mail.gmail.com>
On Thu, Sep 05, 2024 at 02:24:31PM +0800, Kai-Heng Feng wrote:
> On Thu, Sep 5, 2024 at 1:20 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Sep 05, 2024 at 12:24:46PM +0800, Kai-Heng Feng wrote:
> > > Move struct usb_port to linux/usb.h so other subsystems can use it too.
> >
> > These really are "internal to the usb core" functions and variables, I
> > am loath to export them as it requires that you "know" what the device
> > type is of something without any recorse if you get it wrong. I
> > commented on patch 2/2 about that.
> >
> > Could we provide a usb core function for you instead to help out? What
> > exactly are you trying to get access to on the USB bus that you need to
> > use here, the port or the device?
>
> The device so the quirk can check its vendor and product id.
>
> That means a function or helper that can return USB port/device from
> an ACPI path.
So you don't want the port, only the device. Why not just search the
bus for a device, you don't care where in the acpi path it lives, right?
Or better yet, do this in the driver for the device itself, that's when
you know you have the right device.
thanks,
greg k-h
next prev parent reply other threads:[~2024-09-05 6:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 4:24 [PATCH 1/2] usb: linux/usb.h: Move USB port definition to usb.h Kai-Heng Feng
2024-09-05 4:24 ` [PATCH 2/2] platform/x86/hp: Avoid spurious wakeup on HP ProOne 440 Kai-Heng Feng
2024-09-05 5:18 ` Greg KH
2024-09-05 6:21 ` Kai-Heng Feng
2024-09-05 8:56 ` Hans de Goede
2024-09-06 2:28 ` Kai-Heng Feng
2024-09-05 5:19 ` [PATCH 1/2] usb: linux/usb.h: Move USB port definition to usb.h Greg KH
2024-09-05 6:24 ` Kai-Heng Feng
2024-09-05 6:49 ` Greg KH [this message]
2024-09-06 2:20 ` Kai-Heng Feng
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=2024090522-suggest-overpay-9fba@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=acelan.kao@canonical.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jorge.lopez2@hp.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox