From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeAYQxv (ORCPT ); Thu, 25 Jan 2018 11:53:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:33100 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbeAYQxt (ORCPT ); Thu, 25 Jan 2018 11:53:49 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8199B60452 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH v3] ACPI: Force I2C to be selected as a built-in module To: "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 References: <1516895011-17588-1-git-send-email-okaya@codeaurora.org> From: Sinan Kaya Message-ID: <4aee44cd-4eb0-162c-3dcc-fbf6255109ac@codeaurora.org> Date: Thu, 25 Jan 2018 11:53:46 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/25/2018 11:47 AM, Rafael J. Wysocki wrote: > On Thu, Jan 25, 2018 at 5:32 PM, Sinan Kaya wrote: >> On 1/25/2018 11: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 AFAIC> >>> OTOH, there are systems using ACPI without I2C opregions, so are we >>> really better off by forcing everybody using ACPI to also build I2C? >> >> I was trying to find a good balance by choosing imply instead of select. >> >> If an OS chooses to include an I2C driver as a module (most distros do), >> core-i2c functionality becomes a built-in module with ACPI. > > So what would be wrong with allowing ACPI_I2C_OPREGION to be set if > I2C is a module? That was the original patch. Folks are saying that it breaks some systems. Conversation is here: https://patchwork.kernel.org/patch/10142425/ > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- 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.