diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-02-27 18:42:19 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-02-29 14:46:02 -0500 |
commit | 1298330bd6ab5ea7c9616a242a6f40ef4968521d (patch) | |
tree | 35640ed5e9d1a254bd63e9ddfeea60ba7f4d9ab6 | |
parent | c2b9152f098e213dc5f2e8a4dbbfe090302c58ed (diff) |
drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo
I'd like to export the corresponding functions from the i2c core
so that I can use them in fallback bit-banging in i915.ko
v2: Adapt to new i2c export patch.
Cc: nouveau@lists.freedesktop.org
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_i2c.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index 820ae7f52044..8f4f914d9eab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c | |||
@@ -277,7 +277,7 @@ i2c_bit_func(struct i2c_adapter *adap) | |||
277 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | 277 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; |
278 | } | 278 | } |
279 | 279 | ||
280 | const struct i2c_algorithm i2c_bit_algo = { | 280 | const struct i2c_algorithm nouveau_i2c_bit_algo = { |
281 | .master_xfer = i2c_bit_xfer, | 281 | .master_xfer = i2c_bit_xfer, |
282 | .functionality = i2c_bit_func | 282 | .functionality = i2c_bit_func |
283 | }; | 283 | }; |
@@ -384,12 +384,12 @@ nouveau_i2c_init(struct drm_device *dev) | |||
384 | case 0: /* NV04:NV50 */ | 384 | case 0: /* NV04:NV50 */ |
385 | port->drive = entry[0]; | 385 | port->drive = entry[0]; |
386 | port->sense = entry[1]; | 386 | port->sense = entry[1]; |
387 | port->adapter.algo = &i2c_bit_algo; | 387 | port->adapter.algo = &nouveau_i2c_bit_algo; |
388 | break; | 388 | break; |
389 | case 4: /* NV4E */ | 389 | case 4: /* NV4E */ |
390 | port->drive = 0x600800 + entry[1]; | 390 | port->drive = 0x600800 + entry[1]; |
391 | port->sense = port->drive; | 391 | port->sense = port->drive; |
392 | port->adapter.algo = &i2c_bit_algo; | 392 | port->adapter.algo = &nouveau_i2c_bit_algo; |
393 | break; | 393 | break; |
394 | case 5: /* NV50- */ | 394 | case 5: /* NV50- */ |
395 | port->drive = entry[0] & 0x0f; | 395 | port->drive = entry[0] & 0x0f; |
@@ -402,7 +402,7 @@ nouveau_i2c_init(struct drm_device *dev) | |||
402 | port->drive = 0x00d014 + (port->drive * 0x20); | 402 | port->drive = 0x00d014 + (port->drive * 0x20); |
403 | port->sense = port->drive; | 403 | port->sense = port->drive; |
404 | } | 404 | } |
405 | port->adapter.algo = &i2c_bit_algo; | 405 | port->adapter.algo = &nouveau_i2c_bit_algo; |
406 | break; | 406 | break; |
407 | case 6: /* NV50- DP AUX */ | 407 | case 6: /* NV50- DP AUX */ |
408 | port->drive = entry[0]; | 408 | port->drive = entry[0]; |