Browse Source

Merge tag 'range-macro' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

regmap: Helper macro for defining register ranges

A helper macro to make it a bit neater to define register ranges.
Samuel Ortiz 11 years ago
parent
commit
46a99d03f9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      include/linux/regmap.h

+ 2 - 0
include/linux/regmap.h

@@ -70,6 +70,8 @@ struct regmap_range {
 	unsigned int range_max;
 };
 
+#define regmap_reg_range(low, high) { .range_min = low, .range_max = high, }
+
 /*
  * A table of ranges including some yes ranges and some no ranges.
  * If a register belongs to a no_range, the corresponding check function