From: Simon Trimmer <simont@opensource.cirrus.com>
To: 'Baojun Xu' <baojun.xu@ti.com>
Cc: <robh+dt@kernel.org>, <andriy.shevchenko@linux.intel.com>,
<lgirdwood@gmail.com>, <perex@perex.cz>,
<pierre-louis.bossart@linux.intel.com>, <kevin-lu@ti.com>,
<shenghao-ding@ti.com>, <navada@ti.com>, <13916275206@139.com>,
<v-hampiholi@ti.com>, <v-po@ti.com>, <niranjan.hy@ti.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<liam.r.girdwood@intel.com>, <yung-chuan.liao@linux.intel.com>,
<broonie@kernel.org>, <soyer@irl.hu>, <tiwai@suse.de>
Subject: RE: [PATCH v8] ALSA: hda/tas2781: Add tas2781 hda SPI driver
Date: Tue, 18 Jun 2024 12:01:08 +0100 [thread overview]
Message-ID: <000701dac16e$d31b8390$79528ab0$@opensource.cirrus.com> (raw)
In-Reply-To: <20240614040554.610-1-baojun.xu@ti.com>
> From: Baojun Xu <baojun.xu@ti.com>
> Sent: Friday, June 14, 2024 5:06 AM
> +static int tas2781_hda_bind(struct device *dev, struct device *master,
> + void *master_data)
> +{
> + struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
> + struct hda_component *comps = master_data;
> + struct hda_codec *codec;
> + int ret;
> +
> + if (tas_hda->priv->index < 0 ||
> + tas_hda->priv->index >= HDA_MAX_COMPONENTS ||
> + (!comps))
> + return -EINVAL;
> +
> + comps = &comps[tas_hda->priv->index];
> + if (comps->dev)
> + return -EBUSY;
> +
> + codec = comps->codec;
> +
> + pm_runtime_get_sync(dev);
> +
> + comps->dev = dev;
> +
> + strscpy(comps->name, dev_name(dev), sizeof(comps->name));
> +
> + ret = tascodec_spi_init(tas_hda->priv, codec, THIS_MODULE,
> + tasdev_fw_ready);
> + if (!ret)
> + comps->playback_hook = tas2781_hda_playback_hook;
> +
...
> +
> +static void tas2781_hda_unbind(struct device *dev, struct device *master,
> + void *master_data)
> +{
> + struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
> + struct hda_component *comps = master_data;
> +
> + comps = &comps[tas_hda->priv->index];
> +
> + if (comps->dev == dev) {
> + comps->dev = NULL;
> + memset(comps->name, 0, sizeof(comps->name));
> + comps->playback_hook = NULL;
> + }
> +
I'd been making sure you're on CC but in addition to the other review
comments I wanted to highlight that this in for-next will affect this patch
and require similar changes to these in the i2c driver:
https://lore.kernel.org/alsa-devel/87le327f29.wl-tiwai@suse.de/T/#Z2e.:..:20
240617154105.108635-3-simont::40opensource.cirrus.com:1sound:pci:hda:tas2781
_hda_i2c.c
-Simon
next prev parent reply other threads:[~2024-06-18 11:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 4:05 [PATCH v8] ALSA: hda/tas2781: Add tas2781 hda SPI driver Baojun Xu
2024-06-14 13:20 ` Takashi Iwai
2024-07-11 9:42 ` [EXTERNAL] " Xu, Baojun
2024-06-14 14:38 ` Markus Elfring
2024-06-14 15:41 ` Christophe JAILLET
2024-06-18 11:01 ` Simon Trimmer [this message]
2024-07-11 9:02 ` [EXTERNAL] " Xu, Baojun
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='000701dac16e$d31b8390$79528ab0$@opensource.cirrus.com' \
--to=simont@opensource.cirrus.com \
--cc=13916275206@139.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=navada@ti.com \
--cc=niranjan.hy@ti.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=robh+dt@kernel.org \
--cc=shenghao-ding@ti.com \
--cc=soyer@irl.hu \
--cc=tiwai@suse.de \
--cc=v-hampiholi@ti.com \
--cc=v-po@ti.com \
--cc=yung-chuan.liao@linux.intel.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