Skip to content

Commit 271b339

Browse files
dlechjic23
authored andcommitted
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: f213729 ("counter: new TI eQEP driver") Signed-off-by: David Lechner <david@lechnology.com> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20201025165122.607866-1-david@lechnology.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 695e2f5 commit 271b339

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/counter/ti-eqep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,15 @@ static const struct regmap_config ti_eqep_regmap32_config = {
368368
.reg_bits = 32,
369369
.val_bits = 32,
370370
.reg_stride = 4,
371-
.max_register = 0x24,
371+
.max_register = QUPRD,
372372
};
373373

374374
static const struct regmap_config ti_eqep_regmap16_config = {
375375
.name = "16-bit",
376376
.reg_bits = 16,
377377
.val_bits = 16,
378378
.reg_stride = 2,
379-
.max_register = 0x1e,
379+
.max_register = QCPRDLAT,
380380
};
381381

382382
static int ti_eqep_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)