From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752828Ab2A3Rnn (ORCPT ); Mon, 30 Jan 2012 12:43:43 -0500 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:35897 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752124Ab2A3Rnl (ORCPT ); Mon, 30 Jan 2012 12:43:41 -0500 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 98.234.237.12 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18Vac5tn+ufWcVN1f+R4hBm Date: Mon, 30 Jan 2012 09:43:23 -0800 From: Tony Lindgren To: Shawn Guo Cc: Stephen Warren , Dong Aisheng-B29396 , "Linus Walleij (linus.walleij@linaro.org)" , "Sascha Hauer (s.hauer@pengutronix.de)" , "rob.herring@calxeda.com" , "kernel@pengutronix.de" , "cjb@laptop.org" , "Simon Glass (sjg@chromium.org)" , Dong Aisheng , Thomas Abraham , "Grant Likely (grant.likely@secretlab.ca)" , "devicetree-discuss@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: Pinmux bindings proposal V2 Message-ID: <20120130174323.GF9339@atomide.com> References: <74CDBE0F657A3D45AFBB94109FB122FF1780DAB4CE@HQMAIL01.nvidia.com> <20120123210052.GS22818@atomide.com> <20120126093610.GD2287@S2101-09.ap.freescale.net> <20120126175122.GX22818@atomide.com> <20120127071944.GC32740@S2101-09.ap.freescale.net> <20120127171653.GI13504@atomide.com> <20120130021041.GB10470@S2101-09.ap.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120130021041.GB10470@S2101-09.ap.freescale.net> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Shawn Guo [120129 17:27]: > On Fri, Jan 27, 2012 at 09:16:53AM -0800, Tony Lindgren wrote: > ... > > I guess the analog we should follow here is clk_get and clk_set_rate, > > except we would have pinconf_set_state with predefined states. > > > It seems working for cases that we only change pinconf but never pinmux > for different configuration states. But how would that work for cases > that require mux change for different configuration states? I don't see why we should not allow changing the mux state with pinconf too, after all it's the mux/pin that's locked, not the functionality of the pin. An example of this would be remuxing a shared UART line between rx and tx. Those kind of cases could be defined as PMX_DIRECTION_INPUT and PMX_DIRECTION_OUTPUT so driver could call Linux generic functions for those if implemented. Regards, Tony