diff options
author | Lin Huang <hl@rock-chips.com> | 2018-07-02 13:27:19 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-07-10 18:59:05 +0300 |
commit | 48bd379aa23d0d6249490137e5ebe7f8aeeb887d (patch) | |
tree | 9eb4dc7bcad122206214f3e058522f03cde7ad40 /drivers/gpu/drm/panel | |
parent | 7ad4e4636c54dcfbcaf43c8737af3c294ed17d11 (diff) | |
download | linux-48bd379aa23d0d6249490137e5ebe7f8aeeb887d.tar.xz |
drm/panel: p079zca: Add variable unprepare_delay properties
When panel power down, p079zca need delay between reset and disable
power supply, but p097pfg does not need it. Similarly p097zca needs
a delay after entering panel sleep mode. So add two delay properties,
so we can meet these two panel power down sequence.
Signed-off-by: Lin Huang <hl@rock-chips.com>
[add sleep-mode delay]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702102721.3546-3-heiko@sntech.de
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-innolux-p079zca.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 185a55060195..69bee4413aae 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -33,6 +33,8 @@ struct panel_desc { unsigned int lanes; const char * const *supply_names; unsigned int num_supplies; + unsigned int sleep_mode_delay; + unsigned int power_down_delay; }; struct innolux_panel { @@ -89,10 +91,13 @@ static int innolux_panel_unprepare(struct drm_panel *panel) return err; } + if (innolux->desc->sleep_mode_delay) + msleep(innolux->desc->sleep_mode_delay); + gpiod_set_value_cansleep(innolux->enable_gpio, 0); - /* T8: 80ms - 1000ms */ - msleep(80); + if (innolux->desc->power_down_delay) + msleep(innolux->desc->power_down_delay); err = regulator_bulk_disable(innolux->desc->num_supplies, innolux->supplies); @@ -208,6 +213,7 @@ static const struct panel_desc innolux_p079zca_panel_desc = { .lanes = 4, .supply_names = innolux_p079zca_supply_names, .num_supplies = ARRAY_SIZE(innolux_p079zca_supply_names), + .power_down_delay = 80, /* T8: 80ms - 1000ms */ }; static int innolux_panel_get_modes(struct drm_panel *panel) |