the hdp-cec kernel thread should be freezeable during system suspend phase,
othwerwise, it will cause issues(hang) since it will still try to access
some resources such as clocks which are off during system suspend process.
Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Cc: Sandor Yu <sandor.yu@nxp.com>
Cc: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Acked-by: Sandor Yu <sandor.yu@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
#include <linux/version.h>
#include <linux/workqueue.h>
#include <linux/kthread.h>
+#include <linux/freezer.h>
#include <media/cec.h>
#include <soc/imx8/soc.h>
int num_rx_msgs, i;
int sts;
+ set_freezable();
+
for (;;) {
- if (kthread_should_stop())
+ if (kthread_freezable_should_stop(NULL))
break;
/* Check TX State */