From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Keepax Subject: Re: [PATCH 0/4] Add support for muxing individual pins Date: Fri, 8 Dec 2017 17:16:48 +0000 Message-ID: <20171208171648.sbznughahicmklcs@localhost.localdomain> References: <20170929101503.6769-1-ckeepax@opensource.cirrus.com> <20171208142923.2exqaateli2qmtzl@localhost.localdomain> <20171208162818.GA24344@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:48090 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbdLHRQx (ORCPT ); Fri, 8 Dec 2017 12:16:53 -0500 Content-Disposition: inline In-Reply-To: <20171208162818.GA24344@atomide.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Tony Lindgren Cc: Linus Walleij , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , patches@opensource.cirrus.com, Bjorn Andersson , Stephen Warren On Fri, Dec 08, 2017 at 08:28:18AM -0800, Tony Lindgren wrote: > * Charles Keepax [171208 14:31]: > > From the implementation so far the pinctrl-single stuff appears to > > target systems where there isn't really a concept of groups. Each > > pin is just a completely separate entry and you can only configure > > things one pin at a time. In that case it almost makes more sense > > to model each pin as an individual group such that it is clearly > > distinct from the others. > > Maybe check again or else I don't follow you :) > > The pinctrl groups are created dynamically with pinctrl-single > based on how the pins are grouped in the dts file: > > mmc1_pins: pinmux_mmc1_pins { > pinctrl-single,pins = < > OMAP4_IOPAD(0x0e2, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e4, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e6, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e8, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0ea, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0ec, PIN_INPUT_PULLUP | MUX_MODE0) > >; > }; > > Then on a booted system we have the following under > /sys/kernel/debug/pinctrl/4a100040.pinmux/pingroups: > > group: pinmux_mmc1_pins > pin 81 (PIN81) > pin 82 (PIN82) > pin 83 (PIN83) > pin 84 (PIN84) > pin 85 (PIN85) > pin 86 (PIN86) > Hmm... apologies, I suspect this is me that needs to review the code some more. So this is actually creating a group per user rather than per controller. Although I guess my original point still stands that I am not clear how this would benefit from my patches to allow muxing of individual pins within a group. Since I guess each user will just get a group created for the pins they use regardless. Or am I missing something here too? Thanks, Charles From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbdLHRQz (ORCPT ); Fri, 8 Dec 2017 12:16:55 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:48090 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbdLHRQx (ORCPT ); Fri, 8 Dec 2017 12:16:53 -0500 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Date: Fri, 8 Dec 2017 17:16:48 +0000 From: Charles Keepax To: Tony Lindgren CC: Linus Walleij , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , , "Bjorn Andersson" , Stephen Warren Subject: Re: [PATCH 0/4] Add support for muxing individual pins Message-ID: <20171208171648.sbznughahicmklcs@localhost.localdomain> References: <20170929101503.6769-1-ckeepax@opensource.cirrus.com> <20171208142923.2exqaateli2qmtzl@localhost.localdomain> <20171208162818.GA24344@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20171208162818.GA24344@atomide.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712080237 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 08, 2017 at 08:28:18AM -0800, Tony Lindgren wrote: > * Charles Keepax [171208 14:31]: > > From the implementation so far the pinctrl-single stuff appears to > > target systems where there isn't really a concept of groups. Each > > pin is just a completely separate entry and you can only configure > > things one pin at a time. In that case it almost makes more sense > > to model each pin as an individual group such that it is clearly > > distinct from the others. > > Maybe check again or else I don't follow you :) > > The pinctrl groups are created dynamically with pinctrl-single > based on how the pins are grouped in the dts file: > > mmc1_pins: pinmux_mmc1_pins { > pinctrl-single,pins = < > OMAP4_IOPAD(0x0e2, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e4, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e6, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0e8, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0ea, PIN_INPUT_PULLUP | MUX_MODE0) > OMAP4_IOPAD(0x0ec, PIN_INPUT_PULLUP | MUX_MODE0) > >; > }; > > Then on a booted system we have the following under > /sys/kernel/debug/pinctrl/4a100040.pinmux/pingroups: > > group: pinmux_mmc1_pins > pin 81 (PIN81) > pin 82 (PIN82) > pin 83 (PIN83) > pin 84 (PIN84) > pin 85 (PIN85) > pin 86 (PIN86) > Hmm... apologies, I suspect this is me that needs to review the code some more. So this is actually creating a group per user rather than per controller. Although I guess my original point still stands that I am not clear how this would benefit from my patches to allow muxing of individual pins within a group. Since I guess each user will just get a group created for the pins they use regardless. Or am I missing something here too? Thanks, Charles