Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp780321ybh; Sat, 3 Aug 2019 09:37:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPxzOMuYZ6UY1npaq9zFa4hWGQ1S9HeraW+Yq+D0pxP9lM8sq/vi60ugLGe9Wkfch/SJaQ X-Received: by 2002:a17:902:8689:: with SMTP id g9mr127361849plo.252.1564850275361; Sat, 03 Aug 2019 09:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564850275; cv=none; d=google.com; s=arc-20160816; b=SOW8tIxsDSdKEcDB8TB8f3ns0d2krrKaVS8PPM9up77GKYCl8iIBuvDc338SJyMV1i SLIkmvSRs2V1zs0/6FF0yQdVqbiPjXJueOzOiOxMANTlflgWksva+cZyKM7YGOGxECl6 RKF95Lkpfo9wYRaW2wX2WZU+0rAIhNwIqDHEPDl3S98h9xC+eXG/+Ti81Ey7sP7fFeMp /IbzD3KCvbgJqhGCQnNFc43KL2alJr96tCXboe6e9XvSYpskX+76sUW+3zMu9lLXLALC ZuAjcxHQ89Y6btGcEU+02zVI2xK3DkYopufBHjm+Dndidloy06irlSdx/Yn3maokHyaB u7AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A5hsGuMM7+A8vWUZa4SoWzHNBFgjwp8G5rJTHxfm/tc=; b=o07XAilEhGfqL9Xg7EvPKsemNkgA+XS0OLWRAqwCT2x6sQ5gwqqFAf0tpoSxBlU/6D eZSGk7uvIcIkiORxiBfWg3kNER1FWC9k2mRTgd3Y7QGCk+FxfJ4hk2vGaLluhRJ2MyTm CJtSrmpIcisODS2bWngY6N2pqqDxTCwVdsCpFMjMGv5KHHTmiaUqQKPz4D9Ce+djVA1s WcMpghDOFA8hSAqRmk0wBbVRcDOuoIv8rm9tve5RTAq5YF/4ixFlAqzISyTNcrqvL2Cf B7PMKNGO0dz/QBjTHsgUP+PTLUJnKLQ97jJvdV2RajTL3VedNgYJEol0lM1/n9GYGyhI Q7pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x9BL9G2K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si35372462ply.247.2019.08.03.09.37.40; Sat, 03 Aug 2019 09:37:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x9BL9G2K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405381AbfHBRca (ORCPT + 99 others); Fri, 2 Aug 2019 13:32:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:46658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404697AbfHBRc3 (ORCPT ); Fri, 2 Aug 2019 13:32:29 -0400 Received: from localhost (unknown [106.51.106.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E4422173E; Fri, 2 Aug 2019 17:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564767148; bh=42TcOR8lS2f4rqcNgv/niQ1OOyQQzpjCyw97d3CbBJc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x9BL9G2Kw4NQEbSxHNPZXSuhGOfSHgkh5qHdHBCyS5Wrf9VHcLOe8Oip+FTcTP51k 3hLx2392faQcsX/oBnPZhQpxEzxA2877L+sTjU+0s0VgOs1GURmEPOexe/kD3/XTnc feAP8fSlqIrgQlrD20IyLpzECruU05jWXzabEXfg= Date: Fri, 2 Aug 2019 23:01:15 +0530 From: Vinod Koul To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale Subject: Re: [RFC PATCH 35/40] soundwire: intel: export helper to exit reset Message-ID: <20190802173115.GE12733@vkoul-mobl.Dlink> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-36-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190725234032.21152-36-pierre-louis.bossart@linux.intel.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-07-19, 18:40, Pierre-Louis Bossart wrote: Here as well > Signed-off-by: Pierre-Louis Bossart > --- > drivers/soundwire/cadence_master.c | 9 +++++++-- > drivers/soundwire/cadence_master.h | 1 + > drivers/soundwire/intel.c | 4 ++++ > 3 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c > index 4a189e487830..f486fe15fb46 100644 > --- a/drivers/soundwire/cadence_master.c > +++ b/drivers/soundwire/cadence_master.c > @@ -780,7 +780,11 @@ EXPORT_SYMBOL(sdw_cdns_thread); > * init routines > */ > > -static int do_reset(struct sdw_cdns *cdns) > +/** > + * sdw_cdns_exit_reset() - Program reset parameters and start bus operations > + * @cdns: Cadence instance > + */ > +int sdw_cdns_exit_reset(struct sdw_cdns *cdns) > { > int ret; > > @@ -804,6 +808,7 @@ static int do_reset(struct sdw_cdns *cdns) > > return ret; > } > +EXPORT_SYMBOL(sdw_cdns_exit_reset); > > /** > * sdw_cdns_enable_interrupt() - Enable SDW interrupts and update config > @@ -839,7 +844,7 @@ int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns) > > cdns_writel(cdns, CDNS_MCP_INTMASK, mask); > > - return do_reset(cdns); > + return 0; > } > EXPORT_SYMBOL(sdw_cdns_enable_interrupt); > > diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h > index de97bc22acb7..2b551f9226f3 100644 > --- a/drivers/soundwire/cadence_master.h > +++ b/drivers/soundwire/cadence_master.h > @@ -161,6 +161,7 @@ irqreturn_t sdw_cdns_thread(int irq, void *dev_id); > int sdw_cdns_init(struct sdw_cdns *cdns); > int sdw_cdns_pdi_init(struct sdw_cdns *cdns, > struct sdw_cdns_stream_config config); > +int sdw_cdns_exit_reset(struct sdw_cdns *cdns); > int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns); > > void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root); > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index a976480d6f36..9ebe38e4d979 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -1112,6 +1112,8 @@ static int intel_probe(struct platform_device *pdev) > > ret = sdw_cdns_enable_interrupt(&sdw->cdns); > > + ret = sdw_cdns_exit_reset(&sdw->cdns); > + > /* Register DAIs */ > ret = intel_register_dai(sdw); > if (ret) { > @@ -1199,6 +1201,8 @@ static int intel_resume(struct device *dev) > > sdw_cdns_enable_interrupt(&sdw->cdns); > > + ret = sdw_cdns_exit_reset(&sdw->cdns); > + > return ret; > } > > -- > 2.20.1 -- ~Vinod