Message ID | 1448878338-28496-1-git-send-email-djkurtz@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B23B09F39B for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 Nov 2015 10:14:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D09522052F for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 Nov 2015 10:14:55 +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 11B42204E0 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 Nov 2015 10:14:55 +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 1a3LS9-0007sW-Cf; Mon, 30 Nov 2015 10:13:01 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3LS5-0007pK-Lt for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2015 10:12:58 +0000 Received: by pabfh17 with SMTP id fh17so186143520pab.0 for <linux-arm-kernel@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=mr0Ju6dStWMAP+8HlusRQbqpDQODxMSdROt4L27/3QLsuMC99kQAAGlbKR6btWsZ4a nYvaDDnIsBCFA63AktuJ/rePg3oLuwJ2SIO2QT+6YtYYR/cBW7sl1iHODYa89ivz9Tux y2R5jlOJyihkFdFIxGnLGYw0VfT8aYS7OPLCJy/yRL9IljR5f1dBt9K8J+Optyt22vqP MmPchzn6yySvBJtdQMA67+vjb6fDvub0Zk8zaL0ry+flDcrn8jSxPGffh+IGj2VK9ii5 pRG8SyIt+X/7dIQjYa+84IZYq1u2pdoDz+up5w0O4RV3NSXI2eBU0aScNWUjuhgm3zBC az4w== X-Gm-Message-State: ALoCoQkKRae3/cCK1GOSTEPLVKDjSmiO++ye4j/WwHXL+hTKdVEmufYLl4XJpINYixHRc/8qVnhT 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_792238_6B3C51EA X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Liam Girdwood <lgirdwood@gmail.com>, Daniel Kurtz <djkurtz@chromium.org>, "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-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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(+)