Re: [alsa-devel] [PATCH v5 09/17] soundwire: intel: remove platform devices and use 'Master Devices' instead

From: Pierre-Louis Bossart
Date: Tue Jan 21 2020 - 12:31:36 EST



A rename away from probe will certainly be very helpful as
you would also agree that terms 'probe' and 'remove' have a very
special meaning in kernel, so let us avoid these

ok, so would the following be ok with you?

/**
* struct sdw_md_driver - SoundWire 'Master Device' driver
*
* @init: allocations and initializations (hardware may not be enabled yet)
* @startup: initialization handled after the hardware is enabled, all
* clock/power dependencies are available
* @shutdown: cleanups before hardware is disabled (optional)
* @exit: free all remaining resources
* @autonomous_clock_stop_enable: enable/disable driver control while
* in clock-stop mode, typically in always-on/D0ix modes. When the driver
* yields control, another entity in the system (typically firmware
* running on an always-on microprocessor) is responsible to tracking
* Slave-initiated wakes
*/
struct sdw_md_driver {
int (*init)(struct sdw_master_device *md, void *link_ctx);
int (*startup)(struct sdw_master_device *md);
int (*shutdown)(struct sdw_master_device *md);
int (*exit)(struct sdw_master_device *md);
int (*autonomous_clock_stop_enable)(struct sdw_master_device *md,
bool state);
};