mfd: Use regmap for tps65910 register access.

Using regmap apis for accessing the device registers and
using RBTREE caching mechanims for caching registers.

Enabling caching of the registers which is used for voltage
controls. By doing this, the modify_bits operation is faster as
it does not involve the i2c register read from device, just read
from cache. This results faster set voltage operation.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Laxman Dewangan
2012-02-21 18:21:34 +05:30
committed by Samuel Ortiz
parent 2853378b6e
commit dc9913a050
3 changed files with 48 additions and 77 deletions

View File

@@ -789,6 +789,7 @@ struct tps65910_board {
struct tps65910 {
struct device *dev;
struct i2c_client *i2c_client;
struct regmap *regmap;
struct mutex io_mutex;
unsigned int id;
int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest);