Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbcL3O2q (ORCPT ); Fri, 30 Dec 2016 09:28:46 -0500 Received: from mail-qt0-f172.google.com ([209.85.216.172]:36433 "EHLO mail-qt0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754063AbcL3O2n (ORCPT ); Fri, 30 Dec 2016 09:28:43 -0500 MIME-Version: 1.0 In-Reply-To: <20161227172003.6517-4-tony@atomide.com> References: <20161227172003.6517-1-tony@atomide.com> <20161227172003.6517-4-tony@atomide.com> From: Linus Walleij Date: Fri, 30 Dec 2016 15:28:42 +0100 Message-ID: Subject: Re: [PATCH 3/5] pinctrl: core: Add generic pinctrl functions for managing groups To: Tony Lindgren Cc: Haojian Zhuang , Masahiro Yamada , Grygorii Strashko , Nishanth Menon , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-OMAP Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1056 Lines: 43 On Tue, Dec 27, 2016 at 6:20 PM, Tony Lindgren wrote: > We can add generic helpers for function handling for cases where the pin > controller driver does not need to use static arrays. > > Signed-off-by: Tony Lindgren Patch applied. > +config GENERIC_PINMUX > + bool > + select PINMUX I renamed this GENERIC_PINMUX_FUNCTIONS > + INIT_RADIX_TREE(&pctldev->pin_function_tree, GFP_KERNEL); #ifdefed this > + struct radix_tree_root pin_function_tree; > unsigned int num_groups; > + unsigned int num_functions; #ifdefed these > /** > + * struct function_desc - generic function descriptor > + * @name: name of the function > + * @group_names: array of pin group names > + * @num_group_names: number of pin group names > + * @data: pin controller driver specific data > + */ > +struct function_desc { > + const char *name; > + const char **group_names; > + int num_group_names; > + void *data; > +}; And moved this into pinmux.h Yours, Linus Walleij