From 85890f4a0be823a53ae71ab3ff8a145980dbded2 Mon Sep 17 00:00:00 2001 From: yunfei zhu Date: Thu, 7 Mar 2024 15:32:12 +0800 Subject: [PATCH] [Update]Fix STR DSI i2c communication failure problem --- drivers/gpu/drm/panel/panel-lt8911.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-lt8911.c b/drivers/gpu/drm/panel/panel-lt8911.c index 84a9a1029..4acd71f40 100644 --- a/drivers/gpu/drm/panel/panel-lt8911.c +++ b/drivers/gpu/drm/panel/panel-lt8911.c @@ -855,9 +855,35 @@ static const struct of_device_id i2c_md_of_ids[] = { }; MODULE_DEVICE_TABLE(of, i2c_md_of_ids); +#ifdef CONFIG_PM_SLEEP + +static int edpi2c_suspend(struct device *dev) +{ + return 0; +} + +static int edpi2c_resume(struct device *dev) +{ + return 0; +} + +static const struct dev_pm_ops edpi2c_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(edpi2c_suspend, + edpi2c_resume) +}; + +#define EDPI2C_PM_OPS &edpi2c_pm_ops + +#else + +#define EDPI2C_PM_OPS NULL + +#endif + static struct i2c_driver i2c_md_driver = { .driver = { .name = "i2c_mipi_dsi", + .pm = EDPI2C_PM_OPS, .of_match_table = i2c_md_of_ids, }, .probe = i2c_md_probe,