linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] counter/ti-eqep: Fix regmap max_register
@ 2020-10-25 16:51 David Lechner
  2020-11-01 17:18 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: David Lechner @ 2020-10-25 16:51 UTC (permalink / raw)
  To: linux-iio; +Cc: David Lechner, William Breathitt Gray, linux-kernel

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: f213729f6796 ("counter: new TI eQEP driver")
Signed-off-by: David Lechner <david@lechnology.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---

v2 changes:
* add Fixes: tag
* picked up Acked-by:

 drivers/counter/ti-eqep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c
index 1ff07faef27f..5d6470968d2c 100644
--- a/drivers/counter/ti-eqep.c
+++ b/drivers/counter/ti-eqep.c
@@ -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)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] counter/ti-eqep: Fix regmap max_register
  2020-10-25 16:51 [PATCH v2] counter/ti-eqep: Fix regmap max_register David Lechner
@ 2020-11-01 17:18 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2020-11-01 17:18 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-iio, William Breathitt Gray, linux-kernel

On Sun, 25 Oct 2020 11:51:22 -0500
David Lechner <david@lechnology.com> wrote:

> 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: f213729f6796 ("counter: new TI eQEP driver")
> Signed-off-by: David Lechner <david@lechnology.com>
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

> ---
> 
> v2 changes:
> * add Fixes: tag
> * picked up Acked-by:
> 
>  drivers/counter/ti-eqep.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c
> index 1ff07faef27f..5d6470968d2c 100644
> --- a/drivers/counter/ti-eqep.c
> +++ b/drivers/counter/ti-eqep.c
> @@ -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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-01 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25 16:51 [PATCH v2] counter/ti-eqep: Fix regmap max_register David Lechner
2020-11-01 17:18 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).