]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARCH: OMAP: Rename i2c functions on MMC multislot support code for Siemens SX1.
authorCarlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Thu, 20 Dec 2007 15:03:51 +0000 (11:03 -0400)
committerTony Lindgren <tony@atomide.com>
Tue, 15 Jan 2008 01:27:14 +0000 (17:27 -0800)
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 <carlos.aguiar@indt.org.br>
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-sx1-mmc.c
arch/arm/mach-omap1/board-sx1.c
include/asm-arm/arch-omap/board-sx1.h

index 45c2fbb50dea1b711252e9cdd419e80754c3c9f7..8c93d47719e872fe3c88becb983386b482c51753 100644 (file)
@@ -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)
index b95c03eed19f516bab699caa4327e586f0b6638b..30024a543920a957be7fabbd58950b116165fe71 100644 (file)
@@ -45,7 +45,7 @@
 #include <asm/arch/keypad.h>
 
 /* 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);
index 7773c26fc7e83245f3fdebe0b9f6cc182f2ff811..355adbdaae33cf9bc1edec68e7f3f836fa3846c0 100644 (file)
@@ -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 */