* [RESEND PATCH] Input: tsc2007 - Read "ti,poll-period" as u32
@ 2026-08-31 19:43 Rob Herring (Arm)
2026-08-31 19:51 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring (Arm) @ 2026-08-31 19:43 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
The "ti,poll-period" property is documented as a normal uint32 cell.
The driver used a u64 helper, which makes the helper type disagree with
the schema even though the stored value is still small.
Read "ti,poll-period" with the u32 helper matching the documented DT
cell size.
Assisted-by: Codex:gpt-5-5
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
drivers/input/touchscreen/tsc2007_core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
index e4d7da0f4434..e2f49b37e18c 100644
--- a/drivers/input/touchscreen/tsc2007_core.c
+++ b/drivers/input/touchscreen/tsc2007_core.c
@@ -221,7 +221,6 @@ static int tsc2007_get_pendown_state_gpio(struct device *dev)
static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
{
u32 val32;
- u64 val64;
if (!device_property_read_u32(dev, "ti,max-rt", &val32))
ts->max_rt = val32;
@@ -237,8 +236,8 @@ static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
if (!device_property_read_u32(dev, "ti,fuzzz", &val32))
ts->fuzzz = val32;
- if (!device_property_read_u64(dev, "ti,poll-period", &val64))
- ts->poll_period = msecs_to_jiffies(val64);
+ if (!device_property_read_u32(dev, "ti,poll-period", &val32))
+ ts->poll_period = msecs_to_jiffies(val32);
else
ts->poll_period = msecs_to_jiffies(1);
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RESEND PATCH] Input: tsc2007 - Read "ti,poll-period" as u32
2026-08-31 19:43 [RESEND PATCH] Input: tsc2007 - Read "ti,poll-period" as u32 Rob Herring (Arm)
@ 2026-08-31 19:51 ` Dmitry Torokhov
2026-08-31 23:18 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2026-08-31 19:51 UTC (permalink / raw)
To: Rob Herring (Arm); +Cc: linux-input, linux-kernel
Hi Rob,
On Mon, Aug 31, 2026 at 02:43:51PM -0500, Rob Herring (Arm) wrote:
> The "ti,poll-period" property is documented as a normal uint32 cell.
> The driver used a u64 helper, which makes the helper type disagree with
> the schema even though the stored value is still small.
>
> Read "ti,poll-period" with the u32 helper matching the documented DT
> cell size.
>
> Assisted-by: Codex:gpt-5-5
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/input/touchscreen/tsc2007_core.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
> index e4d7da0f4434..e2f49b37e18c 100644
> --- a/drivers/input/touchscreen/tsc2007_core.c
> +++ b/drivers/input/touchscreen/tsc2007_core.c
> @@ -221,7 +221,6 @@ static int tsc2007_get_pendown_state_gpio(struct device *dev)
> static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
> {
> u32 val32;
> - u64 val64;
>
> if (!device_property_read_u32(dev, "ti,max-rt", &val32))
> ts->max_rt = val32;
> @@ -237,8 +236,8 @@ static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
> if (!device_property_read_u32(dev, "ti,fuzzz", &val32))
> ts->fuzzz = val32;
>
> - if (!device_property_read_u64(dev, "ti,poll-period", &val64))
> - ts->poll_period = msecs_to_jiffies(val64);
> + if (!device_property_read_u32(dev, "ti,poll-period", &val32))
Do we need to handle -EOVERFLOW and keep compatibility with device trees
that used /64/ to match driver implementation? Or we expect that there
were/are none?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RESEND PATCH] Input: tsc2007 - Read "ti,poll-period" as u32
2026-08-31 19:51 ` Dmitry Torokhov
@ 2026-08-31 23:18 ` Rob Herring
0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2026-08-31 23:18 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
On Mon, Aug 31, 2026 at 12:51:44PM -0700, Dmitry Torokhov wrote:
> Hi Rob,
>
> On Mon, Aug 31, 2026 at 02:43:51PM -0500, Rob Herring (Arm) wrote:
> > The "ti,poll-period" property is documented as a normal uint32 cell.
> > The driver used a u64 helper, which makes the helper type disagree with
> > the schema even though the stored value is still small.
> >
> > Read "ti,poll-period" with the u32 helper matching the documented DT
> > cell size.
> >
> > Assisted-by: Codex:gpt-5-5
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > ---
> > drivers/input/touchscreen/tsc2007_core.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
> > index e4d7da0f4434..e2f49b37e18c 100644
> > --- a/drivers/input/touchscreen/tsc2007_core.c
> > +++ b/drivers/input/touchscreen/tsc2007_core.c
> > @@ -221,7 +221,6 @@ static int tsc2007_get_pendown_state_gpio(struct device *dev)
> > static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
> > {
> > u32 val32;
> > - u64 val64;
> >
> > if (!device_property_read_u32(dev, "ti,max-rt", &val32))
> > ts->max_rt = val32;
> > @@ -237,8 +236,8 @@ static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
> > if (!device_property_read_u32(dev, "ti,fuzzz", &val32))
> > ts->fuzzz = val32;
> >
> > - if (!device_property_read_u64(dev, "ti,poll-period", &val64))
> > - ts->poll_period = msecs_to_jiffies(val64);
> > + if (!device_property_read_u32(dev, "ti,poll-period", &val32))
>
> Do we need to handle -EOVERFLOW and keep compatibility with device trees
> that used /64/ to match driver implementation? Or we expect that there
> were/are none?
I suspect there aren't any users. Nothing upstream for sure and there
never was. We could probably just delete the property.
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 23:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 19:43 [RESEND PATCH] Input: tsc2007 - Read "ti,poll-period" as u32 Rob Herring (Arm)
2026-08-31 19:51 ` Dmitry Torokhov
2026-08-31 23:18 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox