[alsa-devel] [RFC PATCH 32/40] soundwire: intel: add helper for initialization
Cezary Rojewski
cezary.rojewski at intel.com
Fri Jul 26 12:42:38 CEST 2019
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
> Move code to helper for reuse in power management routines
>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> ---
> drivers/soundwire/intel.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
> index c40ab443e723..215dc81cdf73 100644
> --- a/drivers/soundwire/intel.c
> +++ b/drivers/soundwire/intel.c
> @@ -984,6 +984,15 @@ static struct sdw_master_ops sdw_intel_ops = {
> .post_bank_switch = intel_post_bank_switch,
> };
>
> +static int intel_init(struct sdw_intel *sdw)
> +{
> + /* Initialize shim and controller */
> + intel_link_power_up(sdw);
> + intel_shim_init(sdw);
> +
> + return sdw_cdns_init(&sdw->cdns);
> +}
Why don't we check polling status for _link_power_up? I've already met
slow starting devices in the past. If polling fails and -EAGAIN is
returned, flow of initialization should react appropriately e.g. poll
till MAX_TIMEOUT of some sort -or- collapse.
More information about the Alsa-devel
mailing list