From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755769AbbFOP5u (ORCPT ); Mon, 15 Jun 2015 11:57:50 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:39256 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754901AbbFOP5g (ORCPT ); Mon, 15 Jun 2015 11:57:36 -0400 Message-ID: <557EF60D.8020007@wwwdotorg.org> Date: Mon, 15 Jun 2015 09:58:05 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ludovic Desroches , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org CC: linus.walleij@linaro.org, nicolas.ferre@atmel.com Subject: Re: [RESEND PATCH 1/2] pinctrl: change function behavior for per pin muxing controllers References: <1433948699-19800-1-git-send-email-ludovic.desroches@atmel.com> <1433948699-19800-2-git-send-email-ludovic.desroches@atmel.com> In-Reply-To: <1433948699-19800-2-git-send-email-ludovic.desroches@atmel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/10/2015 09:04 AM, Ludovic Desroches wrote: > When having a controller which allows per pin muxing, declaring with > which groups a function can be used is a useless constraint since groups > are something virtual. This isn't true. Irrespective of whether a particular piece of pinmux HW can control the mux function for each pin individually, or only in groups, it's quite likely that each function can only be selected onto a subset of those pins or groups. Requiring the pinctrl driver to inform the core which set of pins/groups particular functions can be selected onto seems quite reasonable. In my opinion at least, for HW that can select the mux function at the per-pin level, the only sensible set of groups is one group per pin with each group containing a single pin. Any other use of groups is a SW/user-level construct, and is something unrelated to why the pinctrl subsystem supports groups. If we want to represent those groups in pinctrl, there should be two separate sets of groups; one to represent the actual HW capabilities, and one to represent the SW/user-level convenience abstractions. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [RESEND PATCH 1/2] pinctrl: change function behavior for per pin muxing controllers Date: Mon, 15 Jun 2015 09:58:05 -0600 Message-ID: <557EF60D.8020007@wwwdotorg.org> References: <1433948699-19800-1-git-send-email-ludovic.desroches@atmel.com> <1433948699-19800-2-git-send-email-ludovic.desroches@atmel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433948699-19800-2-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ludovic Desroches , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org List-Id: devicetree@vger.kernel.org On 06/10/2015 09:04 AM, Ludovic Desroches wrote: > When having a controller which allows per pin muxing, declaring with > which groups a function can be used is a useless constraint since groups > are something virtual. This isn't true. Irrespective of whether a particular piece of pinmux HW can control the mux function for each pin individually, or only in groups, it's quite likely that each function can only be selected onto a subset of those pins or groups. Requiring the pinctrl driver to inform the core which set of pins/groups particular functions can be selected onto seems quite reasonable. In my opinion at least, for HW that can select the mux function at the per-pin level, the only sensible set of groups is one group per pin with each group containing a single pin. Any other use of groups is a SW/user-level construct, and is something unrelated to why the pinctrl subsystem supports groups. If we want to represent those groups in pinctrl, there should be two separate sets of groups; one to represent the actual HW capabilities, and one to represent the SW/user-level convenience abstractions. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: swarren@wwwdotorg.org (Stephen Warren) Date: Mon, 15 Jun 2015 09:58:05 -0600 Subject: [RESEND PATCH 1/2] pinctrl: change function behavior for per pin muxing controllers In-Reply-To: <1433948699-19800-2-git-send-email-ludovic.desroches@atmel.com> References: <1433948699-19800-1-git-send-email-ludovic.desroches@atmel.com> <1433948699-19800-2-git-send-email-ludovic.desroches@atmel.com> Message-ID: <557EF60D.8020007@wwwdotorg.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/10/2015 09:04 AM, Ludovic Desroches wrote: > When having a controller which allows per pin muxing, declaring with > which groups a function can be used is a useless constraint since groups > are something virtual. This isn't true. Irrespective of whether a particular piece of pinmux HW can control the mux function for each pin individually, or only in groups, it's quite likely that each function can only be selected onto a subset of those pins or groups. Requiring the pinctrl driver to inform the core which set of pins/groups particular functions can be selected onto seems quite reasonable. In my opinion at least, for HW that can select the mux function at the per-pin level, the only sensible set of groups is one group per pin with each group containing a single pin. Any other use of groups is a SW/user-level construct, and is something unrelated to why the pinctrl subsystem supports groups. If we want to represent those groups in pinctrl, there should be two separate sets of groups; one to represent the actual HW capabilities, and one to represent the SW/user-level convenience abstractions.