From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m16.yeah.net (mail-m16.yeah.net [1.95.21.14]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B232663D; Sat, 16 Nov 2024 06:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=1.95.21.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731737022; cv=none; b=qTw0vMu1+rO9vR4/ypxZXnljbIRZ/fd8Xx9Sn58XZD5w3YtKG8xw5uyKCmoI6uB7PUB0YOFvp5ht4u3uhksVGYxfKQsVDzy4uOuGXOlHLrRanzvRsKF6xED8vX48dAVXf7LE3k0+iYOndtOQZCEjnV6aXVoc9LAWkUCjU/eXYiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731737022; c=relaxed/simple; bh=r4vF8IrdFMgD08hcK4U30rLGVHmU114j0pb9IOhiAkw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=prkrAwJmcUR428t/MimZKDZYRes8+N7yT/XaNFHCv3bwWM+GuLd46NgvSWgPote5pVk7PSkshyGMAxr9AMo5n/ALPMUHO/a40lL57JSBRjdu03kqhyotp0cyPDH/zRs0GijH5kLgGY243nO+IU3RhdYwHb56gDfGAuDHpixW+RQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yeah.net; spf=pass smtp.mailfrom=yeah.net; dkim=pass (1024-bit key) header.d=yeah.net header.i=@yeah.net header.b=gpXgdBXa; arc=none smtp.client-ip=1.95.21.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yeah.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yeah.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yeah.net header.i=@yeah.net header.b="gpXgdBXa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version: Content-Type; bh=8mPwbXqgnl9XrwzwWBl68KnzBBVTshHswhakrqB5B24=; b=gpXgdBXa+f7hGWMWaNsXNRxZs8DVzasNtoJ5a/rJ9woAz0YHpql6I1dHQ00UZ/ vXvgNeddwMcR1yDUPqFSB8tpcsbKIACXJcG0jaSqdszBoXcG6QM4nPV96wdUMaRz HQAW++oNfsyaaMxINUI/feX9m31UhnngyxesoiIVtZNM4= Received: from dragon (unknown []) by gzsmtp2 (Coremail) with SMTP id Ms8vCgAHL7rHEThnfPKpAg--.27117S3; Sat, 16 Nov 2024 11:30:17 +0800 (CST) Date: Sat, 16 Nov 2024 11:30:15 +0800 From: Shawn Guo To: Arnd Bergmann , Peng Fan Cc: Sudeep Holla , Shawn Guo , Sascha Hauer , Mark Brown , Arnd Bergmann , Cristian Marussi , Pengutronix Kernel Team , Fabio Estevam , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Subject: Re: [PATCH] firmware: arm_scmi: fix i.MX build dependency Message-ID: References: <20241115230555.2435004-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241115230555.2435004-1-arnd@kernel.org> X-CM-TRANSID:Ms8vCgAHL7rHEThnfPKpAg--.27117S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7AF47WFWUZFyxWw4UWr1ftFb_yoW8CF17pa 9a9FyDCFyDJr4rJF47Ar4xX3W09a9YkrWrJF4DG3y8Zrn8ZF4kKFyvgw15XFyku3savr10 9F48Xws8WFyqya7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jrhL8UUUUU= X-CM-SenderInfo: pvkd40hjxrjqh1hdxhhqhw/1tbiEhaZZWc3+Cc7HAAAsQ On Sat, Nov 16, 2024 at 12:05:18AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The newly added SCMI vendor driver references functions in the > protocol driver but needs a Kconfig dependency to ensure it can link, > essentially the Kconfig dependency needs to be reversed to match the > link time dependency: > > arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_write': > fsl_mqs.c:(.text+0x1aa): undefined reference to `scmi_imx_misc_ctrl_set' > arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_read': > fsl_mqs.c:(.text+0x1ee): undefined reference to `scmi_imx_misc_ctrl_get' > > This however only works after changing the dependency in the SND_SOC_FSL_MQS > driver as well, which uses 'select IMX_SCMI_MISC_DRV' to turn on a > driver it depends on. This is generally a bad idea, so the best solution > is to change that into a dependency. > > To allow the ASoC driver to keep building with the SCMI support, this > needs to be an optional dependency that enforces the link-time > dependency if IMX_SCMI_MISC_DRV is a loadable module but not > depend on it if that is disabled. > > Fixes: 61c9f03e22fc ("firmware: arm_scmi: Add initial support for i.MX MISC protocol") > Fixes: 101c9023594a ("ASoC: fsl_mqs: Support accessing registers by scmi interface") > Signed-off-by: Arnd Bergmann > --- > I'm not sure this is the version we want to go with in the end, without > having read the code in detail, but the version in linux-next is clearly > wrong in multiple ways and this is the best I could come up with so far. > > If we can agree on this approach, it needs to go through the ASoC tree > as that contains the 101c9023594a commit at the moment. Thanks for spotting and fixing, Arnd! Unless Peng has objection to this change, I'm good with it. Shawn