From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752190AbbCWLY2 (ORCPT ); Mon, 23 Mar 2015 07:24:28 -0400 Received: from avasout05.plus.net ([84.93.230.250]:55754 "EHLO avasout05.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751935AbbCWLY1 (ORCPT ); Mon, 23 Mar 2015 07:24:27 -0400 X-Greylist: delayed 454 seconds by postgrey-1.27 at vger.kernel.org; Mon, 23 Mar 2015 07:24:26 EDT X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=CuQxcxID c=1 sm=1 tr=0 a=oGXdIM4CHFLRg3SRSiSbjg==:117 a=oGXdIM4CHFLRg3SRSiSbjg==:17 a=0Bzu9jTXAAAA:8 a=KcJ3CBSANbIA:10 a=N659UExz7-8A:10 a=eIRpCU4CAAAA:8 a=X8ijrERXr3vkLkbjP48A:9 a=pILNOxqGKmIA:10 X-AUTH: oscars+hm@:2500 Message-ID: <550FF581.4000502@hmbedded.co.uk> Date: Mon, 23 Mar 2015 11:14:09 +0000 From: Howard Mitchell User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Peter Rosin , Mark Brown CC: "tiwai@suse.de" , "lgirdwood@gmail.com" , "perex@perex.cz" , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ASoC:pcm512x: Make PLL lock output selectable via device tree. References: <1426886563-10936-1-git-send-email-hm@hmbedded.co.uk> <20150322162409.GG6643@sirena.org.uk> <550FE05F.6070204@hmbedded.co.uk> <105aef6a0e21488d8661d2a2823515d8@EMAIL.axentia.se> In-Reply-To: <105aef6a0e21488d8661d2a2823515d8@EMAIL.axentia.se> 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 23/03/15 11:00, Peter Rosin wrote: > Howard Mitchell wrote: >> On 22/03/15 16:24, Mark Brown wrote: >>> On Fri, Mar 20, 2015 at 09:22:43PM +0000, Howard Mitchell wrote: >>> >>>> + if (pcm512x->pll_lock) { >>>> + if (of_property_read_u32(np, "pll-lock", &val) >= 0) { >>>> + if (val > 6) { >>>> + dev_err(dev, "Invalid pll-lock\n"); >>>> + ret = -EINVAL; >>>> + goto err_clk; >>>> + } >>>> + pcm512x->pll_lock = val; >>>> + } >>> This breaks existing boards which rely on GPIO 4 being set as the lock >>> output. This is very unfortunate since it's a silly thing for the >>> driver to default to but nontheless we should really continue to support >>> them - at a guess Peter's board is relying on this, and even if it isn't >>> someone else's might. >> I take your point, but the reason I pushed this patch was that I wanted >> to use GPIO4 for pll-out and unfortunately because the pll-lock >> configuration is after the pll-out configuration it stomps on it. If I >> modify the patch to provide a default for pll-lock I will then be >> obliged to specify pll-lock on another GPIO. The pcm5122 has limited IO >> so being forced to have a GPIO for pll-lock seems wrong to me. A future >> user of the device may well decide to use the GPIOs for other purposes >> and therefore not want a pll-lock signal at all. Surely we should allow >> for that possibility? >> >> Given that Peter has indicated that he'd be happy with this solution and >> that this code hasn't reached a published kernel would it be reasonable >> to go ahead with my current patch (happy to clean up the indent issues >> that Peter pointed out of course)? > Strongly agreed that we should fix this before it is published (I assumed > that is was included in 3.19, it felt so long ago that Mark merged it...). My > preference would be to remove the pll-lock things entirely though. Assuming > you don't need it for your board of course, but I doubt it from your description. > I used it to make sure I had understood the chip correctly, that's all. > > Cheers, > Peter > I'd be happy to remove it entirely. I only used it as you did as a debug tool. Let's see what Mark thinks..... - Howard