The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Baojun Xu <baojun.xu@ti.com>
Cc: tiwai@suse.de, robh+dt@kernel.org, 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
Subject: Re: [PATCH v1] ALSA: hda/tas2781: Add speaker id check for ASUS projects
Date: Fri, 11 Oct 2024 14:07:35 +0300	[thread overview]
Message-ID: <ZwkG98S_wxK6xMEq@smile.fi.intel.com> (raw)
In-Reply-To: <20241011085303.738-1-baojun.xu@ti.com>

On Fri, Oct 11, 2024 at 04:53:03PM +0800, Baojun Xu wrote:
> Add speaker id check by gpio in ACPI for ASUS projects.

...

> +		scnprintf(tas_priv->coef_binaryname, 64, "TAS2XXX%04X%01d.bin",

sizeof() ?

> +			codec->core.subsystem_id & 0xffff, spk_id);

lower_16_bits() ?

...

> +		scnprintf(tas_priv->coef_binaryname, 64, "TAS2XXX%04X.bin",

Ditto.

> +			codec->core.subsystem_id & 0xffff);

Ditto.

...

> +	tas_hda->priv->speaker_id = devm_gpiod_get(tas_hda->dev, "speakerid",
> +						   GPIOD_IN);
> +	if (IS_ERR(tas_hda->priv->speaker_id))
> +		dev_info(tas_hda->dev, "Failed to get Speaker id gpio.\n");

This is wrong. If it's okay to ignore, make it optional. Either way you have to
return an error code to the caller as you effectively ignore deferred probe,
for example.

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2024-10-11 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  8:53 [PATCH v1] ALSA: hda/tas2781: Add speaker id check for ASUS projects Baojun Xu
2024-10-11  9:09 ` Takashi Iwai
2024-10-11  9:19   ` Takashi Iwai
2024-10-11 11:07 ` Andy Shevchenko [this message]

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=ZwkG98S_wxK6xMEq@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=13916275206@139.com \
    --cc=alsa-devel@alsa-project.org \
    --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