Re: [PATCH] regmap: flat: introduce register striding to save some memories

2015-12-14 Thread Mark Brown
On Mon, Dec 14, 2015 at 03:14:34PM +0800, Xiubo Li wrote: > static int regcache_flat_write(struct regmap *map, unsigned int reg, > unsigned int value) > { > + unsigned int index = reg / map->reg_stride; So, this does save some memory. On the other hand one of

Re: [PATCH] regmap: flat: introduce register striding to save some memories

2015-12-14 Thread Mark Brown
On Mon, Dec 14, 2015 at 03:14:34PM +0800, Xiubo Li wrote: > static int regcache_flat_write(struct regmap *map, unsigned int reg, > unsigned int value) > { > + unsigned int index = reg / map->reg_stride; So, this does save some memory. On the other hand one of

[PATCH] regmap: flat: introduce register striding to save some memories

2015-12-13 Thread Xiubo Li
Throughout the regcache-flat code, for the flat cache array, the actual register address offsets are used to index the values, and this will waste some memory spaces. For example, on 64-BIT platform, device A has three registers: register offsets: {0x00, 0x08, 0x10} max_register: 0x10

[PATCH] regmap: flat: introduce register striding to save some memories

2015-12-13 Thread Xiubo Li
Throughout the regcache-flat code, for the flat cache array, the actual register address offsets are used to index the values, and this will waste some memory spaces. For example, on 64-BIT platform, device A has three registers: register offsets: {0x00, 0x08, 0x10} max_register: 0x10