mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>,
	"Wu, Wentong" <wentong.wu@intel.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"oneukum@suse.com" <oneukum@suse.com>,
	"wsa@kernel.org" <wsa@kernel.org>,
	"andi.shyti@linux.intel.com" <andi.shyti@linux.intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"bartosz.golaszewski@linaro.org" <bartosz.golaszewski@linaro.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>,
	"Wang, Zhifeng" <zhifeng.wang@intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v20 1/4] usb: Add support for Intel LJCA device
Date: Mon, 16 Oct 2023 19:20:17 +0200	[thread overview]
Message-ID: <5747b78e-1956-8249-8f5e-85426b3efd01@redhat.com> (raw)
In-Reply-To: <ZS1fSPhfREVlELLD@smile.fi.intel.com>

Hi,

On 10/16/23 18:05, Shevchenko, Andriy wrote:
> On Mon, Oct 16, 2023 at 06:44:21PM +0300, Wu, Wentong wrote:
>>> From: gregkh@linuxfoundation.org
>>> On Mon, Oct 16, 2023 at 03:05:09PM +0000, Wu, Wentong wrote:
>>>>> From: Shevchenko, Andriy
>>>>> On Mon, Oct 16, 2023 at 08:52:28AM +0300, Wu, Wentong wrote:
> 
> ...
> 
>>>>> But this does not confirm if you have such devices. Moreover, My
>>>>> question about _CID per function stays the same. Why firmware is not using
>>> it?
>>>>
>>>> Yes, both _ADR and _CID can stop growing list in the driver. And for
>>>> _ADR, it also only require one ID per function. I don't know why BIOS
>>>> team doesn't select _CID, but I have suggested use _ADR internally,
>>>> and , to make things moving forward, the driver adds support for _ADR here
>>> first.
>>>>
>>>> But you're right, _CID is another solution as well, we will discuss it
>>>> with firmware team more.
>>>
>>> Should I revert this series now until this gets sorted out?
>>
>> Current _ADR support is a solution, I don't think _CID is better than _ADR to both
>> stop growing list in driver and support the shipped hardware at the same time.
>>
>> Andy, what's your idea? 
> 
> In my opinion if _CID can be made, it's better than _ADR. As using _ADR like
> you do is a bit of grey area in the ACPI specification. I.o.w. can you get
> a confirmation, let's say, from Microsoft, that they will go your way for other
> similar devices?
> 
> Btw, Microsoft has their own solution actually using _ADR for the so called
> "wired" USB devices. Is it your case? If so, I'm not sure why _HID has been
> used from day 1...
> 
> Also I suggest to wait for Hans' opinion on the topic.

I definitely don't think we should revert the entire series since this
supports actual hw which has already been shipping for years.

But if the _ADR support is only there to support future hw and
it is not even certain yet that that future hw is actually going
to be using _ADR support then I believe that a follow-up patch
to drop _ADR support for now is in order. We can then re-introduce
it (revert the follow up patch) if future hw actually starts
using _ADR support.

Specifically what I'm suggesting is something like the following:

diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
index c9decd0396d4..e1bbaf964786 100644
--- a/drivers/usb/misc/usb-ljca.c
+++ b/drivers/usb/misc/usb-ljca.c
@@ -457,8 +457,8 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 				  u64 adr, u8 id)
 {
 	struct ljca_match_ids_walk_data wd = { 0 };
-	struct acpi_device *parent, *adev;
 	struct device *dev = adap->dev;
+	struct acpi_device *parent;
 	char uid[4];
 
 	parent = ACPI_COMPANION(dev);
@@ -466,17 +466,7 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 		return;
 
 	/*
-	 * get auxdev ACPI handle from the ACPI device directly
-	 * under the parent that matches _ADR.
-	 */
-	adev = acpi_find_child_device(parent, adr, false);
-	if (adev) {
-		ACPI_COMPANION_SET(&auxdev->dev, adev);
-		return;
-	}
-
-	/*
-	 * _ADR is a grey area in the ACPI specification, some
+	 * Currently LJCA hw does not use _ADR instead current
 	 * platforms use _HID to distinguish children devices.
 	 */
 	switch (adr) {

As a follow-up patch to the existing series.

Regards,

Hans



  reply	other threads:[~2023-10-16 17:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  6:33 [PATCH v20 0/4] Add Intel LJCA device driver Wentong Wu
2023-10-09  6:33 ` [PATCH v20 1/4] usb: Add support for Intel LJCA device Wentong Wu
2023-10-09 10:22   ` Oliver Neukum
2023-10-11 10:21   ` Andy Shevchenko
2023-10-11 10:37     ` Hans de Goede
2023-10-11 10:43       ` Andy Shevchenko
2023-10-11 12:50       ` Wu, Wentong
2023-10-12 11:14         ` Hans de Goede
2023-10-13 20:05           ` Shevchenko, Andriy
2023-10-14 10:58             ` Hans de Goede
2023-10-16  5:52               ` Wu, Wentong
2023-10-16  7:35                 ` Hans de Goede
2023-10-16  7:38                 ` Shevchenko, Andriy
2023-10-16 15:05                   ` Wu, Wentong
2023-10-16 15:19                     ` gregkh
2023-10-16 15:44                       ` Wu, Wentong
2023-10-16 16:05                         ` Shevchenko, Andriy
2023-10-16 17:20                           ` Hans de Goede [this message]
2023-10-17  0:46                             ` Wu, Wentong
2023-10-09  6:33 ` [PATCH v20 2/4] i2c: Add support for Intel LJCA USB I2C driver Wentong Wu
2023-10-10 19:25   ` Wolfram Sang
2023-10-09  6:33 ` [PATCH v20 3/4] spi: Add support for Intel LJCA USB SPI driver Wentong Wu
2023-10-09 12:50   ` Mark Brown
2023-10-09  6:33 ` [PATCH v20 4/4] gpio: update Intel LJCA USB GPIO driver Wentong Wu

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=5747b78e-1956-8249-8f5e-85426b3efd01@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=wentong.wu@intel.com \
    --cc=wsa@kernel.org \
    --cc=zhifeng.wang@intel.com \
    /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®