mfd: tps65910: use regmap for device register access.
PATCH v2 1/1 mfd: tps65910: use regmap for device 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.
---
The orginal change was pushed into two patches
[PATCH V1 1/2] mfd: tps65910: use regmap for device register access. [PATCH V1 2/2] regulator: tps65910: Enable register caching of voltage controls. where it was suggested to enable caching in mfd core driver only and so it does not require second patch.
Changes from V1:
- Enable caching in the core driver itself.
- Remove changes from regulator driver.
drivers/mfd/Kconfig | 1 + drivers/mfd/tps65910.c | 123 ++++++++++++++++-------------------------- include/linux/mfd/tps65910.h | 1 + 3 files changed, 48 insertions(+), 77 deletions(-)
drivers/mfd/Kconfig +1 -0
@@ -162,6 +162,7 @@ config MFD_TPS65910 depends on I2C=y && GPIOLIB select MFD_CORE select GPIO_TPS65910 + select REGMAP_I2C help if you say yes here you get support for the TPS65910 series of Power Management chips.
drivers/mfd/tps65910.c +46 -77
173 lines not on this page · raw message
include/linux/mfd/tps65910.h +1 -0
@@ -805,6 +805,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);
Signature · 1 line
1.7.1.1
Quoted 2 lines · Laxman Dewangan
Using regmap apis for accessing the device registers and using RBTREE caching mechanims for caching registers.