]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: intel: Disable input and output buffer when switching to GPIO
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 12 Jun 2020 14:49:54 +0000 (17:49 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 22 Jun 2020 07:58:51 +0000 (10:58 +0300)
commit38838b81d13f9ceaea7e2027b9215019a9efc97b
tree0758b4957dee9f3b99420749b3e39f105d39418b
parente4db39fbaad924fea729ee1159af76f531bb0463
pinctrl: intel: Disable input and output buffer when switching to GPIO

It's possible scenario that pin has been in different mode, while
the respective GPIO register has a leftover output buffer enabled.
In such case when we request GPIO it will switch to GPIO mode, and
thus to output with unknown value, followed by switching to input
mode. This can produce a glitch on the pin.

Disable input and output buffer when switching to GPIO to avoid
potential glitches.

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