From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934122AbeAXPX4 (ORCPT ); Wed, 24 Jan 2018 10:23:56 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:41302 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933953AbeAXPXx (ORCPT ); Wed, 24 Jan 2018 10:23:53 -0500 X-Google-Smtp-Source: AH8x224FAuW3p3BqZBqiG1DtbYxWCyKvU3J6+VBuANbpEZKSnTWkdi8j10ZiBoqsbvTmreUg32tYjw== Subject: Re: [PATCH v2] i2c: Allow ACPI_I2C_OPREGION if I2C is built as a module To: Sinan Kaya , Andy Shevchenko Cc: Mika Westerberg , Wolfram Sang , Eric Auger , eric.auger.pro@gmail.com, linux-i2c , Linux Kernel Mailing List , "linux-acpi@vger.kernel.org" References: <1514988151-12248-1-git-send-email-eric.auger@redhat.com> <20180124055615.c3qwhwnj7spmcr3w@ninjato> <20180124062725.GK27654@lahna.fi.intel.com> <54ef10bd-6209-6983-1d3a-ddf7d7fea252@redhat.com> From: Hans de Goede Message-ID: <26d6761c-17c9-73d8-42d6-25815b58bc87@redhat.com> Date: Wed, 24 Jan 2018 16:23:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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 Hi, On 24-01-18 16:12, Sinan Kaya wrote: > On 1/24/2018 9:59 AM, Hans de Goede wrote: >> TL;DR: I have to NAK this, I'm sorry but with the current state of ACPI we >> must simply have some stuff builtin to help with probe-ordering issues. Now >> if the ACPI code where ever to honor the _DEP method everywhere instead of >> only for battery devices this might change, but even then things will still >> be tricky. > > Well, the alternative is even worse. No it is not, if I2C gets builtin things work fine, you proposal does not fix anything, it merely gives the illusion of being builtin > Redhat and most other distros configure I2C as a module. Fedora has stopped building I2C as a module a long time ago already and where Fedora goes RHEL typically follows. > With this setup, > I2C OpRegion support does not get compiled. It doesn't even work let alone to have > race conditions. So at least it is consistent then, which makes for a lot easier debugging. > I2C OpRegion feature is practically dead for most general users unless you recompile > your own kernel. Then talk to various distro kernel maintainers and ask them to set CONFIG_I2C=y. > There must be a middle ground somewhere. One thing which comes to mind is to simply not allow building i2c as a module when ACPI is selected, something like this should work I think: config I2C tristate "I2C support" select RT_MUTEXES select IRQ_DOMAIN + # force building I2C in on ACPI systems, for opregion availability + depends on y || !ACPI > I had some conversation with Rafael about _DEP support. He is not a big fan :) Ok. Regards, Hans