All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Liam Girdwood <lrg@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org,
	Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [PATCH 3/3] regulator: tps65023: Added support for the similiar TPS65020 chip
Date: Wed, 27 Jul 2011 12:32:47 +0200	[thread overview]
Message-ID: <1311762767-20263-4-git-send-email-marcus.folkesson@gmail.com> (raw)
In-Reply-To: <1311762767-20263-1-git-send-email-marcus.folkesson@gmail.com>

Defines a new voltage-table and allows registering of the tps65020 device.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/regulator/tps65023-regulator.c |   63 ++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 5cc7344..a4c0583 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -103,8 +103,26 @@ static const u16 VCORE_VSEL_table[] = {
 	1500, 1525, 1550, 1600,
 };
 
+/* Supported voltage values for LDO regulators for tps65020 */
+static const u16 TPS65020_LDO1_VSEL_table[] = {
+	1000, 1050, 1100, 1300,
+	1800, 2500, 3000, 3300,
+};
+
+static const u16 TPS65020_LDO2_VSEL_table[] = {
+	1000, 1050, 1100, 1300,
+	1800, 2500, 3000, 3300,
+};
 
 
+static unsigned int tps65020_num_voltages[] = {
+				0,
+				0,
+				ARRAY_SIZE(VCORE_VSEL_table),
+				ARRAY_SIZE(TPS65020_LDO1_VSEL_table),
+				ARRAY_SIZE(TPS65020_LDO2_VSEL_table)
+};
+
 /* Supported voltage values for LDO regulators
  * for tps65021 and tps65023 */
 static const u16 TPS65023_LDO1_VSEL_table[] = {
@@ -553,6 +571,43 @@ static int __devexit tps_65023_remove(struct i2c_client *client)
 	return 0;
 }
 
+static const struct tps_info tps65020_regs[] = {
+	{
+		.name = "VDCDC1",
+		.min_uV = 3300000,
+		.max_uV = 3300000,
+		.fixed	= 1,
+	},
+	{
+		.name = "VDCDC2",
+		.min_uV =  1800000,
+		.max_uV = 1800000,
+		.fixed = 1,
+	},
+	{
+		.name = "VDCDC3",
+		.min_uV =  800000,
+		.max_uV = 1600000,
+		.table_len = ARRAY_SIZE(VCORE_VSEL_table),
+		.table = VCORE_VSEL_table,
+	},
+
+	{
+		.name = "LDO1",
+		.min_uV = 1000000,
+		.max_uV = 3150000,
+		.table_len = ARRAY_SIZE(TPS65020_LDO1_VSEL_table),
+		.table = TPS65020_LDO1_VSEL_table,
+	},
+	{
+		.name = "LDO2",
+		.min_uV = 1050000,
+		.max_uV = 3300000,
+		.table_len = ARRAY_SIZE(TPS65020_LDO2_VSEL_table),
+		.table = TPS65020_LDO2_VSEL_table,
+	},
+};
+
 static const struct tps_info tps65021_regs[] = {
 	{
 		.name = "VDCDC1",
@@ -625,6 +680,12 @@ static const struct tps_info tps65023_regs[] = {
 	},
 };
 
+static struct tps_driver_data tps65020_drv_data = {
+		.info = (struct tps_info *) tps65020_regs,
+		.core_regulator = TPS65023_DCDC_3,
+		.num_voltages = tps65020_num_voltages,
+};
+
 static struct tps_driver_data tps65021_drv_data = {
 		.info = (struct tps_info *) tps65021_regs,
 		.core_regulator = TPS65023_DCDC_3,
@@ -642,6 +703,8 @@ static const struct i2c_device_id tps_65023_id[] = {
 	.driver_data = (unsigned long) &tps65023_drv_data},
 	{.name = "tps65021",
 	.driver_data = (unsigned long) &tps65021_drv_data,},
+	{.name = "tps65020",
+	.driver_data = (unsigned long) &tps65020_drv_data},
 	{ },
 };
 
-- 
1.7.4.1


  parent reply	other threads:[~2011-07-27 10:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 10:32 [PATCH 0/3] regulator: tps65023: TPS65020 support and bug fixes Marcus Folkesson
2011-07-27 10:32 ` [PATCH 1/3] regulator: tps65023: Fixes i2c configuration issues Marcus Folkesson
2011-07-27 11:09   ` Mark Brown
2011-07-27 10:32 ` [PATCH 2/3] regulator: tps65023: Setting correct core regulator for tps65021 Marcus Folkesson
2011-07-27 11:07   ` Mark Brown
2011-07-27 18:12     ` Marcus Folkesson
2011-07-29 12:33   ` Mark Brown
2011-07-29 19:59     ` Marcus Folkesson
2011-08-01  6:14       ` Mark Brown
2011-07-27 10:32 ` Marcus Folkesson [this message]
2011-07-29 12:34   ` [PATCH 3/3] regulator: tps65023: Added support for the similiar TPS65020 chip Mark Brown
2011-07-29 13:08     ` Marcus Folkesson
2011-07-29 14:03       ` Mark Brown
2011-07-29 20:02         ` Marcus Folkesson

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=1311762767-20263-4-git-send-email-marcus.folkesson@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.