Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp576156ybk; Wed, 20 May 2020 06:58:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQRxwUXpoNnj3wkEagrLGAMs5mzRxWBKyDbf1A5U8ddXljFq4ugJw6thgIuadIT4XmH0XD X-Received: by 2002:a17:906:4753:: with SMTP id j19mr4066474ejs.83.1589983134616; Wed, 20 May 2020 06:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983134; cv=none; d=google.com; s=arc-20160816; b=tbUGOMUyzg3lfJpL+o730cHooSl5DZn8NnD+g3pNaBeY0ovyrHmbNq3cQlw+WjGeYW Wg68QE5O3OUm3oyGjLHgx1cl3X2+LNN+CnEDnvs6Ea0KRkaBWgqCOwuLxsopjT4bF2FK eaQNVvA3Z8MPUHkV5QAHR12SYywbzCHOY3VWuXuT8YEYpi8AmoxrAEMVRIfSTLC4Wr9q 3HKxrqTdaHY+jNcDgLIvz6ujPO6Tfqu+CfGEzLrsyvU9rN7FBOwLrDeb4jexuB+biQfP AFe0rKHEuS+DEA1kRbzbx6yu56lqWpiw8LGiu/Flu7it40ZlO26p+e/bX4gY3K4H9tO6 8JiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qaVqulv5Zis+aJTKBOF4AU0VIDe1woafxnzaO5IpDq0=; b=hRzaekw/7hmwOQwGx96pt6DuHQNWtWaAP1zy7XPWiiyHYKgaDTa+l+tqamkhLYI4Me 109UGqz8BXzRJBmghDjG5N0hF/ofmoT3F18vaCpnAsZwUEW15wOdKEgGUNdGbiqJ3mDz aQHrMffcCjT9pVldv9I/msWh/cy9kf5K+FWnq37lIILV6RkYVslUrBu/aIKMKeWYeJ/s PPjlw42r0jOJArz67jo630bPO09dHiGyQlO0bE+KVia3OdT1Usjsg+Pkcp0LZsqZvq6n 38uNAytLCO9/DY1LZQucA3sxVsH4v0HvU9Ksjptl/Dp7qrQEa8cJStZJa1F5ko2wBRsP xLyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hP5iWOo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id rl17si1783835ejb.241.2020.05.20.06.58.31; Wed, 20 May 2020 06:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hP5iWOo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726851AbgETNyb (ORCPT + 99 others); Wed, 20 May 2020 09:54:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:42430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgETNyb (ORCPT ); Wed, 20 May 2020 09:54:31 -0400 Received: from localhost (unknown [122.178.227.40]) (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 E317F207F9; Wed, 20 May 2020 13:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589982870; bh=CxK0gseNp+SBZ4zpW34ctL0VPz31/KFZU//G0BqDoic=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hP5iWOo/9qDjvVjvbEylSRzNzc1P0LiHghbgdZY4dxGpzBJThK+EJ0f6GjpI/jIzt En0lE8LEBmTPGTp8Ufr1W6p3Hpu3kUdqZmNsxMlTom3yLxDB3rOECXh40wWr77fHf+ AUhXCfu70UnH8kpKpvTXa6V+nu8yPMDlDlmqutzc= Date: Wed, 20 May 2020 19:24:25 +0530 From: Vinod Koul To: Bard Liao 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, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, slawomir.blauciak@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: Re: [PATCH 2/2] soundwire: intel: transition to 3 steps initialization Message-ID: <20200520135425.GX374218@vkoul-mobl.Dlink> References: <20200519191903.6557-1-yung-chuan.liao@linux.intel.com> <20200519191903.6557-2-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519191903.6557-2-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20-05-20, 03:19, Bard Liao wrote: > From: Pierre-Louis Bossart > > Rather than a plain-vanilla init/exit, this patch provides 3 steps in > the initialization (ACPI scan, probe, startup) which makes it easier to > detect platform support for SoundWire, allocate required resources as > early as possible, and conversely help make the startup() callback > lighter-weight with only hardware register setup. Okay but can you add details in changelog on what each step would do? > @@ -1134,25 +1142,15 @@ static int intel_probe(struct platform_device *pdev) > > intel_pdi_ch_update(sdw); > > - /* Acquire IRQ */ > - ret = request_threaded_irq(sdw->link_res->irq, > - sdw_cdns_irq, sdw_cdns_thread, > - IRQF_SHARED, KBUILD_MODNAME, &sdw->cdns); This is removed here but not added anywhere else, do we have no irq after this patch? > @@ -1205,5 +1201,5 @@ static struct platform_driver sdw_intel_drv = { > module_platform_driver(sdw_intel_drv); > > MODULE_LICENSE("Dual BSD/GPL"); > -MODULE_ALIAS("platform:int-sdw"); > +MODULE_ALIAS("sdw:intel-sdw"); it is still a platform device, so does sdw: tag make sense? This is used by modprobe to load the driver! > +/** > + * sdw_intel_probe() - SoundWire Intel probe routine > + * @res: resource data > + * > + * This creates SoundWire Master and Slave devices below the controller. I dont think the comment is correct, this is done in intel_master_probe which is platform device probe... > + * All the information necessary is stored in the context, and the res > + * argument pointer can be freed after this step. > + */ > +struct sdw_intel_ctx > +*sdw_intel_probe(struct sdw_intel_res *res) > +{ > + return sdw_intel_probe_controller(res); > +} > +EXPORT_SYMBOL(sdw_intel_probe); I guess this would be called by SOF driver, question is when..? > +/** > + * sdw_intel_startup() - SoundWire Intel startup > + * @ctx: SoundWire context allocated in the probe > + * > + */ > +int sdw_intel_startup(struct sdw_intel_ctx *ctx) > +{ > + return sdw_intel_startup_controller(ctx); > +} > +EXPORT_SYMBOL(sdw_intel_startup); when is this called, pls do document that -- ~Vinod