lkml.org 
[lkml]   [2012]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/9] drm/i915/intel_i2c: cleanup gmbus/gpio pin assignments
Date
On Wed,  7 Mar 2012 19:50:45 +0800, Daniel Kurtz <djkurtz@chromium.org> wrote:
> There is no "disabled" port 0. So, don't even try to initialize/scan
> it, etc. This saves a bit of time when initializing the driver, since
> the we can avoid a 50ms timeout waiting for a device to respond on
> a port that doesn't even exist.
>
> Similarly, don't initialize the reserved port, either.

> @@ -150,32 +164,23 @@ static void set_data(void *data, int state_high)
> static struct i2c_adapter *
> intel_gpio_create(struct drm_i915_private *dev_priv, u32 pin)
> {
> - static const int map_pin_to_reg[] = {
> - 0,
> - GPIOB,
> - GPIOA,
> - GPIOC,
> - GPIOD,
> - GPIOE,
> - GPIOF,
> - 0,
> - };
> struct intel_gpio *gpio;
>
> - if (pin >= ARRAY_SIZE(map_pin_to_reg) || !map_pin_to_reg[pin])

And that doesn't do what your changelog proposes? Why?
-Chris

--
Chris Wilson, Intel Open Source Technology Centre


\
 
 \ /
  Last update: 2012-03-07 13:19    [W:0.086 / U:0.544 seconds]
©2003-2014 Jasper Spaans. Advertise on this site