Using Regmap register access functions
Remap register access methods handle data parsing, formatting, and transmission. In most cases, device accesses are performed with regmap_read()
, regmap_write()
, and regmap_update_bits()
, which are the three important APIs when it comes to writing/reading data into/from the device. Their respective prototypes are the following:
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); int regmap_update_bits(struct regmap *map, unsigned int reg, unsigned int mask, ...