i2c-s3c2410: Use platform data for gpio configuration

Add a callback to set the gpio configuration for the
i2c device instead of a set include. This also allows
the remvoal of the machine gpio and hardware files.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Ben Dooks 8be310a6 3d0911bf

+3 -8
+3 -8
drivers/i2c/busses/i2c-s3c2410.c
··· 35 35 #include <linux/clk.h> 36 36 #include <linux/cpufreq.h> 37 37 38 - #include <mach/hardware.h> 39 38 #include <asm/irq.h> 40 39 #include <asm/io.h> 41 40 42 - #include <mach/regs-gpio.h> 43 41 #include <asm/plat-s3c/regs-iic.h> 44 42 #include <asm/plat-s3c/iic.h> 45 43 ··· 487 489 msleep(1); 488 490 } 489 491 490 - dev_dbg(i2c->dev, "timeout: GPEDAT is %08x\n", 491 - __raw_readl(S3C2410_GPEDAT)); 492 - 493 492 return -ETIMEDOUT; 494 493 } 495 494 ··· 778 783 779 784 /* get the plafrom data */ 780 785 781 - pdata = s3c24xx_i2c_get_platformdata(i2c->adap.dev.parent); 786 + pdata = s3c24xx_i2c_get_platformdata(i2c->dev); 782 787 783 788 /* inititalise the gpio */ 784 789 785 - s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_IICSDA); 786 - s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_IICSCL); 790 + if (pdata->cfg_gpio) 791 + pdata->cfg_gpio(to_platform_device(i2c->dev)); 787 792 788 793 /* write slave address */ 789 794