2 * linux/drivers/video/nvidia/nv_of.c
4 * Copyright 2004 Antonino A. Daplas <adaplas @pol.net>
6 * Based on rivafb-i2c.c
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/sched.h>
16 #include <linux/delay.h>
17 #include <linux/pci.h>
23 #include <asm/pci-bridge.h>
31 int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid)
33 struct nvidia_par *par = info->par;
34 struct device_node *parent, *dp;
35 const unsigned char *pedid = NULL;
36 static char *propnames[] = {
37 "DFP,EDID", "LCD,EDID", "EDID", "EDID1",
38 "EDID,B", "EDID,A", NULL };
41 parent = pci_device_to_OF_node(par->pci_dev);
49 (dp = of_get_next_child(parent, dp)) != NULL;) {
50 pname = get_property(dp, "name", NULL);
54 if ((pname[len-1] == 'A' && conn == 1) ||
55 (pname[len-1] == 'B' && conn == 2)) {
56 for (i = 0; propnames[i] != NULL; ++i) {
57 pedid = get_property(dp, propnames[i],
68 for (i = 0; propnames[i] != NULL; ++i) {
69 pedid = get_property(parent, propnames[i], NULL);
75 *out_edid = kmemdup(pedid, EDID_LENGTH, GFP_KERNEL);
76 if (*out_edid == NULL)
78 printk(KERN_DEBUG "nvidiafb: Found OF EDID for head %d\n", conn);