Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: s6e8aa0: Add proper definition for prepare and unprepare

Move out code from enable and disable routines to prepare
and unprepare routines, so that functionality is properly
distributed across all the panel functions.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Ajay Kumar and committed by
Thierry Reding
1a670e7b 81410282

+11 -11
+11 -11
drivers/gpu/drm/panel/panel-s6e8aa0.c
··· 892 892 893 893 static int s6e8aa0_disable(struct drm_panel *panel) 894 894 { 895 + return 0; 896 + } 897 + 898 + static int s6e8aa0_unprepare(struct drm_panel *panel) 899 + { 895 900 struct s6e8aa0 *ctx = panel_to_s6e8aa0(panel); 896 901 897 902 s6e8aa0_dcs_write_seq_static(ctx, MIPI_DCS_ENTER_SLEEP_MODE); ··· 908 903 return s6e8aa0_power_off(ctx); 909 904 } 910 905 911 - static int s6e8aa0_unprepare(struct drm_panel *panel) 912 - { 913 - return 0; 914 - } 915 - 916 906 static int s6e8aa0_prepare(struct drm_panel *panel) 917 - { 918 - return 0; 919 - } 920 - 921 - static int s6e8aa0_enable(struct drm_panel *panel) 922 907 { 923 908 struct s6e8aa0 *ctx = panel_to_s6e8aa0(panel); 924 909 int ret; ··· 921 926 ret = ctx->error; 922 927 923 928 if (ret < 0) 924 - s6e8aa0_disable(panel); 929 + s6e8aa0_unprepare(panel); 925 930 926 931 return ret; 932 + } 933 + 934 + static int s6e8aa0_enable(struct drm_panel *panel) 935 + { 936 + return 0; 927 937 } 928 938 929 939 static int s6e8aa0_get_modes(struct drm_panel *panel)