device_is_big_endian(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the struct 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