I have seen the device not going into suspend serveral times
and found out that there is an unitialized variable in
static int mxc_epdc_fb_suspend(struct device *dev)
{
int ret;
if EPD_SUSPEND_BLANK is not defined, nothing will be assigned to "ret"
and happily returned that value. Often that is zero but not always.
If things fail, dmesg shows errors
like
PM: Device 20f4000.epdc failed to suspend: error -2144504356
A simple
diff --git a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c
index 7d89c676..28216ef0 100644
--- a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c
+++ b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c
@@ -7881,7 +7881,7 @@ static int mxc_epdc_fb_remove(struct platform_device pdev)
static int mxc_epdc_fb_suspend(struct device dev)
{
struct mxc_epdc_fb_data *data = dev_get_drvdata(dev);
I have seen the device not going into suspend serveral times and found out that there is an unitialized variable in static int mxc_epdc_fb_suspend(struct device *dev) { int ret;
if EPD_SUSPEND_BLANK is not defined, nothing will be assigned to "ret" and happily returned that value. Often that is zero but not always.
If things fail, dmesg shows errors like PM: Device 20f4000.epdc failed to suspend: error -2144504356
A simple diff --git a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c index 7d89c676..28216ef0 100644 --- a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c +++ b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c @@ -7881,7 +7881,7 @@ static int mxc_epdc_fb_remove(struct platform_device pdev) static int mxc_epdc_fb_suspend(struct device dev) { struct mxc_epdc_fb_data *data = dev_get_drvdata(dev);
int ret = 0;
improves things. But since the kernel is just a tarball here, I cannot create a pull request. I am referring to the kernel at https://github.com/kobolabs/Kobo-Reader/blob/master/hw/imx6sll-clara/kernel.tar.bz2