of_device_is_big_endian(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_device_is_big_endian(9) β€” the bestie endianness check πŸ’…

okay so this page lives in the Kernel API Manual, and the main character is of_device_is_big_endian(9). It checks if a device has BE registers, and honestly it's a tiny function with big β€œam I big-endian or not” energy. πŸ¦‹


🌸 NAME 🌸

of_device_is_big_endian β€” check if a device has BE registers. that's the whole name, periodt. ✨


πŸŽ€ SYNOPSIS πŸŽ€

the signature is literally:

bool of_device_is_big_endian (const struct device_node *device );

πŸ’– ARGUMENTS πŸ’–

  • device β€” Node to check for endianness. this is the node, bestie: the one whose endianness vibe we're checking. πŸ‘‘

πŸ”₯ RETURN πŸ”₯

True if the device has a "big-endian" property, or if the kernel was compiled for BE and the device has a "native-endian" property. Otherwise it returns false. no extra plot twists. πŸ’€


🌈 DESCRIPTION 🌈

Callers would nominally use ioread32be/iowrite32be if of_device_is_big_endian == true, or readl/writel otherwise. that's the intended usage, iykyk. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

the whole kernel file / function friend group situation:


with love from the ./drivers/of corner of the Kernel API Manual, stamped October 2026, page of_device_is_big_endian(9) β€” slay and goodbye πŸŽ€πŸ’–

πŸ“¦ where this page comes from