regmap: introduce tables for readable/writeable/volatile/precious checks
Many of the regmap enabled drivers implementing one or more of the readable, writeable, volatile and precious methods use the same code pattern: return ((reg >= X && reg <= Y) || (reg >= W && reg <= Z) || ...) Switch to a data driven approach, using tables to describe readable/writeable/volatile and precious registers ranges instead. The table based check can still be overridden by passing the usual function pointers via struct regmap_config. Signed-off-by: NDavide Ciminaghi <ciminaghi@gnudd.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Showing
想要评论请 注册 或 登录