Message ID | 1448878338-28496-1-git-send-email-djkurtz@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EC3FCBEEE1 for <patchwork-linux-mediatek@patchwork.kernel.org>; Mon, 30 Nov 2015 10:13:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C78520549 for <patchwork-linux-mediatek@patchwork.kernel.org>; Mon, 30 Nov 2015 10:13:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AAA82052F for <patchwork-linux-mediatek@patchwork.kernel.org>; Mon, 30 Nov 2015 10:13:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3LS7-0007sH-WA; Mon, 30 Nov 2015 10:13:00 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3LS5-0007pL-Lp for linux-mediatek@lists.infradead.org; Mon, 30 Nov 2015 10:12:58 +0000 Received: by pacej9 with SMTP id ej9so180628966pac.2 for <linux-mediatek@lists.infradead.org>; Mon, 30 Nov 2015 02:12:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=AKIBjnomCRHTaSyCaqHPw74q6GBTbbXqT4Sdn9otWys=; b=ZrV772ETuTHB+Fs820Z24r/Z8rUwdQkSGFScUec6foo9q8/bAEYxZT945zBxEEg1Pe NXBquIUGstZ+Yc9Iq5MsxZFGULsHCo9SdQRn5rFlvQtntQiMhKwh0Iz5u7ADVxVSKXgZ G+kWrQ0mq6q/lYrBiD9RFCEsQjrWlKn9vlnq4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AKIBjnomCRHTaSyCaqHPw74q6GBTbbXqT4Sdn9otWys=; b=XeIjD6h8qapdN6K2NSSUL3ID0k+WKnKJkBF1YjcdRllWkE4GxiOKRhlEX8xOsQHHIQ 1Ttal+hFiaM0V/wXs8Cr6Ghm4JxjTVWsRtrtxAEKXMd+WeZ/ncCNSsgyrZD7Nhnt4Q0V ZfvH4KSdqS/XROkoVgsNdgKET9fuVUJQhd2PotrIVTdMIA6c6vNYyUz/nuUWY6i2T/az ZLPjjhiS90GGwKLXwY+1NregoRsZ6SBVKIP2LCFetzPuJ/YCc0sMV4MC3Gl4zGNKiIzP agFxL/PIMaCXwxXUdzK/fczM9QUTi2BFX6a+ayiYipUI6w8+wo6B4dSQban7Ktj9EobL VCKA== X-Gm-Message-State: ALoCoQnnGo9inUVeFYEODopwVK9ZNfTIiQQ7E8Vo9aWdg9+y0YTDrY3Yp+SvLAuGmj8uy5W52TXC X-Received: by 10.98.12.20 with SMTP id u20mr68413814pfi.71.1448878355254; Mon, 30 Nov 2015 02:12:35 -0800 (PST) Received: from djkurtz1.tpe.corp.google.com ([172.30.210.4]) by smtp.gmail.com with ESMTPSA id hw7sm50797248pac.12.2015.11.30.02.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Nov 2015 02:12:34 -0800 (PST) From: Daniel Kurtz <djkurtz@chromium.org> To: Subject: [PATCH] cpufreq: mediatek: Use REGCACHE_RBTREE Date: Mon, 30 Nov 2015 18:12:18 +0800 Message-Id: <1448878338-28496-1-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151130_021257_777742_6F796806 X-CRM114-Status: GOOD ( 11.52 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Cc: Liam Girdwood <lgirdwood@gmail.com>, "open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK" <linux-kernel@vger.kernel.org>, Mark Brown <broonie@kernel.org>, "moderated list:ARM/Mediatek SoC support" <linux-mediatek@lists.infradead.org>, Matthias Brugger <matthias.bgg@gmail.com>, "moderated list:ARM/Mediatek SoC support" <linux-arm-kernel@lists.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
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 */
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 <djkurtz@chromium.org> --- drivers/regulator/mt6311-regulator.c | 1 + 1 file changed, 1 insertion(+)