From: Carlos Eduardo Aguiar Date: Thu, 20 Dec 2007 15:03:51 +0000 (-0400) Subject: ARCH: OMAP: Rename i2c functions on MMC multislot support code for Siemens SX1. X-Git-Tag: v2.6.24-omap1~69 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=51d1e1edd883aac1345d758ea4e727131b296812;p=linux-2.6-omap-h63xx.git ARCH: OMAP: Rename i2c functions on MMC multislot support code for Siemens SX1. This patch rename i2c functions so that they don't conflict with generic stuff and also removes unnecessary __init on include/asm-arm/arch-omap/board-sx1.h Signed-off-by: Carlos Eduardo Aguiar Signed-off-by: Felipe Balbi Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c index 45c2fbb50de..8c93d47719e 100644 --- a/arch/arm/mach-omap1/board-sx1-mmc.c +++ b/arch/arm/mach-omap1/board-sx1-mmc.c @@ -36,7 +36,7 @@ static int sx1_mmc_set_power(struct device *dev, int slot, int power_on, return -ENODEV; } - err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); + err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); if (err < 0) return err; @@ -45,7 +45,7 @@ static int sx1_mmc_set_power(struct device *dev, int slot, int power_on, else dat &= ~SOFIA_MMC_POWER; - return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); + return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); } static int sx1_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index b95c03eed19..30024a54392 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -45,7 +45,7 @@ #include /* Write to I2C device */ -int i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) +int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) { struct i2c_adapter *adap; int err; @@ -68,7 +68,7 @@ int i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) } /* Read from I2C device */ -int i2c_read_byte(u8 devaddr, u8 regoffset, u8 * value) +int sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value) { struct i2c_adapter *adap; int err; @@ -102,38 +102,40 @@ int sx1_setkeylight(u8 keylight) { if (keylight > SOFIA_MAX_LIGHT_VAL) keylight = SOFIA_MAX_LIGHT_VAL; - return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight); + return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight); } /* get current keylight intensity */ int sx1_getkeylight(u8 * keylight) { - return i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight); + return sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_KEYLIGHT_REG, keylight); } /* set LCD backlight intensity */ int sx1_setbacklight(u8 backlight) { if (backlight > SOFIA_MAX_LIGHT_VAL) backlight = SOFIA_MAX_LIGHT_VAL; - return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, backlight); + return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, + backlight); } /* get current LCD backlight intensity */ int sx1_getbacklight (u8 * backlight) { - return i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, backlight); + return sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_BACKLIGHT_REG, + backlight); } /* set LCD backlight power on/off */ int sx1_setmmipower(u8 onoff) { int err; u8 dat = 0; - err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); + err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); if (err < 0) return err; if (onoff) dat |= SOFIA_MMILIGHT_POWER; else dat &= ~SOFIA_MMILIGHT_POWER; - return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); + return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); } /* set USB power on/off */ @@ -141,14 +143,14 @@ int sx1_setusbpower(u8 onoff) { int err; u8 dat = 0; - err = i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); + err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); if (err < 0) return err; if (onoff) dat |= SOFIA_USB_POWER; else dat &= ~SOFIA_USB_POWER; - return i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); + return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); } EXPORT_SYMBOL(sx1_setkeylight); diff --git a/include/asm-arm/arch-omap/board-sx1.h b/include/asm-arm/arch-omap/board-sx1.h index 7773c26fc7e..355adbdaae3 100644 --- a/include/asm-arm/arch-omap/board-sx1.h +++ b/include/asm-arm/arch-omap/board-sx1.h @@ -41,13 +41,12 @@ int sx1_getkeylight(u8 *keylight); int sx1_setmmipower(u8 onoff); int sx1_setusbpower(u8 onoff); - -int i2c_write_byte(u8 devaddr, u8 regoffset, u8 value); -int i2c_read_byte(u8 devaddr, u8 regoffset, u8 * value); +int sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value); +int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value); /* MMC prototypes */ -extern void __init sx1_mmc_init(void); +extern void sx1_mmc_init(void); extern void sx1_mmc_slot_cover_handler(void *arg, int state); #endif /* __ASM_ARCH_SX1_I2C_CHIPS_H */