Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755681AbaDPS1a (ORCPT ); Wed, 16 Apr 2014 14:27:30 -0400 Received: from mail-ve0-f178.google.com ([209.85.128.178]:63084 "EHLO mail-ve0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755643AbaDPS10 (ORCPT ); Wed, 16 Apr 2014 14:27:26 -0400 MIME-Version: 1.0 In-Reply-To: <20140416101323.GP12304@sirena.org.uk> References: <1397592876-5741-1-git-send-email-dianders@chromium.org> <1397592876-5741-3-git-send-email-dianders@chromium.org> <20140416095922.GG4754@lee--X1> <20140416101323.GP12304@sirena.org.uk> Date: Wed, 16 Apr 2014 11:27:25 -0700 X-Google-Sender-Auth: ZKe5T3TooUOa51YKMS_Z91j7CPo Message-ID: Subject: Re: [PATCH 2/3] mfd: tps65090: Stop caching registers From: Doug Anderson To: Mark Brown Cc: Lee Jones , Anton Vorontsov , Olof Johansson , Sachin Kamat , AJAY KUMAR RAMAKRISHNA SHYMALAMMA , linux-samsung-soc , Samuel Ortiz , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mark, On Wed, Apr 16, 2014 at 3:13 AM, Mark Brown wrote: > On Wed, Apr 16, 2014 at 10:59:22AM +0100, Lee Jones wrote: > >> > NOTE: the IRQnMASK and CG_CTRLn registers are the exception and could >> > be cached. If we find that we spend a lot of time reading those we >> > can turn on cache for just those registers. > >> > -static bool is_volatile_reg(struct device *dev, unsigned int reg) >> > -{ >> > - if ((reg == TPS65090_INT_STS) || (reg == TPS65090_INT_STS2)) >> > - return true; >> > - else >> > - return false; >> > -} >> > - > >> I don't know enough about Regmap internals to know what this actually >> affects in real terms. > >> Mark, >> Does this change seem sane to you? > > It does what it says, it stops us caching stuff. It would seem better > to do what the changelog suggests above and keep caching the registers > that can be cached - especially the interrupt masks, they should get > read in the interrupt path and that tends to be a bit latency sensitive. Done -- 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/