[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a1c95bb-f8a2-f31b-3e45-14718e530dd0@linux.intel.com>
Date: Fri, 1 Sep 2017 09:25:27 +0300
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: intel_cht_int33fe: Work around BIOS bug on
some devices
On 08/31/2017 07:04 PM, Andy Shevchenko wrote:
> On Mon, Aug 14, 2017 at 11:52 PM, Hans de Goede <hdegoede@...hat.com> wrote:
>> On 14-08-17 22:45, Andy Shevchenko wrote:
>>> On Mon, Aug 14, 2017 at 11:14 PM, Hans de Goede <hdegoede@...hat.com>
>>> wrote:
>
>>>> +int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>>>> +{
>>>> + const char *name = dev_name(dev);
>>>> + struct i2c_client **max17047 = data;
>>>> +
>>>> + if (name && strcmp(name, "i2c-MAX17047:00") == 0) {
>>>
>>>
>>> Can we stop using bad practice of comparing against _instance_?
>>> If device is suppose to be single in the system, wouldn't _HID be enough?
>
>> Yes _HID would be enough, but that takes some extra code with little
>> gain IMHO, we are effectively checking the HID here as that is where
>> the device-name comes from.
>>
>> Anyways if you strongly prefer a HID check I can do a v2 doing that
>> either way let me know.
>
> Currently we have the following modules where ACPI instance is used in:
>
> drivers/acpi/acpi_lpss.c
> drivers/input/touchscreen/goodix.c
> drivers/platform/x86/silead_dmi.c
> drivers/power/supply/axp288_charger.c
>
> and plenty under sound/soc/intel.
>
> I do not care right now about sound/soc/intel stuff, while everywhere
> else would be better to avoid this.
>
My 2 cents: sound subsystem needs to match exactly against instance
since we (must) know how each component are wired in HW. For instance
nothing prevents to have multiple audio codec chips with the same HID.
There are couple examples under sound/soc/intel where system have
multiple codecs with the same HID.
(I don't know do we have yet a better way in ACPI to describe audio HW
than matching know instances and tying them together with a code).
--
Jarkko
Powered by blists - more mailing lists