Messages in this thread |  | | | From | Venu Byravarasu <> | | Date | Tue, 13 Mar 2012 11:05:01 +0530 | | Subject | RE: [RESEND PATCH 1/2] MFD: MAX77693: add MAX77693 MFD driver |
| |
Why don't you make use of regmap for all i2c read/ write operations?
> +int max77693_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest) > +{ > + struct max77693_dev *max77693 = i2c_get_clientdata(i2c); > + int ret; > + > + mutex_lock(&max77693->iolock); > + ret = i2c_smbus_read_byte_data(i2c, reg); > + mutex_unlock(&max77693->iolock); > + if (ret < 0) > + return ret; > + > + ret &= 0xff; > + *dest = ret; > + return 0; > +} > +EXPORT_SYMBOL_GPL(max77693_read_reg); > +
|  |