Re: [PATCH] video/fsl: Fix the sleep function for FSL DIU module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/25/2014 02:56 AM, Dongsheng Wang wrote:
From: Jason Jin <Jason.Jin@xxxxxxxxxxxxx>

For deep sleep, the diu module will power off, when wake up
from the deep sleep, the registers need to be reinitialized.

Signed-off-by: Jason Jin <Jason.Jin@xxxxxxxxxxxxx>
Signed-off-by: Wang Dongsheng <dongsheng.wang@xxxxxxxxxxxxx>

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index e8758b9..7ec780c 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
  static int fsl_diu_resume(struct platform_device *ofdev)
  {
  	struct fsl_diu_data *data;
+	struct mfb_info *mfbi;

You don't need this, if ...

+	int i;

  	data = dev_get_drvdata(&ofdev->dev);
-	enable_lcdc(data->fsl_diu_info);
+	fsl_diu_enable_interrupts(data);
+	update_lcdc(data->fsl_diu_info);
+
+	for (i = 0; i < NUM_AOIS; i++) {
+		mfbi = &data->mfb[i];
+		if (mfbi->count)

... you do this:

		if (data->mfb[i].count)

Also, 'i' should be an 'unsigned int'.

+			fsl_diu_enable_panel(&data->fsl_diu_info[i]);
+	}

  	return 0;
  }


Other than that, this seems okay.
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux