[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X9dQeKy/Ol4d+3iM@shinobu>
Date: Mon, 14 Dec 2020 06:46:00 -0500
From: William Breathitt Gray <vilhelm.gray@...il.com>
To: David Lechner <david@...hnology.com>
Cc: linux-iio@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] counter:ti-eqep: remove floor
On Sun, Dec 13, 2020 at 06:09:27PM -0600, David Lechner wrote:
> The hardware doesn't support this. QPOSINIT is an initialization value
> that is triggered by other things. When the counter overflows, it
> always wraps around to zero.
>
> Fixes: f213729f6796 "counter: new TI eQEP driver"
> Signed-off-by: David Lechner <david@...hnology.com>
Is the QPOSINIT preprocessor define needed at all anymore, or should it also be
removed?
Acked-by: William Breathitt Gray <vilhelm.gray@...il.com>
> ---
> drivers/counter/ti-eqep.c | 35 -----------------------------------
> 1 file changed, 35 deletions(-)
>
> diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c
> index a60aee1a1a29..65df9ef5b5bc 100644
> --- a/drivers/counter/ti-eqep.c
> +++ b/drivers/counter/ti-eqep.c
> @@ -235,36 +235,6 @@ static ssize_t ti_eqep_position_ceiling_write(struct counter_device *counter,
> return len;
> }
>
> -static ssize_t ti_eqep_position_floor_read(struct counter_device *counter,
> - struct counter_count *count,
> - void *ext_priv, char *buf)
> -{
> - struct ti_eqep_cnt *priv = counter->priv;
> - u32 qposinit;
> -
> - regmap_read(priv->regmap32, QPOSINIT, &qposinit);
> -
> - return sprintf(buf, "%u\n", qposinit);
> -}
> -
> -static ssize_t ti_eqep_position_floor_write(struct counter_device *counter,
> - struct counter_count *count,
> - void *ext_priv, const char *buf,
> - size_t len)
> -{
> - struct ti_eqep_cnt *priv = counter->priv;
> - int err;
> - u32 res;
> -
> - err = kstrtouint(buf, 0, &res);
> - if (err < 0)
> - return err;
> -
> - regmap_write(priv->regmap32, QPOSINIT, res);
> -
> - return len;
> -}
> -
> static ssize_t ti_eqep_position_enable_read(struct counter_device *counter,
> struct counter_count *count,
> void *ext_priv, char *buf)
> @@ -301,11 +271,6 @@ static struct counter_count_ext ti_eqep_position_ext[] = {
> .read = ti_eqep_position_ceiling_read,
> .write = ti_eqep_position_ceiling_write,
> },
> - {
> - .name = "floor",
> - .read = ti_eqep_position_floor_read,
> - .write = ti_eqep_position_floor_write,
> - },
> {
> .name = "enable",
> .read = ti_eqep_position_enable_read,
> --
> 2.25.1
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists