Skip to content

Commit 49a9565

Browse files
dlechjic23
authored andcommitted
counter:ti-eqep: remove floor
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 <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent cf5b138 commit 49a9565

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

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)