aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-08-01 20:31:47 -0400
committerDave Airlie <airlied@redhat.com>2010-08-01 20:31:47 -0400
commitd6486813d2d0658c34f62212ba9a64be4d01c317 (patch)
tree2fac929ee406d4b5612db89a643430a3f94742ee /drivers/gpu/drm/i2c
parent7827627107aeb629f1a056cb56b17bd4fb789e03 (diff)
parent05991110cf94117dd488f6d64dabdea56ff35107 (diff)
Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-core-next
* 'nouveau/for-airlied' of ../drm-nouveau-next: (77 commits) drm/nouveau: set TASK_(UN)INTERRUPTIBLE before schedule_timeout() drm/nv50: fix some not-error error messages drm/nouveau: introduce gpio engine drm/nv50: correct wait condition for instmem flush drm/nouveau: Fix TV-out detection on unposted cards lacking a usable DCB table. drm/nouveau: Get rid of the remaining VGA CRTC locking. drm/nouveau: Move display init to a new nouveau_engine. drm/nouveau: Put back the old 2-messages I2C slave test. drm/nouveau: Reset AGP before running the init scripts. drm/nv30: Init the PFB+0x3xx memory timing regs. drm/nouveau: disable hotplug detect around DP link training drm/nv50: add function to control GPIO IRQ reporting drm/nouveau: add nv_mask register accessor drm/nouveau: fix build without CONFIG_ACPI drm/nouveau: Reset CRTC owner to 0 before BIOS init. drm/nouveau: No need to lock/unlock the VGA CRTC regs all the time. drm/nouveau: Remove useless CRTC_OWNER logging. drm/nouveau: Add some generic I2C gadget detection code. drm/i2c/ch7006: Don't assume that the specified config points to static memory. drm/nv04-nv3x: Implement init-compute-mem. ... Conflicts: drivers/gpu/drm/nouveau/nouveau_bios.c
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r--drivers/gpu/drm/i2c/ch7006_drv.c22
-rw-r--r--drivers/gpu/drm/i2c/ch7006_priv.h2
2 files changed, 21 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index 81681a07a80..833b35f44a7 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -33,7 +33,7 @@ static void ch7006_encoder_set_config(struct drm_encoder *encoder,
33{ 33{
34 struct ch7006_priv *priv = to_ch7006_priv(encoder); 34 struct ch7006_priv *priv = to_ch7006_priv(encoder);
35 35
36 priv->params = params; 36 priv->params = *(struct ch7006_encoder_params *)params;
37} 37}
38 38
39static void ch7006_encoder_destroy(struct drm_encoder *encoder) 39static void ch7006_encoder_destroy(struct drm_encoder *encoder)
@@ -114,7 +114,7 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder,
114{ 114{
115 struct i2c_client *client = drm_i2c_encoder_get_client(encoder); 115 struct i2c_client *client = drm_i2c_encoder_get_client(encoder);
116 struct ch7006_priv *priv = to_ch7006_priv(encoder); 116 struct ch7006_priv *priv = to_ch7006_priv(encoder);
117 struct ch7006_encoder_params *params = priv->params; 117 struct ch7006_encoder_params *params = &priv->params;
118 struct ch7006_state *state = &priv->state; 118 struct ch7006_state *state = &priv->state;
119 uint8_t *regs = state->regs; 119 uint8_t *regs = state->regs;
120 struct ch7006_mode *mode = priv->mode; 120 struct ch7006_mode *mode = priv->mode;
@@ -428,6 +428,22 @@ static int ch7006_remove(struct i2c_client *client)
428 return 0; 428 return 0;
429} 429}
430 430
431static int ch7006_suspend(struct i2c_client *client, pm_message_t mesg)
432{
433 ch7006_dbg(client, "\n");
434
435 return 0;
436}
437
438static int ch7006_resume(struct i2c_client *client)
439{
440 ch7006_dbg(client, "\n");
441
442 ch7006_write(client, 0x3d, 0x0);
443
444 return 0;
445}
446
431static int ch7006_encoder_init(struct i2c_client *client, 447static int ch7006_encoder_init(struct i2c_client *client,
432 struct drm_device *dev, 448 struct drm_device *dev,
433 struct drm_encoder_slave *encoder) 449 struct drm_encoder_slave *encoder)
@@ -487,6 +503,8 @@ static struct drm_i2c_encoder_driver ch7006_driver = {
487 .i2c_driver = { 503 .i2c_driver = {
488 .probe = ch7006_probe, 504 .probe = ch7006_probe,
489 .remove = ch7006_remove, 505 .remove = ch7006_remove,
506 .suspend = ch7006_suspend,
507 .resume = ch7006_resume,
490 508
491 .driver = { 509 .driver = {
492 .name = "ch7006", 510 .name = "ch7006",
diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h
index b06d3d93d8a..1c6d2e3bd96 100644
--- a/drivers/gpu/drm/i2c/ch7006_priv.h
+++ b/drivers/gpu/drm/i2c/ch7006_priv.h
@@ -77,7 +77,7 @@ struct ch7006_state {
77}; 77};
78 78
79struct ch7006_priv { 79struct ch7006_priv {
80 struct ch7006_encoder_params *params; 80 struct ch7006_encoder_params params;
81 struct ch7006_mode *mode; 81 struct ch7006_mode *mode;
82 82
83 struct ch7006_state state; 83 struct ch7006_state state;