From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756403AbdABQOY (ORCPT ); Mon, 2 Jan 2017 11:14:24 -0500 Received: from mail-wj0-f169.google.com ([209.85.210.169]:35418 "EHLO mail-wj0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756379AbdABQOV (ORCPT ); Mon, 2 Jan 2017 11:14:21 -0500 Date: Mon, 2 Jan 2017 17:14:13 +0100 From: Gary Bisson To: Tony Lindgren Cc: Linus Walleij , Haojian Zhuang , Masahiro Yamada , Grygorii Strashko , Nishanth Menon , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-OMAP Subject: Re: [PATCHv2 0/5] Add generic pinctrl helpers for managing groups and function Message-ID: <20170102161413.uuqzjtqndwx4cytc@t450s.lan> References: <20161227172003.6517-1-tony@atomide.com> <20161230155957.GB3940@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161230155957.GB3940@atomide.com> User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Tony, On Fri, Dec 30, 2016 at 07:59:57AM -0800, Tony Lindgren wrote: > * Gary Bisson [161230 07:43]: > > Hi Linus, > > > > On Fri, Dec 30, 2016 at 3:39 PM, Linus Walleij wrote: > > > On Tue, Dec 27, 2016 at 6:19 PM, Tony Lindgren wrote: > > > > > >> Here are some changes to add generic helpers for managing pinctrl groups and > > >> functions. > > > > > > I applied it, screwed around with it and pushed to the build servers to see > > > if it survived. > > > > > > I really like the look of this and I hope lots of driver start to use it. > > > > > > Gary, I just applied your radix patches for i.MX, can you look if you can > > > use the GENERIC_PINCTRL_GROUPS and GENERIC_PINMUX_FUCNTIONS > > > that Tony invented and that I just merged to my devel branch in the > > > pinctrl tree? > > > > Yes I will have a look. It does sound like a good idea. I'll share my > > findings beginning of next week. So I've had a look and indeed I can use some of it. Here is what my series looks like: drivers/pinctrl/freescale/Kconfig | 3 +- drivers/pinctrl/freescale/pinctrl-imx.c | 273 +++++++++----------------------- drivers/pinctrl/freescale/pinctrl-imx.h | 33 +--- 3 files changed, 80 insertions(+), 229 deletions(-) Mainly I've used the generic functions in pinctrl_ops and pinmux_ops and switched to the generic group/function_desc structures instead of the imx-specific one that didn't bring anything else. However I couldn't use the 'add' functions to add elements since the parsing is done at probe time in its own way. So I've keep the radix_insert functions. This could be modified though, it just requires to modify the driver even more which I didn't feel like doing right now. > OK great. Note that we may be able to come up also with a generic > iterator function for the node_to_map functions so maybe see if > you come up with some ideas for that while experimenting :) I haven't had time to think about a generic node_to_map yet, but I hopefully will have some time in a near future to think about it. Right now it doesn't look obvious. Also, I have some comments about your patches (already applied) which I will send as a reply to the original patches. Regards, Gary