For hardware your company owns and intends to ship for years, default to putting the driver in mainline and carrying only the part you have not landed yet. Keep it out of tree when the hardware is not public, the programming interface is still moving, or the code cannot be licensed GPL-compatible. You trade review effort now against a maintenance cost that returns on every kernel rebase for as long as the product exists.

You have built a peripheral of your own — an FPGA block, a custom sensor bridge, a companion controller — and someone has written a working Linux driver for it. Where should that driver live? The in-tree vs out-of-tree driver decision looks like packaging, because both paths produce a .ko that loads and works. It is not packaging. It sets who pays to keep the driver alive across the next five years of kernel releases.

The context

The decision arrives when the driver works on the kernel you are developing against and the schedule needs an answer on how it ships. Nothing forces your hand then, which is why the choice is usually made by default. Kbuild supports both paths, and the kernel's build documentation is explicit: "The method for building either is similar, and all modules are initially developed and built out-of-tree." Every driver starts outside the tree. The decision is about where it ends up.