From: Mark Brown <broonie@kernel.org>
To: Zhu Ning <zhuning0077@gmail.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
pierre-louis.bossart@linux.intel.com, tiwai@suse.com,
Zhu Ning <zhuning@everest-semi.com>,
David Yang <yangxiaohua@everest-semi.com>
Subject: Re: [PATCH] ASoC: codecs: add support for ES8326
Date: Fri, 15 Jul 2022 20:04:24 +0100 [thread overview]
Message-ID: <YtG6OO5XlAFFcJjV@sirena.org.uk> (raw)
In-Reply-To: <20220715054100.9240-1-zhuning0077@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]
On Fri, Jul 15, 2022 at 01:41:00PM +0800, Zhu Ning wrote:
Looks mostly good but there's still some issues here, plus the ones
Pierre found. Only one or two are substantial though, some of the
things below are really minor:
Please check the coding style matches the kernel coding style -
checkpatch will probably help here.
> + snd_soc_dapm_mutex_unlock(dapm);
> +}
> +static void es8326_jack_detect_handler(struct work_struct *work)
Blank line missing between functions.
> + if(!es8326->jack)
> + goto out;
Missing space after the if.
> +static int es8326_resume(struct snd_soc_component *component)
> +{
I'm not seeing anything in here to resync the register map with the
device - the driver is using a register cache so that's going to break
if the device looses power over suspend. TBH it's not clear to me that
the driver isn't hard coding a specific set of paths...
> + regmap_write(es8326->regmap, ES8326_INT_SOURCE_58, 0x08);
> + regmap_write(es8326->regmap, ES8326_INTOUT_IO_59, 0x45);
Some of the hard coded register write sequences in here look a lot like
they're assuming a specific board layout and might need more device tree
configurability - what if the board doesn't use an interrupt or uses a
different one?
> + ret = device_property_read_u8(component->dev, "everest,mic1-src", &es8326->mic1_src);
> + if (ret != 0) {
This is adding a DT binding but there's no DT binding document.
Previous versions of this driver did have one, please include it with
every submission.
> --- /dev/null
> +++ b/sound/soc/codecs/es8326.h
> @@ -0,0 +1,187 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * es8326.c -- es8326 ALSA SoC audio driver
Commend has the wrong filename here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-07-15 19:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 5:41 [PATCH] ASoC: codecs: add support for ES8326 Zhu Ning
2022-07-15 13:05 ` Pierre-Louis Bossart
2022-07-15 19:04 ` Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-15 5:25 Zhu Ning
2022-07-07 1:18 Zhu Ning
2022-07-07 9:38 ` kernel test robot
2022-07-07 12:35 ` kernel test robot
2022-07-07 21:39 ` kernel test robot
2022-07-08 17:40 ` Mark Brown
2022-04-05 13:12 Zhu Ning
2022-04-05 14:02 ` Mark Brown
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=YtG6OO5XlAFFcJjV@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yangxiaohua@everest-semi.com \
--cc=zhuning0077@gmail.com \
--cc=zhuning@everest-semi.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