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