A parent (such as the Intel audio controller) would use sdw_md_add()
to create the device, passing a driver as a parameter. The
sdw_md_release() would be called when put_device() is invoked by the
parent. We use the shortcut 'md' for 'master device' to avoid very
long function names.
I agree we should not have long name :) but md does not sound great. Can
we drop the device and use sdw_slave and sdw_master for devices and
append _driver when we are talking about drivers...
we dont use sd for slave and imo this would gel well with existing names
In SoundWire parlance, both 'Slave' and 'Master' are 'Devices', so yes we do
in the standard talk about 'Slave Devices' and 'Master Devices'.
Then we have Linux 'Devices' which can be used for both.
If we use 'sdw_slave', would we be referring to the actual physical part or
the Linux device?
FWIW the Greybus example used 'Host Device' and 'hd' as shortcut.
But this messes up consistency in the naming of sdw objects. I am all for
it, if we do sd for slave and name all structs and APIs accordingly. The key
is consistency!
So it needs to be sd/md and so on or sdw_slave and sdw_master and so
on... not a mix of both