Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7a98255 authored by Kyungmin Park's avatar Kyungmin Park Committed by Kukjin Kim
Browse files

ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support



S5PV310 and S5PC210 support more I2C devices than previous SoCs.
Add the device support code for them.

Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 8a3710df
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -736,6 +736,7 @@ config ARCH_S5PV310
	select HAVE_CLK
	select GENERIC_CLOCKEVENTS
	select HAVE_S3C_RTC
	select HAVE_S3C2410_I2C
	select HAVE_S3C2410_WATCHDOG
	help
	  Samsung S5PV310 series based systems
+25 −0
Original line number Diff line number Diff line
@@ -24,6 +24,31 @@ config S5PV310_SETUP_I2C2
	help
	  Common setup code for i2c bus 2.

config S5PV310_SETUP_I2C3
	bool
	help
	  Common setup code for i2c bus 3.

config S5PV310_SETUP_I2C4
	bool
	help
	  Common setup code for i2c bus 4.

config S5PV310_SETUP_I2C5
	bool
	help
	  Common setup code for i2c bus 5.

config S5PV310_SETUP_I2C6
	bool
	help
	  Common setup code for i2c bus 6.

config S5PV310_SETUP_I2C7
	bool
	help
	  Common setup code for i2c bus 7.

config S5PV310_SETUP_SDHCI
	bool
	select S5PV310_SETUP_SDHCI_GPIO
+5 −0
Original line number Diff line number Diff line
@@ -29,5 +29,10 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o

obj-$(CONFIG_S5PV310_SETUP_I2C1)	+= setup-i2c1.o
obj-$(CONFIG_S5PV310_SETUP_I2C2)	+= setup-i2c2.o
obj-$(CONFIG_S5PV310_SETUP_I2C3)	+= setup-i2c3.o
obj-$(CONFIG_S5PV310_SETUP_I2C4)	+= setup-i2c4.o
obj-$(CONFIG_S5PV310_SETUP_I2C5)	+= setup-i2c5.o
obj-$(CONFIG_S5PV310_SETUP_I2C6)	+= setup-i2c6.o
obj-$(CONFIG_S5PV310_SETUP_I2C7)	+= setup-i2c7.o
obj-$(CONFIG_S5PV310_SETUP_SDHCI)	+= setup-sdhci.o
obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
+23 −0
Original line number Diff line number Diff line
/*
 * linux/arch/arm/mach-s5pv310/setup-i2c3.c
 *
 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 *
 * I2C3 GPIO configuration.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
*/

struct platform_device; /* don't need the contents */

#include <linux/gpio.h>
#include <plat/iic.h>
#include <plat/gpio-cfg.h>

void s3c_i2c3_cfg_gpio(struct platform_device *dev)
{
	s3c_gpio_cfgall_range(S5PV310_GPA1(2), 2,
			      S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
}
+23 −0
Original line number Diff line number Diff line
/*
 * linux/arch/arm/mach-s5pv310/setup-i2c4.c
 *
 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 *
 * I2C4 GPIO configuration.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
*/

struct platform_device; /* don't need the contents */

#include <linux/gpio.h>
#include <plat/iic.h>
#include <plat/gpio-cfg.h>

void s3c_i2c4_cfg_gpio(struct platform_device *dev)
{
	s3c_gpio_cfgall_range(S5PV310_GPB(2), 2,
			      S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
}
Loading