|
@@ -642,3 +642,114 @@ void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd)
|
|
|
{
|
|
|
struct s3c2410_platform_i2c *npd;
|
|
|
|
|
|
+ if (!pd) {
|
|
|
+ pd = &default_i2c_data;
|
|
|
+ pd->bus_num = 5;
|
|
|
+ }
|
|
|
+
|
|
|
+ npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
|
|
+ &s3c_device_i2c5);
|
|
|
+
|
|
|
+ if (!npd->cfg_gpio)
|
|
|
+ npd->cfg_gpio = s3c_i2c5_cfg_gpio;
|
|
|
+}
|
|
|
+#endif /*CONFIG_S3C_DEV_I2C5 */
|
|
|
+
|
|
|
+#ifdef CONFIG_S3C_DEV_I2C6
|
|
|
+static struct resource s3c_i2c6_resource[] = {
|
|
|
+ [0] = DEFINE_RES_MEM(S3C_PA_IIC6, SZ_4K),
|
|
|
+ [1] = DEFINE_RES_IRQ(IRQ_IIC6),
|
|
|
+};
|
|
|
+
|
|
|
+struct platform_device s3c_device_i2c6 = {
|
|
|
+ .name = "s3c2440-i2c",
|
|
|
+ .id = 6,
|
|
|
+ .num_resources = ARRAY_SIZE(s3c_i2c6_resource),
|
|
|
+ .resource = s3c_i2c6_resource,
|
|
|
+};
|
|
|
+
|
|
|
+void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
|
|
|
+{
|
|
|
+ struct s3c2410_platform_i2c *npd;
|
|
|
+
|
|
|
+ if (!pd) {
|
|
|
+ pd = &default_i2c_data;
|
|
|
+ pd->bus_num = 6;
|
|
|
+ }
|
|
|
+
|
|
|
+ npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
|
|
+ &s3c_device_i2c6);
|
|
|
+
|
|
|
+ if (!npd->cfg_gpio)
|
|
|
+ npd->cfg_gpio = s3c_i2c6_cfg_gpio;
|
|
|
+}
|
|
|
+#endif /* CONFIG_S3C_DEV_I2C6 */
|
|
|
+
|
|
|
+#ifdef CONFIG_S3C_DEV_I2C7
|
|
|
+static struct resource s3c_i2c7_resource[] = {
|
|
|
+ [0] = DEFINE_RES_MEM(S3C_PA_IIC7, SZ_4K),
|
|
|
+ [1] = DEFINE_RES_IRQ(IRQ_IIC7),
|
|
|
+};
|
|
|
+
|
|
|
+struct platform_device s3c_device_i2c7 = {
|
|
|
+ .name = "s3c2440-i2c",
|
|
|
+ .id = 7,
|
|
|
+ .num_resources = ARRAY_SIZE(s3c_i2c7_resource),
|
|
|
+ .resource = s3c_i2c7_resource,
|
|
|
+};
|
|
|
+
|
|
|
+void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
|
|
|
+{
|
|
|
+ struct s3c2410_platform_i2c *npd;
|
|
|
+
|
|
|
+ if (!pd) {
|
|
|
+ pd = &default_i2c_data;
|
|
|
+ pd->bus_num = 7;
|
|
|
+ }
|
|
|
+
|
|
|
+ npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
|
|
+ &s3c_device_i2c7);
|
|
|
+
|
|
|
+ if (!npd->cfg_gpio)
|
|
|
+ npd->cfg_gpio = s3c_i2c7_cfg_gpio;
|
|
|
+}
|
|
|
+#endif /* CONFIG_S3C_DEV_I2C7 */
|
|
|
+
|
|
|
+/* I2C HDMIPHY */
|
|
|
+
|
|
|
+#ifdef CONFIG_S5P_DEV_I2C_HDMIPHY
|
|
|
+static struct resource s5p_i2c_resource[] = {
|
|
|
+ [0] = DEFINE_RES_MEM(S5P_PA_IIC_HDMIPHY, SZ_4K),
|
|
|
+ [1] = DEFINE_RES_IRQ(IRQ_IIC_HDMIPHY),
|
|
|
+};
|
|
|
+
|
|
|
+struct platform_device s5p_device_i2c_hdmiphy = {
|
|
|
+ .name = "s3c2440-hdmiphy-i2c",
|
|
|
+ .id = -1,
|
|
|
+ .num_resources = ARRAY_SIZE(s5p_i2c_resource),
|
|
|
+ .resource = s5p_i2c_resource,
|
|
|
+};
|
|
|
+
|
|
|
+void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
|
|
|
+{
|
|
|
+ struct s3c2410_platform_i2c *npd;
|
|
|
+
|
|
|
+ if (!pd) {
|
|
|
+ pd = &default_i2c_data;
|
|
|
+
|
|
|
+ if (soc_is_exynos4210() ||
|
|
|
+ soc_is_exynos4212() || soc_is_exynos4412())
|
|
|
+ pd->bus_num = 8;
|
|
|
+ else if (soc_is_s5pv210())
|
|
|
+ pd->bus_num = 3;
|
|
|
+ else
|
|
|
+ pd->bus_num = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
|
|
+ &s5p_device_i2c_hdmiphy);
|
|
|
+}
|
|
|
+
|
|
|
+static struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
|
|
|
+
|
|
|
+void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
|