Add new device as a child of the platform device, following the following hierarchy:
platform_device sdw_master_device sdw_slave0
Why can't we just remove the platform device layer here and add sdw_master_device directly?
What is it stopping doing that?
The guidance from Greg was "no platform devices, unless you really are on a platform bus (i.e. Device tree.)". We never discussed changing the way the Device Tree parts are handled.
The main idea was to leave the parent (be it platform-device or PCI device) alone and not add new attributes or references to it.
The scheme here is similar to I2C/SPI, you have a platform device handled by the Device Tree baseline, and a driver create an i2c_adapter/spi_controller/sdw_master_device.