Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755849AbaJXKIj (ORCPT ); Fri, 24 Oct 2014 06:08:39 -0400 Received: from mga02.intel.com ([134.134.136.20]:57810 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbaJXKIg (ORCPT ); Fri, 24 Oct 2014 06:08:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,779,1406617200"; d="scan'208";a="624550347" Message-ID: <544A2521.3080308@linux.intel.com> Date: Fri, 24 Oct 2014 13:08:33 +0300 From: Jarkko Nikula User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.1.2 MIME-Version: 1.0 To: Mika Westerberg , "Rafael J. Wysocki" CC: Lee Jones , Darren Hart , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ACPI: Use ACPI companion to match only the first physical device References: <1414141950-228930-1-git-send-email-mika.westerberg@linux.intel.com> In-Reply-To: <1414141950-228930-1-git-send-email-mika.westerberg@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2014 12:12 PM, Mika Westerberg wrote: > Commit 6ab3430129e2 ("mfd: Add ACPI support") made the MFD subdevices to > share the parent MFD ACPI companion device if no _HID/_CID is specified for > the subdevice in mfd_cell description. However, since all the subdevices > share the ACPI companion, the match and modalias generation logic started > to use the ACPI companion as well resulting this: > > # cat /sys/bus/platform/devices/HID-SENSOR-200041.6.auto/modalias > acpi:INT33D1:PNP0C50: > > instead of the expected one > > # cat /sys/bus/platform/devices/HID-SENSOR-200041.6.auto/modalias > platform:HID-SENSOR-200041 > > In other words the subdevice modalias is overwritten by the one taken from > ACPI companion. This causes udev not to load the driver anymore. > > It is useful to be able to share the ACPI companion so that MFD subdevices > (and possibly other devices as well) can access the ACPI resources even if > they do not have ACPI representation in the namespace themselves. > > An example where this is used is Minnowboard LPC driver that creates GPIO > as a subdevice among other things. Without the ACPI companion gpiolib is > not is not able to lookup the corresponding GPIO controller from ACPI > GpioIo resource. > > To fix this we restrict the match and modalias logic to be limited to the > first physical device. The secondary devices will still be able to access > the ACPI companion but they will be matched using traditional way. > > Reported-by: Jarkko Nikula > Signed-off-by: Mika Westerberg > --- > Hi, > > This is a regression in v3.18-rc1+ and prevents udev from loading the > modules in question. Alternative to this we can revert 6ab3430129e2 but > then Minnowboard GPIOs do not work anymore. > > drivers/acpi/scan.c | 71 +++++++++++++++++++++++++++++++++++++++++------------ > 1 file changed, 55 insertions(+), 16 deletions(-) > Tested-by: Jarkko Nikula -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/