diff options
author | Jani Nikula <jani.nikula@intel.com> | 2022-03-03 19:19:29 +0100 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2022-03-04 10:15:17 +0100 |
commit | 65cd963ea239a9c4bf0e5fdf9a86213908276554 (patch) | |
tree | 68b16c6736a3cd50cce46bfdfd2f8759c108904e /drivers/gpu/drm/i915/display/intel_gmbus.c | |
parent | drm/i915/gmbus: reduce gmbus pin lookups in gmbus setup (diff) | |
download | linux-65cd963ea239a9c4bf0e5fdf9a86213908276554.tar.xz linux-65cd963ea239a9c4bf0e5fdf9a86213908276554.zip |
drm/i915/gmbus: pass gpio reg to intel_gpio_setup()
Avoid the additional gmbus lookup on the pin.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220303181931.1661767-3-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_gmbus.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_gmbus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c index 9dc66447d308..fd908e524875 100644 --- a/drivers/gpu/drm/i915/display/intel_gmbus.c +++ b/drivers/gpu/drm/i915/display/intel_gmbus.c @@ -322,14 +322,13 @@ intel_gpio_post_xfer(struct i2c_adapter *adapter) } static void -intel_gpio_setup(struct intel_gmbus *bus, unsigned int pin) +intel_gpio_setup(struct intel_gmbus *bus, i915_reg_t gpio_reg) { - struct drm_i915_private *dev_priv = bus->dev_priv; struct i2c_algo_bit_data *algo; algo = &bus->bit_algo; - bus->gpio_reg = GPIO(get_gmbus_pin(dev_priv, pin)->gpio); + bus->gpio_reg = gpio_reg; bus->adapter.algo_data = algo; algo->setsda = set_data; algo->setscl = set_clock; @@ -909,7 +908,7 @@ int intel_gmbus_setup(struct drm_i915_private *dev_priv) if (IS_I830(dev_priv)) bus->force_bit = 1; - intel_gpio_setup(bus, pin); + intel_gpio_setup(bus, GPIO(gmbus_pin->gpio)); ret = i2c_add_adapter(&bus->adapter); if (ret) |