linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: iqs7222 - avoid enabling unused interrupts
@ 2025-08-18  0:20 Jeff LaBundy
  2025-08-18  1:00 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff LaBundy @ 2025-08-18  0:20 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, jeff

If a proximity event node is defined so as to specify the wake-up
properties of the touch surface, the proximity event interrupt is
enabled unconditionally. This may result in unwanted interrupts.

Solve this problem by enabling the interrupt only if the event is
mapped to a key or switch code.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
---
 drivers/input/misc/iqs7222.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c
index 80b917944b51..ea26f85b9e9e 100644
--- a/drivers/input/misc/iqs7222.c
+++ b/drivers/input/misc/iqs7222.c
@@ -2424,6 +2424,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,
 		if (error)
 			return error;
 
+		if (!iqs7222->kp_type[chan_index][i])
+			continue;
+
 		if (!dev_desc->event_offset)
 			continue;
 
-- 
2.34.1


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

* Re: [PATCH] Input: iqs7222 - avoid enabling unused interrupts
  2025-08-18  0:20 [PATCH] Input: iqs7222 - avoid enabling unused interrupts Jeff LaBundy
@ 2025-08-18  1:00 ` Dmitry Torokhov
  2025-08-24 15:26   ` Jeff LaBundy
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2025-08-18  1:00 UTC (permalink / raw)
  To: Jeff LaBundy; +Cc: linux-input

Hi Jeff,

On Sun, Aug 17, 2025 at 07:20:22PM -0500, Jeff LaBundy wrote:
> If a proximity event node is defined so as to specify the wake-up
> properties of the touch surface, the proximity event interrupt is
> enabled unconditionally. This may result in unwanted interrupts.
> 
> Solve this problem by enabling the interrupt only if the event is
> mapped to a key or switch code.

Should I tag this for stable?

> 
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
> ---
>  drivers/input/misc/iqs7222.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c
> index 80b917944b51..ea26f85b9e9e 100644
> --- a/drivers/input/misc/iqs7222.c
> +++ b/drivers/input/misc/iqs7222.c
> @@ -2424,6 +2424,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,
>  		if (error)
>  			return error;
>  
> +		if (!iqs7222->kp_type[chan_index][i])
> +			continue;
> +
>  		if (!dev_desc->event_offset)
>  			continue;
>  

Thanks.

-- 
Dmitry

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

* Re: [PATCH] Input: iqs7222 - avoid enabling unused interrupts
  2025-08-18  1:00 ` Dmitry Torokhov
@ 2025-08-24 15:26   ` Jeff LaBundy
  2025-09-04 12:27     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff LaBundy @ 2025-08-24 15:26 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

Hi Dmitry,

On Sun, Aug 17, 2025 at 06:00:46PM -0700, Dmitry Torokhov wrote:
> Hi Jeff,
> 
> On Sun, Aug 17, 2025 at 07:20:22PM -0500, Jeff LaBundy wrote:
> > If a proximity event node is defined so as to specify the wake-up
> > properties of the touch surface, the proximity event interrupt is
> > enabled unconditionally. This may result in unwanted interrupts.
> > 
> > Solve this problem by enabling the interrupt only if the event is
> > mapped to a key or switch code.
> 
> Should I tag this for stable?

Thank you for checking; I'm sorry for the delayed response. Yes, I
think it's fine to tag this for stable.

I didn't CC stable@ originally because I saw this patch as more of
an optimization than a bug fix, but it's low risk enough that it's
fine to include in stable kernels too.

> 
> > 
> > Signed-off-by: Jeff LaBundy <jeff@labundy.com>
> > ---
> >  drivers/input/misc/iqs7222.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c
> > index 80b917944b51..ea26f85b9e9e 100644
> > --- a/drivers/input/misc/iqs7222.c
> > +++ b/drivers/input/misc/iqs7222.c
> > @@ -2424,6 +2424,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,
> >  		if (error)
> >  			return error;
> >  
> > +		if (!iqs7222->kp_type[chan_index][i])
> > +			continue;
> > +
> >  		if (!dev_desc->event_offset)
> >  			continue;
> >  
> 
> Thanks.
> 
> -- 
> Dmitry

Kind regards,
Jeff LaBundy

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

* Re: [PATCH] Input: iqs7222 - avoid enabling unused interrupts
  2025-08-24 15:26   ` Jeff LaBundy
@ 2025-09-04 12:27     ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2025-09-04 12:27 UTC (permalink / raw)
  To: Jeff LaBundy; +Cc: linux-input

On Sun, Aug 24, 2025 at 10:26:42AM -0500, Jeff LaBundy wrote:
> Hi Dmitry,
> 
> On Sun, Aug 17, 2025 at 06:00:46PM -0700, Dmitry Torokhov wrote:
> > Hi Jeff,
> > 
> > On Sun, Aug 17, 2025 at 07:20:22PM -0500, Jeff LaBundy wrote:
> > > If a proximity event node is defined so as to specify the wake-up
> > > properties of the touch surface, the proximity event interrupt is
> > > enabled unconditionally. This may result in unwanted interrupts.
> > > 
> > > Solve this problem by enabling the interrupt only if the event is
> > > mapped to a key or switch code.
> > 
> > Should I tag this for stable?
> 
> Thank you for checking; I'm sorry for the delayed response. Yes, I
> think it's fine to tag this for stable.
> 
> I didn't CC stable@ originally because I saw this patch as more of
> an optimization than a bug fix, but it's low risk enough that it's
> fine to include in stable kernels too.

Applied, thank you.

-- 
Dmitry

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

end of thread, other threads:[~2025-09-04 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  0:20 [PATCH] Input: iqs7222 - avoid enabling unused interrupts Jeff LaBundy
2025-08-18  1:00 ` Dmitry Torokhov
2025-08-24 15:26   ` Jeff LaBundy
2025-09-04 12:27     ` Dmitry Torokhov

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).