---
name: "ofw_bus_status_okay"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ofw_bus_get_status/9freebsd"
---

# ofw\_bus\_status\_okay(9freebsd)

check status of the device tree node

Part of [ofw\_bus\_get\_status(9freebsd)](/ofw_bus_get_status/9freebsd.md).

## NAME

**ofw\_bus\_get\_status** **ofw\_bus\_status\_okay** **ofw\_bus\_node\_status\_okay** – check status of the device tree node

## SYNOPSIS

**#include \<dev/ofw/openfirm.h\>**

**#include \<dev/ofw/ofw\_bus.h\>**

**#include \<dev/ofw/ofw\_bus\_subr.h\>**

*const* *char* *\**\

**ofw\_bus\_get\_status**(*device\_t dev*);

*int*\

**ofw\_bus\_status\_okay**(*device\_t dev*);

*int*\

**ofw\_bus\_node\_status\_okay**(*phandle\_t node*);

## DESCRIPTION

The "status" property of the device tree node indicates whether the device is enabled or not. Multiple hardware versions might be built using the same base System-on-Chip but with a different set of blocks enabled. It is common to use  SoC device tree and only enable/disable device nodes for the derivative boards. The device tree node is considered enabled only if it has "status" property with the value set to either "ok" or "okay".

**ofw\_bus\_get\_status**() returns the value of the "status" property of the device tree node associated with the device *dev*. If the node does not have "status" property or there is no node associated with the device the function returns NULL.

**ofw\_bus\_status\_okay**() returns 1 if the device tree node associated with the device *dev* has "status" property and its value is either "ok" or "okay".

**ofw\_bus\_node\_status\_okay**() returns 1 if the device tree node *node* has "status" property and its value is either "ok" or "okay".

## AUTHORS

This manual page was written by Oleksandr Tymoshenko.
