From mboxrd@z Thu Jan 1 00:00:00 1970 From: mikedunn@newsguy.com (Mike Dunn) Date: Fri, 07 Jun 2013 10:41:15 -0700 Subject: pxa27x and pinctrl-single In-Reply-To: References: <51AF7404.3090003@newsguy.com> <51B0C7E8.5090308@newsguy.com> <51B12DE9.9040908@newsguy.com> <51B1F330.9080007@newsguy.com> Message-ID: <51B21B3B.8050604@newsguy.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/07/2013 08:16 AM, Haojian Zhuang wrote: > [...] > Since you need to configure both GPDRx and GAFRx. If we are talking > pinctrl-single > as reference, we can make it work by this way. > > We need to define two pinmux controllers. One is for GPDRx, and the > other is for GAFRx. > Both of them need to support pinctrl-single,bits property. For any > alternate pins in DTS, > we could include these two pins from two pinmux controllers. What's > your opinion? Are you are suggesting that the dts file can be defined such that the desired values are written to GAFR and GPDR, without having to make any changes to the pinctrl-single driver code? If I understand correctly, we would be defining two "pins" in the device tree for each actual pin. That seems very ugly. I was thinking that pinctrl-single could be modified to support multiple reg/value/mask pairs for each pin listed in the pinctrl-single,bits property. There is a comment at the top of pcs_parse_one_pinctrl_entry() that seems to suggest the possibility... * Note that this binding currently supports only sets of one register + value. I am still learning pinctrl and devicetree and studying the driver, so I am not adament about anything at this point. Guidance appreciated! Thanks, Mike From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Dunn Subject: Re: pxa27x and pinctrl-single Date: Fri, 07 Jun 2013 10:41:15 -0700 Message-ID: <51B21B3B.8050604@newsguy.com> References: <51AF7404.3090003@newsguy.com> <51B0C7E8.5090308@newsguy.com> <51B12DE9.9040908@newsguy.com> <51B1F330.9080007@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Haojian Zhuang Cc: "linux-arm-kernel@lists.infradead.org" , "Manjunathappa, Prakash" , "devicetree-discuss@lists.ozlabs.org" , Haojian Zhuang , Linus Walleij List-Id: devicetree@vger.kernel.org On 06/07/2013 08:16 AM, Haojian Zhuang wrote: > [...] > Since you need to configure both GPDRx and GAFRx. If we are talking > pinctrl-single > as reference, we can make it work by this way. > > We need to define two pinmux controllers. One is for GPDRx, and the > other is for GAFRx. > Both of them need to support pinctrl-single,bits property. For any > alternate pins in DTS, > we could include these two pins from two pinmux controllers. What's > your opinion? Are you are suggesting that the dts file can be defined such that the desired values are written to GAFR and GPDR, without having to make any changes to the pinctrl-single driver code? If I understand correctly, we would be defining two "pins" in the device tree for each actual pin. That seems very ugly. I was thinking that pinctrl-single could be modified to support multiple reg/value/mask pairs for each pin listed in the pinctrl-single,bits property. There is a comment at the top of pcs_parse_one_pinctrl_entry() that seems to suggest the possibility... * Note that this binding currently supports only sets of one register + value. I am still learning pinctrl and devicetree and studying the driver, so I am not adament about anything at this point. Guidance appreciated! Thanks, Mike