提交 6112fe60 编写于 作者: L Laxman Dewangan 提交者: Mark Brown

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: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 272b98c6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册