Skip to contentSkip to conversation

ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

PATCH Superseded Marek Szyprowski 4 participants 8 messages Feb 15, 2011 – Mar 5, 2011

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

PATCH 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

This patch adds basic definitions for MAX8952 & LP3974 (MAX8998 compatible) PMICs for UniversalC210 board. Power consumers for the device drivers will be added later. These two PMICs occupy I2C5 bus.

---
 arch/arm/mach-s5pv310/Kconfig               |    2 +
 arch/arm/mach-s5pv310/mach-universal_c210.c |  443 +++++++++++++++++++++++++++
 2 files changed, 445 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv310/Kconfig +2 -0
index b2a9acc..a8b0425 100644
@@ -102,7 +102,9 @@ config MACH_UNIVERSAL_C210
 	select S3C_DEV_HSMMC3
 	select S5PV310_SETUP_SDHCI
 	select S3C_DEV_I2C1
+	select S3C_DEV_I2C5
 	select S5PV310_SETUP_I2C1
+	select S5PV310_SETUP_I2C5
 	help
 	  Machine support for Samsung Mobile Universal S5PC210 Reference
 	  Board. S5PC210(MCP) is one of package option of S5PV310
arch/arm/mach-s5pv310/mach-universal_c210.c +443 -0

467 lines not on this page · raw message

Signature · 1 line
1.7.1.569.g6f426
#1 lore raw

PATCH 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

Quoted 2 lines · Marek Szyprowski

#include <mach/map.h>
+#include <mach/gpio.h>

Need I say anything about this?

#2 lore raw

PATCH v2 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

This patch adds basic definitions for MAX8952 & LP3974 (MAX8998 compatible) PMICs for UniversalC210 board. Power consumers for the device drivers will be added later. These two PMICs occupy I2C5 bus.

---
 arch/arm/mach-s5pv310/Kconfig               |    2 +
 arch/arm/mach-s5pv310/mach-universal_c210.c |  441 +++++++++++++++++++++++++++
 2 files changed, 443 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv310/Kconfig +2 -0
index b2a9acc..a8b0425 100644
@@ -102,7 +102,9 @@ config MACH_UNIVERSAL_C210
 	select S3C_DEV_HSMMC3
 	select S5PV310_SETUP_SDHCI
 	select S3C_DEV_I2C1
+	select S3C_DEV_I2C5
 	select S5PV310_SETUP_I2C1
+	select S5PV310_SETUP_I2C5
 	help
 	  Machine support for Samsung Mobile Universal S5PC210 Reference
 	  Board. S5PC210(MCP) is one of package option of S5PV310
arch/arm/mach-s5pv310/mach-universal_c210.c +441 -0

475 lines not on this page · raw message

Signature · 1 line
1.7.1.569.g6f426
#3 lore raw

PATCH v2 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

Quoted 5 lines · Marek Szyprowski

This patch adds basic definitions for MAX8952 & LP3974 (MAX8998 compatible) PMICs for UniversalC210 board. Power consumers for the device drivers will be added later. These two PMICs occupy I2C5 bus.

Hi Marek,

Could you please re-work this based on Exynos4?
And there are really small comments below :)

(snip)

arch/arm/mach-s5pv310/mach-universal_c210.c static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { · line 118

Quoted 10 lines
arch/arm/mach-s5pv310/mach-universal_c210.c +10 -0
+static struct regulator_init_data lp3974_buck1_data = {
+	.constraints	= {
+		.name		= "VINT_1.1V",
+		.min_uV		= 750000,
+		.max_uV		= 1500000,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE |
+			REGULATOR_CHANGE_STATUS,
+		.boot_on	= 1,
+		.state_mem	= {
+			.enabled = 0,
                                ^

Review

Quoted 1 line
(quoted diff) +1 -0
+			.disabled = 1,
                                 ^

Do we need "disabled" with "enabled"?

(snip)

arch/arm/mach-s5pv310/mach-universal_c210.c static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { · line 487

Quoted 8 lines
arch/arm/mach-s5pv310/mach-universal_c210.c +8 -0
+static struct max8998_platform_data universal_lp3974_pdata = {
+	.num_regulators		= ARRAY_SIZE(lp3974_regulators),
+	.regulators		= lp3974_regulators,
+	.buck1_voltage1		= 1100000,	/* INT */
+	.buck1_voltage2		= 1000000,
+	.buck1_voltage3		= 1100000,
+	.buck1_voltage4		= 1000000,
+	.buck1_set1             = S5PV310_GPX0(5),
                   ^^^^^^^^^^^^^

tab?

arch/arm/mach-s5pv310/mach-universal_c210.c static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { · line 488

Quoted 1 line
arch/arm/mach-s5pv310/mach-universal_c210.c +1 -0
+	.buck1_set2             = S5PV310_GPX0(6),
                   ^^^^^^^^^^^^^

same.

arch/arm/mach-s5pv310/mach-universal_c210.c static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { · line 492

Quoted 4 lines
arch/arm/mach-s5pv310/mach-universal_c210.c +4 -0
+	.buck2_voltage1		= 1200000,	/* G3D */
+	.buck2_voltage2		= 1100000,
+	.buck1_default_idx	= 0,
+	.buck2_set3             = S5PV310_GPE2(0),
                   ^^^^^^^^^^^^^

same.

Quoted 3 lines
arch/arm/mach-s5pv310/mach-universal_c210.c +3 -0
+	.buck2_default_idx	= 0,
+	.wakeup			= true,
+};

(snip)

arch/arm/mach-s5pv310/mach-universal_c210.c static void __init universal_machine_init(void) · line 665

Quoted 6 lines
arch/arm/mach-s5pv310/mach-universal_c210.c +2 -0
@@ -223,6 +661,9 @@ static void __init universal_machine_init(void)
 	i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
 	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
 
+	s3c_i2c5_set_platdata(NULL);
+	i2c_register_board_info(5, i2c_devs5, ARRAY_SIZE(i2c_devs5));

How about "i2c5_devs" like others?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw

PATCH v3 1/1 ARM: EXYNOS4: add support for i2c PMICs on Universal_C210 board

This patch adds basic definitions for MAX8952 & LP3974 (MAX8998 compatible) PMICs for UniversalC210 board. Power consumers for the device drivers will be added later. These two PMICs occupy I2C5 bus.

---
 arch/arm/mach-exynos4/Kconfig               |    2 +
 arch/arm/mach-exynos4/mach-universal_c210.c |  413 +++++++++++++++++++++++++++
 2 files changed, 415 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +2 -0
index ad03840..d58cbb5 100644
@@ -116,8 +116,10 @@ config MACH_UNIVERSAL_C210
 	select S3C_DEV_HSMMC2
 	select S3C_DEV_HSMMC3
 	select S3C_DEV_I2C1
+ 	select S3C_DEV_I2C5
 	select S5P_DEV_ONENAND
 	select EXYNOS4_SETUP_I2C1
+ 	select EXYNOS4_SETUP_I2C5
 	select EXYNOS4_SETUP_SDHCI
 	help
 	  Machine support for Samsung Mobile Universal S5PC210 Reference
arch/arm/mach-exynos4/mach-universal_c210.c +413 -0

445 lines not on this page · raw message

Signature · 1 line
1.7.1.569.g6f426
#5 lore raw

PATCH v3 1/1 ARM: EXYNOS4: add support for i2c PMICs on Universal_C210 board

Quoted 18 lines · Marek Szyprowski

This patch adds basic definitions for MAX8952 & LP3974 (MAX8998 compatible) PMICs for UniversalC210 board. Power consumers for the device drivers will be added later. These two PMICs occupy I2C5 bus.

---
 arch/arm/mach-exynos4/Kconfig               |    2 +
 arch/arm/mach-exynos4/mach-universal_c210.c |  413
+++++++++++++++++++++++++++
 2 files changed, 415 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +0 -0
index ad03840..d58cbb5 100644

arch/arm/mach-exynos4/Kconfig config MACH_UNIVERSAL_C210 · line 119

Quoted 4 lines
arch/arm/mach-exynos4/Kconfig +1 -0
@@ -116,8 +116,10 @@ config MACH_UNIVERSAL_C210
 	select S3C_DEV_HSMMC2
 	select S3C_DEV_HSMMC3
 	select S3C_DEV_I2C1
+ 	select S3C_DEV_I2C5

^
Used 1 white space + tab here.
As you know, just 1 tab is enough :)

arch/arm/mach-exynos4/Kconfig config MACH_UNIVERSAL_C210 · line 122

Quoted 3 lines
arch/arm/mach-exynos4/Kconfig +1 -0
 	select S5P_DEV_ONENAND
 	select EXYNOS4_SETUP_I2C1
+ 	select EXYNOS4_SETUP_I2C5

^
Same as above.

arch/arm/mach-exynos4/Kconfig config MACH_UNIVERSAL_C210 · line 125

Quoted 3 lines
arch/arm/mach-exynos4/Kconfig +0 -0
 	select EXYNOS4_SETUP_SDHCI
 	help
 	  Machine support for Samsung Mobile Universal S5PC210 Reference

Thanks for your re-working.
Ok, will apply with above fixing.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#6 lore raw

PATCH 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

In reply to Russell King - ARM Linux
Quoted 5 lines · Russell King - ARM Linux
Quoted 2 lines · Marek Szyprowski

?#include <mach/map.h>
+#include <mach/gpio.h>

Need I say anything about this?

Hi Russell,

How about to prevent it as compiler error? It's frequent mistake.

At each mach/gpio.h

#ifndef __LINUX_GPIO_H
#error "You should include <linux/gpio.h> instead of <mach/gpio.h>." #endif

Thank you,
Kyungmin Park

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html

#7 lore raw

PATCH 1/1 ARM: S5PC210: add support for i2c PMICs on Universal_C210 board

Quoted 10 lines · Kyungmin Park
Quoted 5 lines · Russell King - ARM Linux
Quoted 2 lines · Marek Szyprowski

?#include <mach/map.h>
+#include <mach/gpio.h>

Need I say anything about this?

Hi Russell,

Quoted 7 lines

How about to prevent it as compiler error? It's frequent mistake.

At each mach/gpio.h

#ifndef __LINUX_GPIO_H
#error "You should include <linux/gpio.h> instead of <mach/gpio.h>." #endif

It doesn't stop people including linux/gpio.h and then mach/gpio.h, which is also a common mistake. Besides, it's easy to catch when you have a regexp setup in your mail reader to find them...