pinctrl: intel: Retain HOSTSW_OWN for requested gpio pin
authorChris Chiu <chiu@endlessm.com>
Mon, 15 Apr 2019 05:53:58 +0000 (13:53 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 28 Apr 2019 17:10:06 +0000 (20:10 +0300)
commita0a5f7661e1c49de0c1f93ca435ba2880b88fc5c
tree3cdb50aba3acdf274eef8bcc27afaf277b02735e
parent2fef32766861c6e171f436ab99c89198cf0ca6e1
pinctrl: intel: Retain HOSTSW_OWN for requested gpio pin

The touchpad of the ASUS laptops E403NA, X540NA, X541NA are not
responsive after suspend/resume. The following error message
shows after resume.
 i2c_hid i2c-ELAN1200:00: failed to reset device.

On these laptops, the touchpad interrupt is connected via a GPIO
pin which is controlled by Intel pinctrl. After system resumes,
the GPIO is in ACPI mode and no longer works as an IRQ.

This commit saves the HOSTSW_OWN value during suspend, make sure
the HOSTSW_OWN mode remains the same after resume.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pinctrl/intel/pinctrl-intel.c