A quick but important aside: platform devices are often used to represent the variety of devices on a System on Chip (SoC) within an embedded board. The SoC is typically a very sophisticated chip that integrates various components into its silicon. Besides processing units (CPUs/GPUs), it might house several peripherals too, including Ethernet MAC, USB, multimedia, serial UART, clock, I2C, SPI, flash chip controllers, and so on. A reason we need these components to be enumerated as a platform device is that there is no physical bus within the SoC; thus, the platform bus is used.
Traditionally, the code that was used to instantiate these SoC platform devices was kept in a "board" file (or files) within the kernel source (arch/<arch>/...). Due to it becoming overloaded, it's been moved outside the pure kernel source into a useful hardware description format called the Device Tree (within Device Tree Source (DTS) files that are themselves...