]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/bxt: use NULL for GPIO connection ID
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 17 Aug 2017 10:55:41 +0000 (13:55 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 21 Aug 2017 08:52:29 +0000 (11:52 +0300)
commite216892f8c6d1e9aa2164d506918c8990782a63c
tree3624d0ec6e50895c262ac5cc1def611cc013c1bf
parent62a21406f3da563194807f2fe9850a12b2d4af56
drm/i915/bxt: use NULL for GPIO connection ID

The commit ec18aede5b20
("drm/i915/bxt: add bxt dsi gpio element support")
enables GPIO support for Broxton based platforms.

While using that API we might get into troubles in the future, because
we can't rely on label name in the driver since vendor firmware might
provide any GPIO pin there, e.g. "reset", and even mark it in _DSD (in
which case the request will fail).

To avoid inconsistency and potential issues we have two options:
a) generate GPIO ACPI mapping table and supply it via
   acpi_dev_add_driver_gpios(), or
b) just pass NULL as connection ID.

The b) approach is much simpler and would work since the driver relies
on GPIO indices only. Moreover, the _CRS fallback mechanism, when
requesting GPIO, has been made stricter, and supplying non-NULL
connection ID when neither _DSD, nor GPIO ACPI mapping is present, is
making request fail.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101921
Fixes: 19c3cebd37c7 ("gpio: acpi: Even more tighten up ACPI GPIO lookups")
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Tested-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170817105541.63914-1-andriy.shevchenko@linux.intel.com
(cherry picked from commit cd55a1fbd21a820b7dd85a208b3170aa0b06adfa)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_dsi_vbt.c