From: Hans de Goede <hidden> Date: 2017-05-07 21:49:19
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
From: Benjamin Tissoires <hidden> Date: 2017-05-09 07:12:38
Hi Hans,
On May 07 2017 or thereabouts, Hans de Goede wrote:
quoted hunk
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
@@ -960,6 +960,15 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,return0;}+staticvoidi2c_hid_acpi_fix_up_power(structdevice*dev)+{+acpi_handlehandle=ACPI_HANDLE(dev);+structacpi_device*adev;++if(handle&&acpi_bus_get_device(handle,&adev)==0)+acpi_device_fix_up_power(adev);
I am wondering if this is not something that should be handled by
acpi-core or i2c-core. Looks like something pretty generic.
Also, isn't this also needed on resume (or reset_resume)?
Cheers,
Benjamin
From: Hans de Goede <hidden> Date: 2017-05-09 07:21:06
Hi,
On 09-05-17 09:12, Benjamin Tissoires wrote:
Hi Hans,
On May 07 2017 or thereabouts, Hans de Goede wrote:
quoted
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Also, isn't this also needed on resume (or reset_resume)?
After a suspend the device is in D3, so we will always execute _PS0
to put it back in D0. This is about devices without a _PSC method
(which allows querying the actual state) being in D3 on boot, rather
then the expected (and assumed) D0. Note that for devices with a _PSC
method calling acpi_device_fix_up_power() is a nop.
Regards,
Hans
From: Benjamin Tissoires <hidden> Date: 2017-05-09 07:36:18
On May 09 2017 or thereabouts, Hans de Goede wrote:
Hi,
On 09-05-17 09:12, Benjamin Tissoires wrote:
quoted
Hi Hans,
On May 07 2017 or thereabouts, Hans de Goede wrote:
quoted
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Also, isn't this also needed on resume (or reset_resume)?
After a suspend the device is in D3, so we will always execute _PS0
to put it back in D0. This is about devices without a _PSC method
(which allows querying the actual state) being in D3 on boot, rather
then the expected (and assumed) D0. Note that for devices with a _PSC
method calling acpi_device_fix_up_power() is a nop.
Thanks for the extensive explanations.
Acked-by: Benjamin Tissoires <redacted>
Maybe we can add this to the commit message for future reference?
Cheers,
Benjamin
From: Hans de Goede <hidden> Date: 2017-05-09 08:03:13
Hi,
On 09-05-17 09:36, Benjamin Tissoires wrote:
On May 09 2017 or thereabouts, Hans de Goede wrote:
quoted
Hi,
On 09-05-17 09:12, Benjamin Tissoires wrote:
quoted
Hi Hans,
On May 07 2017 or thereabouts, Hans de Goede wrote:
quoted
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Also, isn't this also needed on resume (or reset_resume)?
After a suspend the device is in D3, so we will always execute _PS0
to put it back in D0. This is about devices without a _PSC method
(which allows querying the actual state) being in D3 on boot, rather
then the expected (and assumed) D0. Note that for devices with a _PSC
method calling acpi_device_fix_up_power() is a nop.
Thanks for the extensive explanations.
Acked-by: Benjamin Tissoires <redacted>
Thank you.
Maybe we can add this to the commit message for future reference?
Ok, I'm about to send a v2 with an improved commit msg:
"For ACPI devices which do not have a _PSC method, the ACPI subsys cannot
query their initial state at boot, so these devices are assumed to have
been put in D0 by the BIOS, but for touchscreens that is not always true.
This commit adds a call to acpi_device_fix_up_power to explicitly put
devices without a _PSC method into D0 state (for devices with a _PSC
method it is a nop). Note we only need to do this on probe, after a
resume the ACPI subsys knows the device is in D3 and will properly
put it in D0.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error."
Regards,
Hans
From: Benjamin Tissoires <hidden> Date: 2017-05-09 08:57:54
On May 09 2017 or thereabouts, Hans de Goede wrote:
Hi,
On 09-05-17 09:36, Benjamin Tissoires wrote:
quoted
On May 09 2017 or thereabouts, Hans de Goede wrote:
quoted
Hi,
On 09-05-17 09:12, Benjamin Tissoires wrote:
quoted
Hi Hans,
On May 07 2017 or thereabouts, Hans de Goede wrote:
quoted
ACPI devices which do not have a _PSC method are assumed to have been
put in D0 by the BIOS, but for touchscreens that is not always true,
so call acpi_device_fix_up_power to explicitly put devices without a
_PSC method into D0 state.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error.
Signed-off-by: Hans de Goede <redacted>
---
drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Also, isn't this also needed on resume (or reset_resume)?
After a suspend the device is in D3, so we will always execute _PS0
to put it back in D0. This is about devices without a _PSC method
(which allows querying the actual state) being in D3 on boot, rather
then the expected (and assumed) D0. Note that for devices with a _PSC
method calling acpi_device_fix_up_power() is a nop.
Thanks for the extensive explanations.
Acked-by: Benjamin Tissoires <redacted>
Thank you.
quoted
Maybe we can add this to the commit message for future reference?
Ok, I'm about to send a v2 with an improved commit msg:
"For ACPI devices which do not have a _PSC method, the ACPI subsys cannot
query their initial state at boot, so these devices are assumed to have
been put in D0 by the BIOS, but for touchscreens that is not always true.
This commit adds a call to acpi_device_fix_up_power to explicitly put
devices without a _PSC method into D0 state (for devices with a _PSC
method it is a nop). Note we only need to do this on probe, after a
resume the ACPI subsys knows the device is in D3 and will properly
put it in D0.
This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1
device failing to probe with a "hid_descr_cmd failed" error."
Works for me.
Thanks for the quick respin.
Cheers,
Benjamin