mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: sameo@linux.intel.com, lrg@ti.com,
	broonie@opensource.wolfsonmicro.com, jedu@slimlogic.co.uk,
	gg@slimlogic.co.uk, linux-kernel@vger.kernel.org
Cc: linux-tegra@vger.kernel.org, ldewangan@nvidia.com
Subject: [PATCH V1 2/2] regulator: tps65910: Enable register caching of voltage controls.
Date: Wed,  8 Feb 2012 16:16:25 +0530	[thread overview]
Message-ID: <1328697985-22504-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1328697985-22504-1-git-send-email-ldewangan@nvidia.com>

Enabling the caching of the registers which is used for voltage
controls. By doing this, the modify_bits operation is faster as
it does not involve the i2c register read from device, just read
from cache. This results faster set voltage operation.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/regulator/tps65910-regulator.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 9092b7f..3731d69 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1123,6 +1123,18 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
 				pmic->desc[i].ops = &tps65911_ops;
 		}
 
+		/* Enable register caching */
+		tps65910_enable_reg_cache(tps65910, pmic->get_ctrl_reg(i));
+		/* VDD1/VDD2/VDDCTRL-TPS65911 have SR and OP register */
+		if ((i == TPS65910_REG_VDD1) || (i == TPS65910_REG_VDD2) ||
+			((tps65910_chip_id(tps65910) == TPS65911) &&
+				(i == TPS65911_REG_VDDCTRL))) {
+			tps65910_enable_reg_cache(tps65910,
+						pmic->get_ctrl_reg(i) + 1);
+			tps65910_enable_reg_cache(tps65910,
+						pmic->get_ctrl_reg(i) + 2);
+		}
+
 		err = tps65910_set_ext_sleep_config(pmic, i,
 				pmic_plat_data->regulator_ext_sleep_control[i]);
 		/*
-- 
1.7.1.1


  reply	other threads:[~2012-02-08 10:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 10:46 [PATCH V1 1/2] mfd: tps65910: use regmap for device register access Laxman Dewangan
2012-02-08 10:46 ` Laxman Dewangan [this message]
2012-02-08 11:41 ` Mark Brown
2012-02-08 12:15   ` Laxman Dewangan
2012-02-08 13:07     ` Mark Brown
2012-02-08 13:34       ` Laxman Dewangan
2012-02-08 13:58         ` Mark Brown
2012-02-09  5:03           ` Laxman Dewangan
2012-02-09 11:55             ` Mark Brown
2012-02-09 11:59               ` Laxman Dewangan
2012-02-09 12:03                 ` Mark Brown
2012-02-09 12:09                   ` Laxman Dewangan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328697985-22504-2-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gg@slimlogic.co.uk \
    --cc=jedu@slimlogic.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome