Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754283AbbDXNw3 (ORCPT ); Fri, 24 Apr 2015 09:52:29 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33415 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824AbbDXNw0 (ORCPT ); Fri, 24 Apr 2015 09:52:26 -0400 MIME-Version: 1.0 In-Reply-To: <20150424092839.GI22845@sirena.org.uk> References: <1429134141-17924-1-git-send-email-cernekee@chromium.org> <1429134141-17924-2-git-send-email-cernekee@chromium.org> <20150418113632.GE26185@sirena.org.uk> <20150424092839.GI22845@sirena.org.uk> From: Kevin Cernekee Date: Fri, 24 Apr 2015 06:52:01 -0700 Message-ID: Subject: Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers To: Mark Brown Cc: Liam Girdwood , dgreid@chromium.org, Andrew Bresticker , Olof Johansson , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Lars-Peter Clausen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1353 Lines: 28 On Fri, Apr 24, 2015 at 2:28 AM, Mark Brown wrote: > On Thu, Apr 23, 2015 at 05:47:49PM -0700, Kevin Cernekee wrote: > >> This is mostly working OK, but regcache_sync() assumes that the >> hardware registers have been reset back to the default values. The >> "pdn" GPIO doesn't actually reset the state of the tas571x; it just >> makes I2C inaccessible and inhibits audio output. So if the factory >> default for mute is 0, corner cases like this fail: > > ... > >> Aside from unnecessarily pulsing the reset GPIO when transitioning >> back from SND_SOC_BIAS_OFF or overriding regcache_default_sync(), can >> you think of a way to work around this? > > Do you need to work around it? If the register map is being perserved > you don't need to sync so just don't do it - it's just that the normal > expectation would be that power down would cause the register map to be > reset. How do I tell regcache to write out any updates that happened while the hardware was inaccessible? I see that regmap->cache_dirty is 1, but nothing flushes it automatically when exiting cache_only mode. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/