From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [PATCH] ASoC: core: Configure pin muxing via pinctrl when registering a DAI Date: Tue, 25 Sep 2012 14:24:23 +0300 Message-ID: <50619467.3040203@ti.com> References: <1348214066-28384-1-git-send-email-peter.ujfalusi@ti.com> <20120921111352.GA21524@opensource.wolfsonmicro.com> <505C68AA.7080907@ti.com> <505C9496.1050307@wwwdotorg.org> <20120922152840.GM4495@opensource.wolfsonmicro.com> <505E80AD.9050000@wwwdotorg.org> <20120924101757.GC21375@opensource.wolfsonmicro.com> <20120925111146.GC4428@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from na3sys009aog113.obsmtp.com (na3sys009aog113.obsmtp.com [74.125.149.209]) by alsa0.perex.cz (Postfix) with ESMTP id 67ABD2615FE for ; Tue, 25 Sep 2012 13:23:18 +0200 (CEST) Received: by oagn12 with SMTP id n12so1323627oag.38 for ; Tue, 25 Sep 2012 04:23:16 -0700 (PDT) In-Reply-To: <20120925111146.GC4428@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linus Walleij , Liam Girdwood , alsa-devel@alsa-project.org, Stephen Warren List-Id: alsa-devel@alsa-project.org On 09/25/2012 02:11 PM, Mark Brown wrote: > On Mon, Sep 24, 2012 at 04:37:23PM +0200, Linus Walleij wrote: >> On Mon, Sep 24, 2012 at 12:17 PM, Mark Brown > = >>> Well, the problem here is that people keep wanting to add one shot >>> pinctrl calls in drivers which clearly suggests that it ought to be >>> factored out. > = >> OK so can we find some suitable middle ground here? > = >> Something like drivers could add some boolean flag to >> "opt-in" for the core to handle this or so? > = > Well, I don't know if we need to - it sounds like the platforms that are > running around adding these pinctrl calls to all the drivers are doing > it wrong and should be fixed. In the scope of audio... I guess it is one thing to use the pinctrl framework to configure the mux f= or the pins (which was the original idea of the patch). This should be taken c= are in some centralized place, I agree. But the pinctrl could be used to change the mux runtime. For example in OMAP for most of the audio related pins we need to select MODE0 mux configuration in order to route the signal to the pin. However the same pin can be configured to SAFE_MODE which disconnects the pin from outside. During audio activity we obviously need to configure these pins to MODE0 but when there is not activity we could set them to SAFE_MODE which could result some power savings (preventing leakage, etc). For this to work it would be ideal to use the pm_runtime as a centralized place to handle clocks, pinctrl, etc... But again, what to do with the cases when this is not needed (the pinctrl p= art for the devices)? >> After all only some MMC drivers call up to >> mmc_regulator_set_ocr() to set voltages, it's optional >> but centralized. > = > This is mostly a historical thing, though - pinctrl is new. > = -- = P=E9ter