*/
int twl4030_i2c_write_u8(u8 mod_no, u8 value, u8 reg)
{
- int ret;
/* 2 bytes offset 1 contains the data offset 0 is used by i2c_write */
u8 temp_buffer[2] = { 0 };
/* offset 1 contains the data */
temp_buffer[1] = value;
- ret = twl4030_i2c_write(mod_no, temp_buffer, reg, 1);
- return ret;
+ return twl4030_i2c_write(mod_no, temp_buffer, reg, 1);
}
/**
*/
int twl4030_i2c_read_u8(u8 mod_no, u8 * value, u8 reg)
{
- int ret = 0;
-
- ret = twl4030_i2c_read(mod_no, value, reg, 1);
- return ret;
+ return twl4030_i2c_read(mod_no, value, reg, 1);
}
/* Helper Functions */
static int gpio_write_isr(unsigned int isr)
{
- int ret;
-
isr &= GPIO_32_MASK;
/*
* The buffer passed to the twl4030_i2c_write() routine must have an
*/
isr <<= 8;
isr = cpu_to_le32(isr);
- ret = twl4030_i2c_write(TWL4030_MODULE_GPIO, (u8 *) &isr,
+ return twl4030_i2c_write(TWL4030_MODULE_GPIO, (u8 *) &isr,
REG_GPIO_ISR1A, 3);
- return ret;
}
static int gpio_write_imr(unsigned int imr)
{
- int ret;
-
imr &= GPIO_32_MASK;
/*
* The buffer passed to the twl4030_i2c_write() routine must have an
*/
imr <<= 8;
imr = cpu_to_le32(imr);
- ret = twl4030_i2c_write(TWL4030_MODULE_GPIO, (u8 *) &imr,
+ return twl4030_i2c_write(TWL4030_MODULE_GPIO, (u8 *) &imr,
REG_GPIO_IMR1A, 3);
- return ret;
}
/*