All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] input: silead: Disable interrupt during suspend
Date: Mon, 22 May 2017 17:21:39 -0700	[thread overview]
Message-ID: <20170523002139.GF12016@dtor-ws> (raw)
In-Reply-To: <20170519140642.31800-1-hdegoede@redhat.com>

Hi Hans,

On Fri, May 19, 2017 at 04:06:42PM +0200, Hans de Goede wrote:
> When we put the touchscreen controller in low-power mode the irq
> pin may trigger (float) and if we then try to read a data packet we
> get the following error in dmesg:
> 
> [  478.801017] silead_ts i2c-MSSL1680:00: Data read error -121
> 
> This commit disables the irq during suspend/resume fixing this error.

Out of curiosity, what interrupt type does silead device use on your
platform?

> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/input/touchscreen/silead.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
> index 9b36f2750b9f..52c878a20a92 100644
> --- a/drivers/input/touchscreen/silead.c
> +++ b/drivers/input/touchscreen/silead.c
> @@ -536,6 +536,7 @@ static int __maybe_unused silead_ts_suspend(struct device *dev)
>  {
>  	struct i2c_client *client = to_i2c_client(dev);
>  
> +	disable_irq(client->irq);
>  	silead_ts_set_power(client, SILEAD_POWER_OFF);
>  	return 0;
>  }
> @@ -561,6 +562,8 @@ static int __maybe_unused silead_ts_resume(struct device *dev)
>  		return -ENODEV;
>  	}
>  
> +	enable_irq(client->irq);
> +
>  	return 0;
>  }
>  
> -- 
> 2.12.2
> 

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-05-23  0:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 14:06 [PATCH] input: silead: Disable interrupt during suspend Hans de Goede
2017-05-23  0:21 ` Dmitry Torokhov [this message]
2017-05-23  6:47   ` Hans de Goede
2017-05-26 23:10 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170523002139.GF12016@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.