* [PATCH] input: silead: Disable interrupt during suspend
@ 2017-05-19 14:06 Hans de Goede
2017-05-23 0:21 ` Dmitry Torokhov
2017-05-26 23:10 ` Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2017-05-19 14:06 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Hans de Goede, linux-input
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.
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] input: silead: Disable interrupt during suspend
2017-05-19 14:06 [PATCH] input: silead: Disable interrupt during suspend Hans de Goede
@ 2017-05-23 0:21 ` Dmitry Torokhov
2017-05-23 6:47 ` Hans de Goede
2017-05-26 23:10 ` Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2017-05-23 0:21 UTC (permalink / raw)
To: Hans de Goede; +Cc: linux-input
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] input: silead: Disable interrupt during suspend
2017-05-23 0:21 ` Dmitry Torokhov
@ 2017-05-23 6:47 ` Hans de Goede
0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2017-05-23 6:47 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
Hi,
On 23-05-17 02:21, Dmitry Torokhov wrote:
> 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?
On the tablet where I was seeing this problem the irq is declared as:
GpioInt (Edge, ActiveHigh, Shared, PullDefault, 0x0000,
In the DSDT.
Regards,
Hans
>
>>
>> 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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] input: silead: Disable interrupt during suspend
2017-05-19 14:06 [PATCH] input: silead: Disable interrupt during suspend Hans de Goede
2017-05-23 0:21 ` Dmitry Torokhov
@ 2017-05-26 23:10 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-05-26 23:10 UTC (permalink / raw)
To: Hans de Goede; +Cc: linux-input
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.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thank you.
> ---
> 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
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-26 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-19 14:06 [PATCH] input: silead: Disable interrupt during suspend Hans de Goede
2017-05-23 0:21 ` Dmitry Torokhov
2017-05-23 6:47 ` Hans de Goede
2017-05-26 23:10 ` 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).