Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754433Ab3H3Iky (ORCPT ); Fri, 30 Aug 2013 04:40:54 -0400 Received: from mail-oa0-f42.google.com ([209.85.219.42]:33160 "EHLO mail-oa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754287Ab3H3Ikw (ORCPT ); Fri, 30 Aug 2013 04:40:52 -0400 MIME-Version: 1.0 In-Reply-To: References: <1377066607-19061-1-git-send-email-sonic.adi@gmail.com> <52150AD9.3040808@wwwdotorg.org> Date: Fri, 30 Aug 2013 10:40:51 +0200 Message-ID: Subject: Re: [PATCH 1/3 v3] pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. From: Linus Walleij To: Sonic Zhang Cc: Stephen Warren , Grant Likely , Steven Miao , LKML , adi-buildroot-devel@lists.sourceforge.net, Sonic Zhang Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 29 On Thu, Aug 29, 2013 at 11:31 AM, Sonic Zhang wrote: > On Thu, Aug 29, 2013 at 4:12 PM, Linus Walleij wrote: >> This is similar to the situation in the pinctrl-nomadik.c driver, >> where the pinctrl portions wait for the GPIO devices to instantiate >> before proceeding to probe "on top" of the GPIO blocks, using >> the latter to get to the registers. >> >> I am not sure we have found the best way to sort out this >> type of system, let's see what we can come up with. > > In the blackfin pinctrol-adi2 driver, I probe all gpio devices > independently after all logic pinctrl devices. When one gpio device is > probed, it can get its pinctrl device name from its platform data and > add its gpio range into the pinctrl device via > gpiochip_add_pin_range(). The gpio device don't need to know anything > else about its pinctrl device. This is ideal in the situation when there is a clear separation between the GPIO and pin control (muxing, biasing) registers. So you're doing the right thing. Yours, Linus Walleij -- 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/