Skip to content

Commit 1bac533

Browse files
dlechgregkh
authored andcommitted
counter:ti-eqep: remove floor
commit 49a9565 upstream. 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: 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/20201214000927.1793062-1-david@lechnology.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 855b115 commit 1bac533

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

‎drivers/counter/ti-eqep.c‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -235,36 +235,6 @@ static ssize_t ti_eqep_position_ceiling_write(struct counter_device *counter,
235235
return len;
236236
}
237237

238-
static ssize_t ti_eqep_position_floor_read(struct counter_device *counter,
239-
struct counter_count *count,
240-
void *ext_priv, char *buf)
241-
{
242-
struct ti_eqep_cnt *priv = counter->priv;
243-
u32 qposinit;
244-
245-
regmap_read(priv->regmap32, QPOSINIT, &qposinit);
246-
247-
return sprintf(buf, "%u\n", qposinit);
248-
}
249-
250-
static ssize_t ti_eqep_position_floor_write(struct counter_device *counter,
251-
struct counter_count *count,
252-
void *ext_priv, const char *buf,
253-
size_t len)
254-
{
255-
struct ti_eqep_cnt *priv = counter->priv;
256-
int err;
257-
u32 res;
258-
259-
err = kstrtouint(buf, 0, &res);
260-
if (err < 0)
261-
return err;
262-
263-
regmap_write(priv->regmap32, QPOSINIT, res);
264-
265-
return len;
266-
}
267-
268238
static ssize_t ti_eqep_position_enable_read(struct counter_device *counter,
269239
struct counter_count *count,
270240
void *ext_priv, char *buf)
@@ -301,11 +271,6 @@ static struct counter_count_ext ti_eqep_position_ext[] = {
301271
.read = ti_eqep_position_ceiling_read,
302272
.write = ti_eqep_position_ceiling_write,
303273
},
304-
{
305-
.name = "floor",
306-
.read = ti_eqep_position_floor_read,
307-
.write = ti_eqep_position_floor_write,
308-
},
309274
{
310275
.name = "enable",
311276
.read = ti_eqep_position_enable_read,

0 commit comments

Comments
 (0)