If it's optional then either there should be no error message, or theYes it's optional. For older platforms this is not required.+ ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");Why is there no return on error here? Is the reset optional?
+ if (IS_ERR(ctrl->audio_cgcr))
+ dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");
error message should only be logged when the version is >= 1.6.0. There
are few things worse than a kernel log riddled with misleading error
messages.
In that case, it can be done like below. Kindly let me know your opinion on this.
if (ctrl->version >= 0x01060000) {
This is not true 1.7+ variants do not require anything as such.
I think it applies for all upcoming versions as Qualcomm Hardware team. Here is the not from HW Team.