1
0
Fork 0

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>
hifive-unleashed-5.1
Laxman Dewangan 2013-09-20 18:00:10 +05:30 committed by Mark Brown
parent 272b98c645
commit 6112fe60ac
1 changed files with 2 additions and 0 deletions

View File

@ -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