October 2017
Intermediate to advanced
586 pages
14h 8m
English
The API handles data parsing, formatting, and transmission. In most cases, device access is performed with regmap_read, regmap_write, and regmap_update_bits. These are the three most important functions you should always remember when it comes to storing/fetching data into/from the device. Their respective prototypes are:
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, unsigned int val);