aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSvyatoslav Ryhel2023-03-27 11:11:49 +0300
committerAnatolij Gustschin2023-04-07 19:53:38 +0200
commit86cb1bdc45a5f688a927a5380daff1bfa2397866 (patch)
treeb0e49c0b4feaf2bc04b81d975ec2f9296657c223 /drivers/video
parentacbb871af522654a49126cd53ef95b6c1afd9103 (diff)
simple_panel: add support for get_display_timing
Some cases may require passing display timings from panel driver. To handle such cases support parsing device tree panel node for timing subnode. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Google Nexus 7 2012 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/simple_panel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index 91c91ee75d8..5a8262669a7 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -48,6 +48,15 @@ static int simple_panel_set_backlight(struct udevice *dev, int percent)
return 0;
}
+static int simple_panel_get_display_timing(struct udevice *dev,
+ struct display_timing *timings)
+{
+ const void *blob = gd->fdt_blob;
+
+ return fdtdec_decode_display_timing(blob, dev_of_offset(dev),
+ 0, timings);
+}
+
static int simple_panel_of_to_plat(struct udevice *dev)
{
struct simple_panel_priv *priv = dev_get_priv(dev);
@@ -102,6 +111,7 @@ static int simple_panel_probe(struct udevice *dev)
static const struct panel_ops simple_panel_ops = {
.enable_backlight = simple_panel_enable_backlight,
.set_backlight = simple_panel_set_backlight,
+ .get_display_timing = simple_panel_get_display_timing,
};
static const struct udevice_id simple_panel_ids[] = {