]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: intel: Fix 2 kOhm bias which is 833 Ohm
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 Oct 2020 10:46:37 +0000 (13:46 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 26 Oct 2020 11:26:49 +0000 (13:26 +0200)
commit4d10451a56e837e79b54207c4292696c6af8847e
treeab8d0b48561007bf52d814f102141c36f7752163
parent68ed2672b8fdb9454c449f573990714135c93adc
pinctrl: intel: Fix 2 kOhm bias which is 833 Ohm

2 kOhm bias was never an option in Intel GPIO hardware, the available
matrix is:

000 none
001 1 kOhm (if available)
010 5 kOhm
100 20 kOhm

As easy to get the 3 resistors are gated separately and according to
parallel circuits calculations we may get combinations of the above where
the result is always strictly less than minimal resistance. Hence,
additional values can be:

011 ~833.3 Ohm
101 ~952.4 Ohm
110 ~4 kOhm
111 ~800 Ohm

That said, convert TERM definitions to be the bit masks to reflect the above.

While at it, enable the same setting for pull down case.

Fixes: 587f4f3422ef ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
Cc: Jamie McClymont <jamie@kwiius.com>
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