summaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-09-20 18:00:10 +0530
committerMark Brown <broonie@linaro.org>2013-09-20 17:50:46 +0100
commit6112fe60ac1bd1e68da8cc4248289d6e48015f9b (patch)
tree71b9eb2ed44cda8d5f323bafaa2408b9215830ee /include/linux/regmap.h
parent272b98c6455f00884f0350f775c5342358ebb73f (diff)
regmap: add helper macro to set min/max range of register
Add helper macro to set the min and max value of the register range. This is useful when initialising the register ranges of the device like static const struct regmap_range readable_ranges[] = { regmap_reg_range(DEVICE_REG0, DEVICE_REG10), }; Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regmap.h')
-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 a10380bfbeac..7d3ae2be6869 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