drm/i915: remove confusing GPIO vs PCH_GPIO
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 27 Jul 2018 19:36:47 +0000 (12:36 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 16 Aug 2018 18:52:08 +0000 (11:52 -0700)
commitdce888798d3ed1c7fea2d45f5f757a749a9e2584
treeac6a569c624606e944d1a5d8382d016b36951d9b
parent336662e5e3c90e2b6d4b2c2a773f87218baa8a61
drm/i915: remove confusing GPIO vs PCH_GPIO

Instead of defining all registers twice, define just a PCH_GPIO_BASE
that has the same address as PCH_GPIO_A and use that to calculate all
the others. This also brings VLV and !HAS_GMCH_DISPLAY in line, doing
the same thing.

v2: Fix GMBUS registers to be relative to gpio base; create GPIO()
    macro to return a particular gpio address and move the enum out of
    i915_reg.h (suggested by Jani)

v3: Move base offset inside the GPIO() macro so the GMBUS defines don't
    actually need to be changed (suggested by Daniel/Ville)

v4: Move definition of i915_gpio to intel_display.h and remove
    GMBUS/GPIO handling from gvt since now they have their own
    defines.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180727193647.8639-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.h
drivers/gpu/drm/i915/intel_i2c.c