From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750957AbcFDFSg (ORCPT ); Sat, 4 Jun 2016 01:18:36 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38165 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbcFDFSd (ORCPT ); Sat, 4 Jun 2016 01:18:33 -0400 Subject: Re: [PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision To: Fabio Estevam , Clemens Gruber References: <20160602124724.7725-1-clemens.gruber@pqgruber.com> <5751AEF6.40200@nelint.com> Cc: "alsa-devel@alsa-project.org" , Mark Brown , linux-kernel From: Eric Nelson Message-ID: <575264A4.2070709@nelint.com> Date: Sat, 4 Jun 2016 07:18:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <5751AEF6.40200@nelint.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabio and Clemens, On 06/03/2016 06:23 PM, Eric Nelson wrote: > Hi Fabio, > > On 06/02/2016 05:48 PM, Fabio Estevam wrote: >> Hi Clemens, >> >> On Thu, Jun 2, 2016 at 9:47 AM, Clemens Gruber >> wrote: >>> Instead of checking the SGTL5000 chip revision, we should only check if >>> the VDDD regulator exists and only call sgtl5000_replace_vddd_with_ldo >>> if the regulator is missing. >>> Otherwise, the user reads in the kernel log that the internal LDO is >>> used, even though he did follow the NXP recommendation to use external >>> VDDD and also specified VDDD-supply in the devicetree. >>> >>> Also remove the comment, which incorrectly states that external VDDD is >>> only supported for SGTL5000 chip revisions < 0x11. >>> Official NXP documentation recommends using external VDDD and not the >>> internal LDO due to the SGTL5000 erratum ER1. This also applies to >>> revisions >= 0x11. >>> >>> Tested on an i.MX6Q board with SGTL5000 rev 0x11 and external VDDD. >> >> Patch looks good to me. >> >> Eric, >> >> Sometime ago you were looking at this. What do you think about this patch? >> > > Sorry. I'm traveling and haven't had a chance to review this, but it's > on my to-do. > > AFAIK, the SGTL5000 versions < 0x11 are like Sasquatch: I've seen no real proof of their existence. I tried to chase down when this code was introduced, but it seems to have been around since the dawn of the driver. Clemens, if you're really trying to control an external regulator, I think you'll need lots more than this patch. There are some fundamental flaws in regulator handling and I put together some RFC patches to address them in February 2015: http://mailman.alsa-project.org/pipermail/alsa-devel/2015-February/thread.html#88353 The long and short of it is that at least one of the regulators would need to be initialized before the SGTL5000 probes. Regards, Eric