From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753351AbbJOP7O (ORCPT ); Thu, 15 Oct 2015 11:59:14 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:50888 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbbJOP7N (ORCPT ); Thu, 15 Oct 2015 11:59:13 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Thierry Reding , arm@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: tegra: Comment out gpio-ranges properties Date: Thu, 15 Oct 2015 17:59:08 +0200 Message-ID: <5210588.IYgZy3yWn7@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1444405907-17996-1-git-send-email-thierry.reding@gmail.com> References: <1444405907-17996-1-git-send-email-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:a7YBdZE/xFc8gIKkCmgufMzcnJzSExW62ZPIxJxL4fBmXDBZR+p hA4cqVBShdlkmUzPDSir9Jba7x2Az051p5DEfY4fBEekRZO7qHNCqrrgLHhBb/hrwpNhKUM 1DNTi4sudzcOYMsb5ThL7TSL9e3/2MZ3Fd8FU7/PFPkTqoNPztQk9vklsqyrRhqKOKFOAJs zz2pEy+BdKIppysxiwwTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:0revB9s5bvk=:r69bw+f4W7HifQ3JGVFupi JhTLsf8s8IeWec8/y61anM6LjcFCD/c4O7bgkBjbu9v/G747VTXuSS+2txckTtdMGL11s70Zp m1JpbxLkkHrYRwCnsLFOJVIcBifBI72gCfLOt7xa3aY1zWf4bd4PDSUizZ2TXEmV53EtgXwpt g5aMmAoKbyTxZgfu9sBMpd0qYy2aTP4qk+KJTLXO++TTEtP1deRnDZD9zjZsBsshnefb1WDME bqcKqxZZSQBw+yb8Pj7Nao/oAyWaO2p4ZS64Xacfzndt2k6VoQtdpU50Mf/KRYTi7kprbnfTA TR05ap7RWBAhqifB0mnDAVaVaQB7SICUTg4r6pw0qQ8uHYzivCS9SBgzc3fzjvjcOWZCvxPnF 0J8IXIyJmtkpDO4Iqr6ltvb9wowXWjpAjdRlIpDg6cK+6Rel7MIswvOZYzeD2Hz4WVpGeN+i0 gVUZG9OU7T44JNYhv090XvJe+XBHWdxNc2/YExzbIBMUgvLb8HibroR6GROUNwMMbzLn56VU/ ugt33/TIHxXkMQ2Q4rgyyIsZJ42fFQlyutSOb3XTgjfpYFlAyPdDrRB5T8nvykAJrKYwjdyBV hyHOWQZ9F/clSjT2tiRE8reh/pMYBLHJ+N/JgC+B1Jujbhry7DRV085x6I/lwC+fKOcb5Gh4u X1fpjiCPu2QPKMkM9QeL4/tKQ70LhIFgHs1LvAkD4Bja2MMnDdIKVPs0QfEfo+TS54E7HypcI fJXji4ingilv2uOl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 09 October 2015 17:51:47 Thierry Reding wrote: > From: Thierry Reding > > While the addition of these properties is technically correct it unveils > a bug with deferred probe. The problem is that the presence of the gpio- > range property causes the gpio-tegra driver to defer probe (it needs the > pinctrl driver to be ready). That's technically correct, but it causes a > couple of issues: > > - The keyboard on Chromebooks stops working. The reason for that is > that the gpio-tegra device has not registered an IRQ domain by the > time the EC SPI device is registered, hence the interrupt number > resolves to 0. This is technically a bug in the SPI core, since it > should really resolve the interrupt at probe time and defer if the > IRQ domain isn't available yet. This is similar to what's done for > I2C and platform device already. > > - The gpio-tegra device deferring probe means that it is moved to the > end of the dpm_list. This list defines the suspend/resume order for > devices. However the core lacks a way to move all users of the > gpio-tegra device to the end of the dpm_list at the same time. This > in turn results in a subtle bug on Jetson TK1, where the gpio-keys > device is used to expose the power key as input. The power key is a > convenient way to wake the system from suspend. Interestingly, the > gpio-keys device ends up getting probed at a point after gpio-tegra > has been probed successfully from having been deferred earlier. As > such the driver doesn't need to defer the probe itself, and hence > the device isn't moved to the end of the dpm_list. This causes the > gpio-tegra device to be suspended before gpio-keys, which in turn > leaves gpio-keys unable to wake the system from suspend. > > There are patches in the works to fix both of the above issues, but they > are too involved to make it into v4.3, so in the meantime let's fix the > regressions by commenting out the gpio-ranges properties until the fixes > have landed. > > Signed-off-by: Thierry Reding > --- > Applied to fixes, thanks! Arnd