Skip to contentSkip to conversation

ISL6271A voltage regulator support.

PATCH Superseded Marek Vasut 2 participants 6 messages Jun 12, 2010 – Jun 13, 2010

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ISL6271A voltage regulator support.

This device is very simple, it supports only one LDO. This single LDO is programmed over I2C to 16 possible voltages.

---
 drivers/regulator/Kconfig              |    6 +
 drivers/regulator/Makefile             |    1 +
 drivers/regulator/isl6271a-regulator.c |  199 ++++++++++++++++++++++++++++++++
 3 files changed, 206 insertions(+), 0 deletions(-)
 create mode 100644 drivers/regulator/isl6271a-regulator.c
drivers/regulator/Kconfig +6 -0
index 04f2e08..6772ca7 100644
@@ -201,5 +201,11 @@ config REGULATOR_88PM8607
 	help
 	  This driver supports 88PM8607 voltage regulator chips.
 
+config REGULATOR_ISL6271A
+	tristate "Intersil ISL6271A Power regulator"
+	depends on I2C
+	help
+	  This driver supports ISL6271A voltage regulator chip.
+
 endif
 
drivers/regulator/Makefile +1 -0
index 4e7feec..e2191bf 100644
@@ -31,5 +31,6 @@ obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
 obj-$(CONFIG_REGULATOR_TPS65023) += tps65023-regulator.o
 obj-$(CONFIG_REGULATOR_TPS6507X) += tps6507x-regulator.o
 obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o
+obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
 
 ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
drivers/regulator/isl6271a-regulator.c new file +199 -0

199 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/3 ARM/scoop: Add CPR register bit definitions

Add bit definitions of the CPR register of the SCOOP chip into scoop.h. Also, cleanup the GPCR definitions to match coding style.

---
 arch/arm/include/asm/hardware/scoop.h |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)
arch/arm/include/asm/hardware/scoop.h +17 -12
index 46492a6..ebb3cea 100644
@@ -22,18 +22,23 @@
 #define SCOOP_GPWR 0x24
 #define SCOOP_GPRR 0x28
 
-#define SCOOP_GPCR_PA22	( 1 << 12 )
-#define SCOOP_GPCR_PA21	( 1 << 11 )
-#define SCOOP_GPCR_PA20	( 1 << 10 )
-#define SCOOP_GPCR_PA19	( 1 << 9 )
-#define SCOOP_GPCR_PA18	( 1 << 8 )
-#define SCOOP_GPCR_PA17	( 1 << 7 )
-#define SCOOP_GPCR_PA16	( 1 << 6 )
-#define SCOOP_GPCR_PA15	( 1 << 5 )
-#define SCOOP_GPCR_PA14	( 1 << 4 )
-#define SCOOP_GPCR_PA13	( 1 << 3 )
-#define SCOOP_GPCR_PA12	( 1 << 2 )
-#define SCOOP_GPCR_PA11	( 1 << 1 )
+#define SCOOP_CPR_OUT	(1 << 7)
+#define SCOOP_CPR_SD_3V	(1 << 2)
+#define SCOOP_CPR_CF_XV	(1 << 1)
+#define SCOOP_CPR_CF_3V	(1 << 0)
+
+#define SCOOP_GPCR_PA22	(1 << 12)
+#define SCOOP_GPCR_PA21	(1 << 11)
+#define SCOOP_GPCR_PA20	(1 << 10)
+#define SCOOP_GPCR_PA19	(1 << 9)
+#define SCOOP_GPCR_PA18	(1 << 8)
+#define SCOOP_GPCR_PA17	(1 << 7)
+#define SCOOP_GPCR_PA16	(1 << 6)
+#define SCOOP_GPCR_PA15	(1 << 5)
+#define SCOOP_GPCR_PA14	(1 << 4)
+#define SCOOP_GPCR_PA13	(1 << 3)
+#define SCOOP_GPCR_PA12	(1 << 2)
+#define SCOOP_GPCR_PA11	(1 << 1)
 
 struct scoop_config {
 	unsigned short io_out;
Signature · 1 line
1.7.1
#2 lore raw

PATCH 3/3 pxa/spitz: Rework spitz

In reply to Marek Vasut

This huge patch mostly shuffles code. The spitz.c file contained terrible mess and needed a cleanup, here it is:

1) Made every part modular, components are not built in if not selected.
2) Removed loads of preprocessor goo, mostly "#ifdef MACH_AKITA .... #endif" and similar code. The kernel size will grow by a few kb now, but the file is much more readable.
3) Reworked SD/CF power setting function and made it reentrant.
4) Add ISL6271A regulator support
5) Correctly register WM8750

---
 arch/arm/mach-pxa/include/mach/spitz.h |    2 -
 arch/arm/mach-pxa/spitz.c              |  810 ++++++++++++++++++-------------
 2 files changed, 470 insertions(+), 342 deletions(-)
arch/arm/mach-pxa/include/mach/spitz.h +0 -2
index fa1998c..685749a 100644
@@ -185,7 +185,5 @@
 /*
  * Shared data structures
  */
-extern struct platform_device spitzscoop_device;
-extern struct platform_device spitzscoop2_device;
 extern struct platform_device spitzssp_device;
 extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
arch/arm/mach-pxa/spitz.c +470 -340

1,155 lines not on this page · raw message

Signature · 1 line
1.7.1
#3 lore raw

PATCH 1/3 ISL6271A voltage regulator support.

In reply to Marek Vasut
Quoted 2 lines · Marek Vasut

This device is very simple, it supports only one LDO. This single LDO is programmed over I2C to 16 possible voltages.

Google tells me that the device has three regulators on it - two LDOs and one DCDC buck convertor:

http://www.intersil.com/products/deviceinfo.asp?pn=ISL6271A

While the LDOs look like they have no software control it'd be best to provide hookup for them, even if that's just a case of instantiating the appropriate fixed voltage regulators.

drivers/regulator/isl6271a-regulator.c line 34

Quoted 9 lines
drivers/regulator/isl6271a-regulator.c new file +7 -0
+/* Supported voltage values for regulators */
+static const u32 core_buck_table[] = {
+	 850000,  900000,  950000, 1000000,
+	1050000, 1100000, 1150000, 1200000,
+	1250000, 1300000, 1350000, 1400000,
+	1450000, 1500000, 1550000, 1600000,
+};

This looks like it could be replaced with a simple function rather than a lookup table which would simplify the code.

Also, are you sure this is a buck? That's a specific technical term usually only applied to DCDC regulators - LDOs are a different type of regulator

drivers/regulator/isl6271a-regulator.c line 119

Quoted 12 lines
drivers/regulator/isl6271a-regulator.c new file +12 -0
+static int __devinit isl6271a_probe(struct i2c_client *client,
+				     const struct i2c_device_id *id)
+{
+	struct regulator_init_data *init_data	= client->dev.platform_data;
+	struct isl_pmic *pmic;
+	int err;
+
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+		return -EIO;
+
+	if (!init_data)
+		return -EIO;

It'd be better to print an error message here so users know what's going on when the device fails to appear.

#4 lore raw

PATCH 1/3 ISL6271A voltage regulator support.

Dne So 12. ?ervna 2010 19:21:14 Mark Brown napsal(a):

Quoted 12 lines · Marek Vasut
Quoted 2 lines

This device is very simple, it supports only one LDO. This single LDO is programmed over I2C to 16 possible voltages.

Google tells me that the device has three regulators on it - two LDOs and one DCDC buck convertor:

http://www.intersil.com/products/deviceinfo.asp?pn=ISL6271A

While the LDOs look like they have no software control it'd be best to provide hookup for them, even if that's just a case of instantiating the appropriate fixed voltage regulators.

Is this necessary? I'd only increase the kernel size without any gain ... or am I wrong ?

Quoted 13 lines

drivers/regulator/isl6271a-regulator.c line 34

Quoted 10 lines
drivers/regulator/isl6271a-regulator.c new file +7 -0
+/* Supported voltage values for regulators */
+static const u32 core_buck_table[] = {
+	 850000,  900000,  950000, 1000000,
+	1050000, 1100000, 1150000, 1200000,
+	1250000, 1300000, 1350000, 1400000,
+	1450000, 1500000, 1550000, 1600000,
+};

This looks like it could be replaced with a simple function rather than a lookup table which would simplify the code.

Will do.

Quoted 4 lines

Also, are you sure this is a buck? That's a specific technical term usually only applied to DCDC regulators - LDOs are a different type of regulator

That's what's written in the ISL6271a TRM. On the first page, under the "Features" section.

Quoted 16 lines

drivers/regulator/isl6271a-regulator.c line 119

Quoted 13 lines
drivers/regulator/isl6271a-regulator.c new file +8 -0
+static int __devinit isl6271a_probe(struct i2c_client *client,
+				     const struct i2c_device_id *id)
+{
+	struct regulator_init_data *init_data	= client->dev.platform_data;
+	struct isl_pmic *pmic;
+	int err;
+
+	if (!i2c_check_functionality(client->adapter,

I2C_FUNC_SMBUS_BYTE_DATA)) + return -EIO;

drivers/regulator/isl6271a-regulator.c new file +3 -0
+
+	if (!init_data)
+		return -EIO;

It'd be better to print an error message here so users know what's going on when the device fails to appear.

Ok.

Thanks!

#5 lore raw

PATCH 1/3 ISL6271A voltage regulator support.

Quoted 8 lines · Marek Vasut

Dne So 12. ?ervna 2010 19:21:14 Mark Brown napsal(a):

Quoted 7 lines · Marek Vasut
Quoted 2 lines

This device is very simple, it supports only one LDO. This single LDO is programmed over I2C to 16 possible voltages.

Google tells me that the device has three regulators on it - two LDOs and one DCDC buck convertor:

Quoted 8 lines
Quoted 5 lines

http://www.intersil.com/products/deviceinfo.asp?pn=ISL6271A

While the LDOs look like they have no software control it'd be best to provide hookup for them, even if that's just a case of instantiating the appropriate fixed voltage regulators.

Is this necessary? I'd only increase the kernel size without any gain ... or am I wrong ?

If devices are connected to the fixed supplies they still need to be told about the connection so they can interact well with the regulator API.

There's also the fact that your description of the device in the changelog is rather inaccurate - the device has three regulators, not just a single LDO, and the regulator that is software controllable is a DCDC buck convertor not a LDO.

Quoted 6 lines
Quoted 3 lines

Also, are you sure this is a buck? That's a specific technical term usually only applied to DCDC regulators - LDOs are a different type of regulator

That's what's written in the ISL6271a TRM. On the first page, under the "Features" section.

That says there is one buck and 2 LDOs and it rather looks like the software controllable regulator is the buck.