ofw_bus_status_okay(9)
β¨ ofw_bus_status_okay(9) β¨
okay bestie, welcome to the Kernel Developer's Manual π this one's a lil cutie from section 9, all about peeking at the device tree and asking the node like... "are u actually enabled rn or are u just sitting there" π¦
π 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 π
so the "status" property of a device tree node is literally the little "am I on or off" tag β it tells you whether the device is enabled or not. no cap. π₯
here's the tea tho: sometimes you got multiple hardware versions all built off the same base System-on-Chip but with a totally different set of blocks enabled. super common. so the move is to use the SoC device tree and just enable/disable the device nodes for the derivative boards. very main character energy. π
and a device tree node is considered enabled only if it has a "status" property whose value is set to either "ok" or "okay". those are the only two vibes that pass the vibe check. if it's anything else, or the property's not even there... it's not enabled, bestie. periodt. β¨
ofw_bus_get_status()β returns the value of the"status"property of the device tree node associated with the devicedev. if the node doesn't have a"status"property, or there's no node associated with the device at all, this function returnsNULL. πofw_bus_status_okay()β returns1if the device tree node associated with the devicedevhas a"status"property and its value is either"ok"or"okay". π«Άofw_bus_node_status_okay()β returns1if the device tree nodenodehas a"status"property and its value is either"ok"or"okay". same energy, just takes the node directly instead of the device. π
π AUTHORS π
This manual page was written by Oleksandr Tymoshenko.
Debian Β· April 8, 2018 Β· ofw_bus_status_okay(9)
and that's the whole page bestie, ily, go check ur node status and slay π πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2018 Oleksandr Tymoshenko
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms