Commit 271b3392 authored by David Lechner's avatar David Lechner Committed by Jonathan Cameron

counter/ti-eqep: Fix regmap max_register

The values given were the offset of the register after the last
register instead of the actual last register in each range. Fix
by using the correct last register of each range.

Fixes: f213729f ("counter: new TI eQEP driver")
Signed-off-by: default avatarDavid Lechner <david@lechnology.com>
Acked-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/20201025165122.607866-1-david@lechnology.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 695e2f5c
......@@ -368,7 +368,7 @@ static const struct regmap_config ti_eqep_regmap32_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
.max_register = 0x24,
.max_register = QUPRD,
};
static const struct regmap_config ti_eqep_regmap16_config = {
......@@ -376,7 +376,7 @@ static const struct regmap_config ti_eqep_regmap16_config = {
.reg_bits = 16,
.val_bits = 16,
.reg_stride = 2,
.max_register = 0x1e,
.max_register = QCPRDLAT,
};
static int ti_eqep_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment