Skip to contentSkip to conversation

ISL6271A voltage regulator support.

PATCH New Marek Vasut 1 participant 3 messages Jun 7, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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 |  202 ++++++++++++++++++++++++++++++++
 3 files changed, 209 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 +202 -0

202 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 pxa/spitz: Add isl6271a voltage regulator

---
 arch/arm/mach-pxa/spitz.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/spitz.c +32 -0
index c1048a3..5767ceb 100644
@@ -26,6 +26,7 @@
 #include <linux/spi/corgi_lcd.h>
 #include <linux/mtd/sharpsl.h>
 #include <linux/input/matrix_keypad.h>
+#include <linux/regulator/machine.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -709,6 +710,34 @@ static struct platform_device sharpsl_rom_device = {
 	.dev.platform_data = &sharpsl_rom_data,
 };
 
+static struct regulator_consumer_supply isl6271a_consumers[] = {
+	{
+		.supply	= "vcc_core",
+	}
+};
+
+static struct regulator_init_data isl6271a_info[] = {
+	{
+		.constraints = {
+			.name		= "vcc_core range",
+			.min_uV		= 850000,
+			.max_uV		= 1600000,
+			.always_on	= 1,
+			.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+		},
+		.consumer_supplies	= isl6271_consumers,
+		.num_consumer_supplies	= ARRAY_SIZE(isl6271_consumers),
+	}
+};
+
+static struct i2c_board_info spitz_pi2c_board_info[] = {
+	{
+		.type		= "isl6271a",
+		.addr		= 0x1b,
+		.platform_data	= &isl6271_info,
+	},
+};
+
 static struct platform_device *devices[] __initdata = {
 	&spitzscoop_device,
 	&spitzkbd_device,
@@ -765,6 +794,9 @@ static void __init common_init(void)
 	pxa_set_ficp_info(&spitz_ficp_platform_data);
 	set_pxa_fb_info(&spitz_pxafb_info);
 	pxa_set_i2c_info(NULL);
+
+	pxa27x_set_i2c_power_info(NULL);
+	i2c_register_board_info(1, ARRAY_AND_SIZE(spitz_pi2c_board_info));
 }
 
 #if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI)
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 pxa/spitz: Add isl6271a voltage regulator

Dne Po 7. ?ervna 2010 07:27:53 Marek Vasut napsal(a):

Quoted 35 lines
---
 arch/arm/mach-pxa/spitz.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/spitz.c +15 -0
index c1048a3..5767ceb 100644
@@ -26,6 +26,7 @@
 #include <linux/spi/corgi_lcd.h>
 #include <linux/mtd/sharpsl.h>
 #include <linux/input/matrix_keypad.h>
+#include <linux/regulator/machine.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -709,6 +710,34 @@ static struct platform_device sharpsl_rom_device = {
 	.dev.platform_data = &sharpsl_rom_data,
 };
 
+static struct regulator_consumer_supply isl6271a_consumers[] = {
+	{
+		.supply	= "vcc_core",
+	}
+};
+
+static struct regulator_init_data isl6271a_info[] = {
+	{
+		.constraints = {
+			.name		= "vcc_core range",
+			.min_uV		= 850000,
+			.max_uV		= 1600000,
+			.always_on	= 1,
+			.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,

arch/arm/mach-pxa/spitz.c static struct platform_device sharpsl_rom_device = { · line 736

Quoted 10 lines
arch/arm/mach-pxa/spitz.c +10 -0
+		},
+		.consumer_supplies	= isl6271_consumers,
+		.num_consumer_supplies	= ARRAY_SIZE(isl6271_consumers),
+	}
+};
+
+static struct i2c_board_info spitz_pi2c_board_info[] = {
+	{
+		.type		= "isl6271a",
+		.addr		= 0x1b,

btw. also change this -- i2c_detect will tell you what address the chip have if you don't know it yet.

Quoted 17 lines
arch/arm/mach-pxa/spitz.c +7 -0
+		.platform_data	= &isl6271_info,
+	},
+};
+
 static struct platform_device *devices[] __initdata = {
 	&spitzscoop_device,
 	&spitzkbd_device,
@@ -765,6 +794,9 @@ static void __init common_init(void)
 	pxa_set_ficp_info(&spitz_ficp_platform_data);
 	set_pxa_fb_info(&spitz_pxafb_info);
 	pxa_set_i2c_info(NULL);
+
+	pxa27x_set_i2c_power_info(NULL);
+	i2c_register_board_info(1, ARRAY_AND_SIZE(spitz_pi2c_board_info));
 }
 
 #if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI)