From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: Re: [PATCH v3] ACPI: Force I2C to be selected as a built-in module Date: Tue, 6 Feb 2018 09:25:58 -0500 Message-ID: <2902c0aa-b7d4-ea2f-e687-bc5cd19631e1@codeaurora.org> References: <1516895011-17588-1-git-send-email-okaya@codeaurora.org> <30a108bc-c85f-55d9-67c5-586534a987c0@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:39534 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbeBFO0D (ORCPT ); Tue, 6 Feb 2018 09:26:03 -0500 In-Reply-To: <30a108bc-c85f-55d9-67c5-586534a987c0@infradead.org> Content-Language: en-US Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Randy Dunlap , "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Timur Tabi , Eric Auger , Hans de Goede , Mika Westerberg , Wolfram Sang , linux-i2c , "Rafael J. Wysocki" , Len Brown , open list Hi Rafael, On 1/25/2018 12:36 PM, Randy Dunlap wrote: > On 01/25/2018 08:25 AM, Rafael J. Wysocki wrote: >> On Thu, Jan 25, 2018 at 4:43 PM, Sinan Kaya wrote: >>> From: Auger Eric >>> >>> If I2C is built as a module, ACPI_I2C_OPREGION cannot be set >>> and any ACPI opregion calls targeting I2C fail with no opregion found. >>> >>> Commit da3c6647ee08 ("I2C/ACPI: Clean up I2C ACPI code and Add >>> CONFIG_I2C_ACPI config") says following: >>> >>> "Current there is a race between removing I2C ACPI operation region >>> and ACPI AML code accessing." >>> >>> This patch forces core I2C support to be compiled as a built-in >>> module if ACPI is selected as code is not ready for dynamic module >>> removal. >>> >>> Signed-off-by: Eric Auger >>> Signed-off-by: Sinan Kaya >>> --- >>> drivers/acpi/Kconfig | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig >>> index 4650539..5b48098 100644 >>> --- a/drivers/acpi/Kconfig >>> +++ b/drivers/acpi/Kconfig >>> @@ -9,6 +9,8 @@ menuconfig ACPI >>> depends on IA64 || X86 || ARM64 >>> depends on PCI >>> select PNP >>> + # force building I2C in on ACPI systems, for opregion availability >>> + imply I2C >>> default y if (IA64 || X86) >>> help >>> Advanced Configuration and Power Interface (ACPI) support for >>> -- >> >> I'm not sure how much this helps. >> >> I2C opregions will only work if the requisite I2C controller driver is >> present anyway and this change doesn't guarantee that AFAICS. >> >> OTOH, there are systems using ACPI without I2C opregions, so are we >> really better off by forcing everybody using ACPI to also build I2C? > > Definitely not. > Where do we stand on this? Do you have a better suggestion? Sinan -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.