From 08daa258e6a87c452d242d5e2d667710184156b2 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 8 Apr 2015 11:45:39 -0700 Subject: fdt: add new fdt_fixup_display function to configure display Add 'fdt_fixup_display' function to fixup device-tree native-mode property of display-timings node to select timings for a specific display. This is useful if a device-tree has configurations for multiple display timings for undetectable displays. see kernel Documentation/devicetree/bindings/video/display-timing.txt Signed-off-by: Tim Harvey Acked-by: Simon Glass --- include/fdt_support.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/fdt_support.h') diff --git a/include/fdt_support.h b/include/fdt_support.h index ae5e8a3ef6..5d4f28dc78 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -47,6 +47,19 @@ int fdt_find_and_setprop(void *fdt, const char *node, const char *prop, const void *val, int len, int create); void fdt_fixup_qe_firmware(void *fdt); +/** + * Update native-mode property of display-timings node to the phandle + * of the timings matching a display by name (case insensitive). + * + * see kernel Documentation/devicetree/bindings/video/display-timing.txt + * + * @param blob FDT blob to update + * @param path path within dt + * @param display name of display timing to match + * @return 0 if ok, or -FDT_ERR_... on error + */ +int fdt_fixup_display(void *blob, const char *path, const char *display); + #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) void fdt_fixup_dr_usb(void *blob, bd_t *bd); #else -- cgit v1.2.1