Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932390AbbLRHef (ORCPT ); Fri, 18 Dec 2015 02:34:35 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:48178 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753316AbbLRHea (ORCPT ); Fri, 18 Dec 2015 02:34:30 -0500 X-Listener-Flag: 11101 Message-ID: <1450424062.12852.3.camel@mtksdaap41> Subject: Re: [RESEND PATCH] regulator: mt6311: Use REGCACHE_RBTREE From: Henry Chen To: Daniel Kurtz CC: , , "Matthias Brugger" , Liam Girdwood , "Mark Brown" , "open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK" Date: Fri, 18 Dec 2015 15:34:22 +0800 In-Reply-To: <1450422693-371-1-git-send-email-djkurtz@chromium.org> References: <1450422693-371-1-git-send-email-djkurtz@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1558 Lines: 42 Thanks to the patch. On Fri, 2015-12-18 at 15:11 +0800, Daniel Kurtz wrote: > This regulator is on a slow i2c bus. Register accesses are very simple, > they all either enable/disable a regulator channel, or select a new > voltage level. Thus, reading registers from the device will always > return what was last written. > > Therefore we can save a lot of time when reading registers by using a > regmap_cache. Since the register map is relatively large, but we only > ever access a few of them, we use an RBTREE cache. > > Signed-off-by: Daniel Kurtz Acked-by: Henry Chen > --- > I used the wrong commit message subject in the first attempt. > Maybe this time someone will review it ;-). > --- > drivers/regulator/mt6311-regulator.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c > index 02c4e5f..0495716 100644 > --- a/drivers/regulator/mt6311-regulator.c > +++ b/drivers/regulator/mt6311-regulator.c > @@ -30,6 +30,7 @@ static const struct regmap_config mt6311_regmap_config = { > .reg_bits = 8, > .val_bits = 8, > .max_register = MT6311_FQMTR_CON4, > + .cache_type = REGCACHE_RBTREE, > }; > > /* Default limits measured in millivolts and milliamps */ -- 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/