Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932365AbbGJP2A (ORCPT ); Fri, 10 Jul 2015 11:28:00 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:38715 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754837AbbGJP1u (ORCPT ); Fri, 10 Jul 2015 11:27:50 -0400 Message-ID: <559FE471.1030408@wwwdotorg.org> Date: Fri, 10 Jul 2015 09:27:45 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Tomeu Vizoso , Rob Herring CC: "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , Linus Walleij , Grant Likely , Rob Herring , Alexandre Courbot Subject: Re: [PATCH v1 1/3] gpio: defer probe if pinctrl cannot be found References: <1435754753-31307-1-git-send-email-tomeu.vizoso@collabora.com> <1435754753-31307-2-git-send-email-tomeu.vizoso@collabora.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1703 Lines: 35 On 07/10/2015 03:29 AM, Tomeu Vizoso wrote: > On 1 July 2015 at 19:36, Rob Herring wrote: >> On Wed, Jul 1, 2015 at 7:45 AM, Tomeu Vizoso wrote: >>> When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if >>> the pin controller isn't available. >>> >>> Otherwise, the GPIO range wouldn't be set at all unless the pin >>> controller probed always before the GPIO chip. >>> >>> With this change, the probe of the GPIO chip will be deferred and will >>> be retried at a later point, hopefully once the pin controller has been >>> registered and probed already. >> >> This will break cases where the pinctrl driver does not exist, but the >> DT contains pinctrl bindings. We can have similar problems already >> with clocks though. However, IMO this problem is a bit different in >> that pinctrl is more likely entirely optional while clocks are often >> required. You may do all pin setup in bootloader/firmware on some >> boards and not others. Of course then why put pinctrl in the DT in >> that case? They could be present just due to how chip vs. board dts >> files are structured. > > I see. My instinct tells me that it would be better if the gpio-ranges > property was set in the board dts, but I don't really know what each > mach does with its DTSs. That doesn't make sense; the mapping between GPIO controller pins and pin controller pins is a property of the SoC not the board. -- 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/