aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-10-25 11:02:58 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2013-10-25 11:02:58 +0200
commit46a99d03f97e54d346a35bb8f0fa79ba73687ad0 (patch)
tree5e709b8ceacaa8af0b4b1d7f4ecf6484560fb9c7
parent501d609abe43894430eecee7f5e498607718b26b (diff)
parent6112fe60ac1bd1e68da8cc4248289d6e48015f9b (diff)
downloadmfd-next-46a99d03f97e54d346a35bb8f0fa79ba73687ad0.tar.gz
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.
-rw-r--r--include/linux/regmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index a10380bfbeac9..7d3ae2be6869e 100644
--- a/include/linux/regmap.h
+++ b/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