Re: [PATCH 5/5] soundwire: qcom: add sdw_master_device support

From: Pierre-Louis Bossart
Date: Fri Mar 20 2020 - 13:57:56 EST



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.