Received: by 10.192.165.156 with SMTP id m28csp1466004imm; Wed, 18 Apr 2018 10:03:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+dq67KjijSwtnxieIWuuXmb/HyQMFUVoQ6EuRML4sxKGZvBNuhm0lVuWt13VdxOf8LnCjf X-Received: by 10.167.128.217 with SMTP id a25mr2701263pfn.132.1524070990372; Wed, 18 Apr 2018 10:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524070990; cv=none; d=google.com; s=arc-20160816; b=NkenRT1p4750cuErlP79qc1bynmT+tTe8eDGctB+zgOSPpkioeIxfMvn8nsbXeeasz +AcVtueY5MdFgFp61KKEYoabZ2tG7SRaAfwmQ1xi9D7fvYu7MJAclaIJAq7w9NOe/OS9 c3iz8cNBBL5zTpPjaxjAJgvh94RAFcu9fyjF3kuhBJ/c5WiJlEavaOygdy4OQSyolyfo wVMDLBPxqTSdf+IpBkGvHoQmlU0s4chqUXyvjb7JcdT6GL1wtjJZEzSCx7APIY7cV7oE LHzm5bxo5/30Eu8kJiMolHvD4UNx8qs6Upg4UbppOP/5xRSczGpOvUPHY9bGnI5RaVwO BsQg== 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:arc-authentication-results; bh=1zB2q4PljYAkL9o3lmApmHr8jVd1RpUmKZNkpKcuE3Y=; b=wkrgGbi5iU9Dc0z9xjLOe4ag1xBMxshZ0aK1MvazK5a9DKL2owU3RnNmEp8+pcYKD5 dGsMGaTDR0+QEArXmQTUzQQmb80KU62KcWo/7lCkMwBhVtR1lQmNeBYEOHjXHIY1RjSv JfqzGU2XN6D0H5GQwd2WK+9TZw81XVS4ix3LeOBr69aFFpOaISz4LePuFaograXEvTHU Q6wpFfmQ3RnV7VxW05vBSMxwow7w9lDluD+MwJWw1pIERScesksT1XemssL2Rv5YUmJr e+VftEJlkpeeNPAPKNYH5gFt1H4wB4dZtRLuWll1xhA8UbkkqoJvJNF29vdBRA/38vUb dH0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aWVs9lE6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si1353733pgq.207.2018.04.18.10.02.54; Wed, 18 Apr 2018 10:03:10 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aWVs9lE6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbeDRRBd (ORCPT + 99 others); Wed, 18 Apr 2018 13:01:33 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:39118 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbeDRRBc (ORCPT ); Wed, 18 Apr 2018 13:01:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1zB2q4PljYAkL9o3lmApmHr8jVd1RpUmKZNkpKcuE3Y=; b=aWVs9lE65jvZF1fJMJmlj3oDo oLtvFFSAwmVk0eUIUa/J2ZIheBNVog5Tw/F0TqMLQ6U2Q9GAjOFZSzaQvmdGh8IqWyFsL+XC2dOUG AfvqjTFJXI8khbRfhXGUNyT8THQZuUlECWX15sFZX/5Y3aDvARrMF4mlOsDECrJxFftNY=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8qRy-0001EG-Pj; Wed, 18 Apr 2018 17:00:54 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f8qRy-0005PX-51; Wed, 18 Apr 2018 18:00:54 +0100 Date: Wed, 18 Apr 2018 18:00:54 +0100 From: Mark Brown To: "Mukunda,Vijendar" Cc: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Alex Deucher , Akshu Agrawal , Jose Abreu , Markus Elfring , "Gustavo A. R. Silva" , "moderated list:SOUND" , open list Subject: Re: [PATCH v2 1/3] ASoC: dwc: I2S Controller instance param added Message-ID: <20180418170054.GK10061@sirena.org.uk> References: <1524049494-19526-1-git-send-email-Vijendar.Mukunda@amd.com> <1524049494-19526-2-git-send-email-Vijendar.Mukunda@amd.com> <20180418112442.GB10061@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mGCtrYeZ202LI9ZG" Content-Disposition: inline In-Reply-To: X-Cookie: Sank heaven for leetle curls. User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mGCtrYeZ202LI9ZG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 18, 2018 at 06:18:44PM +0530, Mukunda,Vijendar wrote: > On Wednesday 18 April 2018 04:54 PM, Mark Brown wrote: > > On Wed, Apr 18, 2018 at 04:34:52PM +0530, Vijendar Mukunda wrote: > > > When multiple I2S controller instances created, > > > i2s_instance parameter refers to i2s controller instance value. > > You're missing the point here a bit - it's not just the defines for the > > magic numbers that are the problem, it's the whole idea of passing > > instance numbers around like this that's the big problem. Whatever you > In Audio Coprocessor (ACP), There are three I2S controllers can be > configured/enabled.(I2S SP, I2S MICSP, BT I2S) > Default enabled I2S controller instance is I2S SP instance. > There is a requirement to enable BT I2S controller Instance along with > I2S SP controller instance in one of our platforms Which has multiple codecs > connected to each instance. Describing how the system is wired up is the function of the machine driver. The individual drivers should just take configuration from the machine driver. > We have added one more parameter i2s instance to dwc platform data. > So that AMDGPU ACP Driver will pass I2S controller instance value to dwc > driver while creating device nodes for I2S Controllers. This is not the way to do this - you can already get the struct device for all the children from when they were instantiated, you should be able to use this to reference them so you can bind the machine driver. There's facilities for doing this (mostly serializing into dev_name() as this was mostly used by board file based machines) which are already used, if there's problems we should extend those rather than hacking things into every single driver. --mGCtrYeZ202LI9ZG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrXecUACgkQJNaLcl1U h9B7EAf9FyPEUPnvk+z/hoE/cB2jaQS6z6AsXLbzGgHEDoPPqUm5MAUT4m+Vqvj0 1AM9N3sPC7jaH4jefZ3n0nNTC5w/Zgro6i+w4KrDBb78x/sc4OIc/1GiJeFw28jy f/YJXmUwT239D3uQZJ4D4BhCc9iuOvyoLW/cqwqJTaENGUE9TvV7o/5dBk6+DlGH M7neQVaW/M8/4QiiYQ8pkU+4eVxy4dpf3GERRY5HWBpOJsXuph8bIYsFxjqSsyNg B0dbihDYZ/EHQTMQRgAZUvrVhKumyrA+4GZ++Ea0JFOr3NJbD0C31fXG1ua56Vvy a0HAALsXqDf79SSH//pAQ4GpgalFag== =iDzI -----END PGP SIGNATURE----- --mGCtrYeZ202LI9ZG--