drm/i2c/ch7006: Fix up suspend/resume.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 10 Jul 2010 20:34:13 +0000 (22:34 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Jul 2010 00:20:24 +0000 (10:20 +1000)
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/i2c/ch7006_drv.c

index 81681a07a8060cbdb980765fca9edfc3a270d7ca..3e2c9da6c81eeb9ba0d8dec1067bcb1af547f1af 100644 (file)
@@ -428,6 +428,22 @@ static int ch7006_remove(struct i2c_client *client)
        return 0;
 }
 
+static int ch7006_suspend(struct i2c_client *client, pm_message_t mesg)
+{
+       ch7006_dbg(client, "\n");
+
+       return 0;
+}
+
+static int ch7006_resume(struct i2c_client *client)
+{
+       ch7006_dbg(client, "\n");
+
+       ch7006_write(client, 0x3d, 0x0);
+
+       return 0;
+}
+
 static int ch7006_encoder_init(struct i2c_client *client,
                               struct drm_device *dev,
                               struct drm_encoder_slave *encoder)
@@ -487,6 +503,8 @@ static struct drm_i2c_encoder_driver ch7006_driver = {
        .i2c_driver = {
                .probe = ch7006_probe,
                .remove = ch7006_remove,
+               .suspend = ch7006_suspend,
+               .resume = ch7006_resume,
 
                .driver = {
                        .name = "ch7006",