device_is_big_endian(9)
β¨ device_is_big_endian(9) β¨
okay so bestie, we're in the Kernel API Manual today and the star of the show is device_is_big_endian(9) β literally the glow-up check for your device's endianness. π
π NAME π
device_is_big_endian β check if a device has BE registers
πΈ SYNOPSIS πΈ
bool device_is_big_endian (const struct device *dev );
π¦ ARGUMENTS π¦
devβ Pointer to thestruct deviceπ that's the whole vibe, just hand over your device pointer and we'll tell you what's what
β RETURN β
Returns 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. Returns false otherwise. no cap, that's the whole rule π«Ά
π DESCRIPTION π
So here's the tea β: callers would nominally use ioread32be/iowrite32be if device_is_big_endian == true, or readl/writel otherwise. it's giving "pick the right accessor, bestie" π₯
π SEE ALSO π
Kernel file ./include/linux/property.h device_is_compatible(9), fwnode_handle_put(9), struct software_node_ref_args(9), struct property_entry(9), struct software_node(9)
and that's the whole page, bestie π mwah. this icon lives in ./include/linux, dated October 2026, and yes β the footer said device_is_big_endian(9) too, so we're booked-ending this exactly how we started. periodt. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms