Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759916Ab3HNPjX (ORCPT ); Wed, 14 Aug 2013 11:39:23 -0400 Received: from mail-oa0-f43.google.com ([209.85.219.43]:56329 "EHLO mail-oa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758769Ab3HNPjW (ORCPT ); Wed, 14 Aug 2013 11:39:22 -0400 MIME-Version: 1.0 In-Reply-To: <1373972146-12133-3-git-send-email-sonic.adi@gmail.com> References: <1373972146-12133-1-git-send-email-sonic.adi@gmail.com> <1373972146-12133-3-git-send-email-sonic.adi@gmail.com> Date: Wed, 14 Aug 2013 17:39:21 +0200 Message-ID: Subject: Re: [PATCH 3/3] blackfin: pinctrl-adi2: Add pin control device groups and function data. From: Linus Walleij To: Sonic Zhang Cc: Grant Likely , Steven Miao , LKML , buildroot-devel@blackfin.uclinux.org, 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: 1442 Lines: 42 On Tue, Jul 16, 2013 at 12:55 PM, Sonic Zhang wrote: > From: Sonic Zhang > > Select PINCTRL_ADI2 for bf54x and bf60x by default. > > Signed-off-by: Sonic Zhang (...) > +++ b/arch/blackfin/mach-bf548/include/mach/portmux.h (...) > +static const struct pinctrl_pin_desc adi_pads[] = { > + PINCTRL_PIN(0, "PA0"), > + PINCTRL_PIN(1, "PA1"), > + PINCTRL_PIN(2, "PA2"), > + PINCTRL_PIN(3, "PG3"), The pattern we follow is not to pass the information about pins in a certain SoC or package as platform data. Instead we rely on plug-in subdrivers down in the pinctrl subsystem under drivers/pinctrl/*. Nominally you should write a central blackfind pinctrl driver such as drivers/pinctrl/pinctrl-blackfin.c then have a local header such as drivers/pinctrl/pinctrl-blackfin.h that enable SoC sub-drivers such as drivers/pinctrl/pinctrl-blackfin-bf54x.c, pinctrl-blackfin-bf60f.c to register to that. Please read the current drivers such as pinctrl-nomadik.c and pinctrl-nomadik-db8500.c for an idea of how this plugin concept works. In short: move all this data down into pinctrl. 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/