From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756837Ab2IDLhd (ORCPT ); Tue, 4 Sep 2012 07:37:33 -0400 Received: from zoneX.GCU-Squad.org ([194.213.125.0]:7131 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375Ab2IDLhc (ORCPT ); Tue, 4 Sep 2012 07:37:32 -0400 Date: Tue, 4 Sep 2012 13:36:50 +0200 From: Jean Delvare To: Samuel Ortiz Cc: Grant Likely , Linus Walleij , LKML , Peter Tyser , Aaron Sierra Subject: Re: [PATCH] gpio-ich: Share ownership of GPIO groups Message-ID: <20120904133650.2cf50515@endymion.delvare> In-Reply-To: <20120801101646.GG16859@sortiz-mobl> References: <20120723173415.5b80b28b@endymion.delvare> <20120801111359.6839bec7@endymion.delvare> <20120801101646.GG16859@sortiz-mobl> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.7; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sam, On Wed, 1 Aug 2012 12:16:46 +0200, Samuel Ortiz wrote: > Hi Jean, > > On Wed, Aug 01, 2012 at 11:13:59AM +0200, Jean Delvare wrote: > > On Mon, 23 Jul 2012 17:34:15 +0200, Jean Delvare wrote: > > > The ICH chips have their GPIO pins organized in 2 or 3 independent > > > groups of 32 GPIO pins. It can happen that the ACPI BIOS wants to make > > > use of pins in one group, preventing the OS to access these. This does > > > not prevent the OS from accessing the other group(s). > > > > > > This is the case for example on my Asus Z8NA-D6 board. The ACPI BIOS > > > wants to control GPIO 18 (group 1), while I (the OS) need to control > > > GPIO 52 and 53 (group 2) for SMBus multiplexing. > > > > > > So instead of checking for ACPI resource conflict on the whole I/O > > > range, check on a per-group basis, and consider it a success if at > > > least one of the groups is available for the OS to use. > > > > > > Signed-off-by: Jean Delvare > > > Cc: Peter Tyser > > > Cc: Aaron Sierra > > > Cc: Grant Likely > > > Cc: Samuel Ortiz > > > --- > > > That's probably not the nicest code you've seen, but everything else I > > > could think of either couldn't work or was looking worse. If anyone can > > > think of a better approach, I'm all ears. > > > > > > drivers/gpio/gpio-ich.c | 79 +++++++++++++++++++++++++++++++++++++------ > > > drivers/mfd/lpc_ich.c | 29 ++++++++++++++- > > > include/linux/mfd/lpc_ich.h | 1 > > > 3 files changed, 97 insertions(+), 12 deletions(-) > > > > Grant, Samuel, Linus (sorry for not including you on original > > submission), any comment on this? I suppose it's too late for 3.6 but > > can this be scheduled to be integrated in 3.7? > > I was planning to look at this one and queue it for 3.7 as I'll be working on > my for-next branch once rc1 is tagged. > As you said, this is not the nicest code ever, so I may have a few comments. > No time for that right now though. Any news on this? I'd like to get this patch (or an alternative implementation of the same) into kernel 3.7, and its merge window is approaching. Thanks, -- Jean Delvare