|
NAME
SYNOPSIS
phandle_t
DESCRIPTION
EXAMPLES phandle_t root, i2c;
root = OF_finddevice("/");
i2c = OF_finddevice("/soc/axi/i2c@a0e0000");
if (i2c != -1) {
...
}
SEE ALSOAUTHORSThis manual page was written by Oleksandr Tymoshenko <gonzo@FreeBSD.org>. CAVEATSThe return value should only be checked with equality operators (equal to, not equal to) and not relational comparison (less than, greater than ). There is a discrepancy between IEEE 1275 standard and FreeBSD's internal representation of a phandle: IEEE 1275 requires the return value of this function to be -1 if the path is not found. But phandle_t is an unsigned type, so it cannot be relationally compared with -1 or 0, this comparison is always true or always false.
|