ARM: EXYNOS: Support I2C for EXYNOS5250 SoC
Subsystems (3)
PATCH 2/2 ARM: EXYNOS: Support I2C for EXYNOS5250 SoC
Signed-off-by Huisung Kang <[email protected]>
--- arch/arm/mach-exynos/setup-i2c0.c | 4 ++-- arch/arm/mach-exynos/setup-i2c1.c | 13 +++++++++---- arch/arm/mach-exynos/setup-i2c2.c | 13 +++++++++---- arch/arm/mach-exynos/setup-i2c3.c | 13 +++++++++---- arch/arm/mach-exynos/setup-i2c4.c | 10 ++++++---- arch/arm/mach-exynos/setup-i2c5.c | 9 ++++++--- arch/arm/mach-exynos/setup-i2c6.c | 13 +++++++++---- arch/arm/mach-exynos/setup-i2c7.c | 13 +++++++++---- 8 files changed, 59 insertions(+), 29 deletions(-)
arch/arm/mach-exynos/setup-i2c0.c +2 -2
@@ -23,8 +23,8 @@ struct platform_device; /* don't need the contents */void s3c_i2c0_cfg_gpio (struct platform_device *dev) {if (soc_is_exynos5250 ()) - ; -/* will be implemented with gpio function */ +s3c_gpio_cfgall_range (EXYNOS5_GPB3 (0 ),2 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP );else s3c_gpio_cfgall_range (EXYNOS4_GPD1 (0 ),2 ,S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP );
arch/arm/mach-exynos/setup-i2c1.c +9 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c1.c +* linux/arch/arm/mach-exynos/setup-i2c1.c * -* Copyright (C) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C1 GPIO configuration. *
@@ -15,9 +15,14 @@ struct platform_device; /* don't need the contents */#include <linux/gpio.h> #include <plat/iic.h> #include <plat/gpio-cfg.h> +#include <plat/cpu.h> void s3c_i2c1_cfg_gpio (struct platform_device *dev) { -s3c_gpio_cfgall_range (EXYNOS4_GPD1 (2 ),2 , -S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +if (soc_is_exynos5250 ()) +s3c_gpio_cfgall_range (EXYNOS5_GPB3 (2 ),2 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS4_GPD1 (2 ),2 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c2.c +9 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c2.c +* linux/arch/arm/mach-exynos/setup-i2c2.c * -* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2009-2012 Samsung Electronics Co., Ltd. * * I2C2 GPIO configuration. *
@@ -15,9 +15,14 @@ struct platform_device; /* don't need the contents */#include <linux/gpio.h> #include <plat/iic.h> #include <plat/gpio-cfg.h> +#include <plat/cpu.h> void s3c_i2c2_cfg_gpio (struct platform_device *dev) { -s3c_gpio_cfgall_range (EXYNOS4_GPA0 (6 ),2 , -S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +if (soc_is_exynos5250 ()) +s3c_gpio_cfgall_range (EXYNOS5_GPA0 (6 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS4_GPA0 (6 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c3.c +9 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c3.c +* linux/arch/arm/mach-exynos/setup-i2c3.c * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C3 GPIO configuration. *
@@ -15,9 +15,14 @@ struct platform_device; /* don't need the contents */#include <linux/gpio.h> #include <plat/iic.h> #include <plat/gpio-cfg.h> +#include <plat/cpu.h> void s3c_i2c3_cfg_gpio (struct platform_device *dev) { -s3c_gpio_cfgall_range (EXYNOS4_GPA1 (2 ),2 , -S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +if (soc_is_exynos5250 ()) +s3c_gpio_cfgall_range (EXYNOS5_GPA1 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS4_GPA1 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c4.c +6 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c4.c +* linux/arch/arm/mach-exynos/setup-i2c4.c * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C4 GPIO configuration. *
@@ -22,8 +22,10 @@ void s3c_i2c4_cfg_gpio(struct platform_device *dev)if (soc_is_exynos4210 ())s3c_gpio_cfgall_range (EXYNOS4_GPB (2 ),2 ,S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); -else +else if (soc_is_exynos4212 () ||soc_is_exynos4412 ())s3c_gpio_cfgall_range (EXYNOS4_GPB (0 ),2 ,S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); - +else +s3c_gpio_cfgall_range (EXYNOS5_GPA2 (0 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c5.c +6 -3
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c5.c +* linux/arch/arm/mach-exynos/setup-i2c5.c * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C5 GPIO configuration. *
@@ -22,7 +22,10 @@ void s3c_i2c5_cfg_gpio(struct platform_device *dev)if (soc_is_exynos4210 ())s3c_gpio_cfgall_range (EXYNOS4_GPB (6 ),2 ,S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); -else +else if (soc_is_exynos4212 () ||soc_is_exynos4412 ())s3c_gpio_cfgall_range (EXYNOS4_GPB (2 ),2 ,S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS5_GPA2 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c6.c +9 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c6.c +* linux/arch/arm/mach-exynos/setup-i2c6.c * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C6 GPIO configuration. *
@@ -15,9 +15,14 @@ struct platform_device; /* don't need the contents */#include <linux/gpio.h> #include <plat/iic.h> #include <plat/gpio-cfg.h> +#include <plat/cpu.h> void s3c_i2c6_cfg_gpio (struct platform_device *dev) { -s3c_gpio_cfgall_range (EXYNOS4_GPC1 (3 ),2 , -S3C_GPIO_SFN (4 ),S3C_GPIO_PULL_UP ); +if (soc_is_exynos5250 ()) +s3c_gpio_cfgall_range (EXYNOS5_GPB1 (3 ),2 , +S3C_GPIO_SFN (4 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS4_GPC1 (3 ),2 , +S3C_GPIO_SFN (4 ),S3C_GPIO_PULL_UP ); }
arch/arm/mach-exynos/setup-i2c7.c +9 -4
@@ -1,7 +1,7 @@/* -* linux/arch/arm/mach-exynos4/setup-i2c7.c +* linux/arch/arm/mach-exynos/setup-i2c7.c * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. * * I2C7 GPIO configuration. *
@@ -15,9 +15,14 @@ struct platform_device; /* don't need the contents */#include <linux/gpio.h> #include <plat/iic.h> #include <plat/gpio-cfg.h> +#include <plat/cpu.h> void s3c_i2c7_cfg_gpio (struct platform_device *dev) { -s3c_gpio_cfgall_range (EXYNOS4_GPD0 (2 ),2 , -S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +if (soc_is_exynos5250 ()) +s3c_gpio_cfgall_range (EXYNOS5_GPB2 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +else +s3c_gpio_cfgall_range (EXYNOS4_GPD0 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); }
Signature · 1 line
1.7.1