Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932261AbdDDR72 (ORCPT ); Tue, 4 Apr 2017 13:59:28 -0400 Received: from mga07.intel.com ([134.134.136.100]:37486 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755208AbdDDR70 (ORCPT ); Tue, 4 Apr 2017 13:59:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,275,1486454400"; d="scan'208";a="1130886500" Message-ID: <1491328751.24567.2.camel@linux.intel.com> Subject: Re: [PATCH v1 6/8] gpio: acpi: Explain how to get GPIO descriptors in ACPI case From: Andy Shevchenko To: Dmitry Torokhov , "Rafael J. Wysocki" Cc: Linus Walleij , Alexandre Courbot , linux-gpio@vger.kernel.org, Hans de Goede , linux-kernel@vger.kernel.org, Mika Westerberg , Jarkko Nikula , linux-acpi@vger.kernel.org Date: Tue, 04 Apr 2017 20:59:11 +0300 In-Reply-To: <20170404173108.GC29558@dtor-ws> References: <20170323194618.26548-1-andriy.shevchenko@linux.intel.com> <20170323194618.26548-7-andriy.shevchenko@linux.intel.com> <20170323202838.GA11818@dtor-ws> <1490719163.708.40.camel@linux.intel.com> <20170329071235.GB38261@dtor-ws> <1490799864.708.50.camel@linux.intel.com> <1491322277.708.129.camel@linux.intel.com> <20170404173108.GC29558@dtor-ws> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1669 Lines: 43 On Tue, 2017-04-04 at 10:31 -0700, Dmitry Torokhov wrote: > On Tue, Apr 04, 2017 at 07:11:17PM +0300, Andy Shevchenko wrote: > > On Wed, 2017-03-29 at 18:04 +0300, Andy Shevchenko wrote: > > > On Wed, 2017-03-29 at 00:12 -0700, Dmitry Torokhov wrote: > > > > On Tue, Mar 28, 2017 at 07:39:23PM +0300, Andy Shevchenko wrote: > > > > > On Thu, 2017-03-23 at 13:28 -0700, Dmitry Torokhov wrote: > > > > > > On Thu, Mar 23, 2017 at 09:46:16PM +0200, Andy Shevchenko > > > > > > wrote: > > > Otherwise I'm reading something like this: > > > "If we have platform driverX.c which has DT/platform and ACPI > > > enumeration, we must split ACPI part out, duplicate a lot of code > > > and > > > use platform driver as a library." > > No. You need to split the part that augments incomplete ACPI data, and > move it somewhere (drivers/platform/x86/-crap.c; the driver > stays the same: a driver that is useful across multiple platforms. > > > Is that what you mean? So, it means to spread IDs in two places. Looking into silead_dmi.c I can say it looks as a hack, we aren't supposed to use "ACPIXXXX:YY" in the drivers AFAIK. Besides the fact of notifier and arch_initcall(). It indeed feels like a crap and looks like a crap. Rafael, Mika, what are your opinions about proposed approach? > > > P.S. This all _CRS fallback shouldn't be allowed in the first > > > place. > > It does work in many cases. By disallowing it completely you force > much > more platform stuff knowledge in the kernel, whereas before you needed > to deal with exceptions. It works due to luck, not otherwise. -- Andy Shevchenko Intel Finland Oy