From: Takashi Iwai <tiwai@suse.de>
To: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
<alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v1 2/2] ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel
Date: Wed, 20 Dec 2023 09:10:37 +0100 [thread overview]
Message-ID: <s5h8r5puwea.wl-tiwai@suse.de> (raw)
In-Reply-To: <20231219162232.790358-3-sbinding@opensource.cirrus.com>
On Tue, 19 Dec 2023 17:22:32 +0100,
Stefan Binding wrote:
>
> If CONFIG_SPI is not set in the kernel, there is no point in trying
> to set the chip selects. We can selectively compile it.
I guess it should with IS_REACHABLE() instead of IS_ENABLED()?
It can be still CONFIG_SPI=m while CONFIG_SND_HDA_*=y.
thanks,
Takashi
>
> Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312192256.lJelQEoZ-lkp@intel.com/
>
> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
> ---
> sound/pci/hda/cs35l41_hda_property.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c
> index 73b304e6c83c..194e1179a253 100644
> --- a/sound/pci/hda/cs35l41_hda_property.c
> +++ b/sound/pci/hda/cs35l41_hda_property.c
> @@ -210,6 +210,8 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde
>
> if (cfg->bus == SPI) {
> cs35l41->index = id;
> +
> +#if IS_ENABLED(CONFIG_SPI)
> /*
> * Manually set the Chip Select for the second amp <cs_gpio_index> in the node.
> * This is only supported for systems with 2 amps, since we cannot expand the
> @@ -249,6 +251,7 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde
> spi_setup(spi);
> }
> }
> +#endif
> } else {
> if (cfg->num_amps > 2)
> /*
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-12-20 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 16:22 [PATCH v1 0/2] Minor fixes for CS35L41 HDA Property driver Stefan Binding
2023-12-19 16:22 ` [PATCH v1 1/2] ALSA: hda: cs35l41: Do not allow uninitialised variables to be freed Stefan Binding
2023-12-19 16:22 ` [PATCH v1 2/2] ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel Stefan Binding
2023-12-20 8:10 ` Takashi Iwai [this message]
2023-12-21 8:27 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h8r5puwea.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=sbinding@opensource.cirrus.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox