devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: wangweidong.a@awinic.com
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	ckeepax@opensource.cirrus.com, colin.i.king@gmail.com,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	doug@schmorgal.com, fido_max@inbox.ru, flatmax@flatmax.com,
	herve.codina@bootlin.com, kiseok.jo@irondevice.com,
	krzysztof.kozlowski+dt@linaro.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org, liweilei@awinic.com,
	perex@perex.cz, pierre-louis.bossart@linux.intel.com,
	rf@opensource.cirrus.com, robh+dt@kernel.org,
	shumingf@realtek.com, tiwai@suse.com, trix@redhat.com,
	yijiangtao@awinic.com, zhangjianming@awinic.com
Subject: Re: [PATCH V1 2/5] ASoC: codecs: aw88261 function for ALSA Audio Driver
Date: Wed, 19 Jul 2023 08:24:39 +0200	[thread overview]
Message-ID: <4096c968-aa77-5638-7f67-2a478d41ded3@linaro.org> (raw)
In-Reply-To: <20230719030955.41489-1-wangweidong.a@awinic.com>

On 19/07/2023 05:09, wangweidong.a@awinic.com wrote:
> Hi, Krzysztof,
> Thank you very much for your advice, 
>  but I have a few questions I'd like to discuss with you
> 
> On 18/07/2023 16:58, krzysztof.kozlowski@linaro.org wrote:
>> On 17/07/2023 13:58, wangweidong.a@awinic.com wrote:
>>> From: Weidong Wang <wangweidong.a@awinic.com>
>>>
>>> The AW88261 is an I2S/TDM input, high efficiency
>>> digital Smart K audio amplifier with an integrated 10.25V
>>> smart boost convert
> 
>> It's the same as in patch before. This does not help and does not
>> justify having one driver split into two.
> 
> I will modify the commit information and differentiate the commit 
>  information for each file
> 
>>>
> 
> ...
> 
>>> +
>>> +static void aw_dev_i2s_tx_enable(struct aw_device *aw_dev, bool flag)
>>> +{
>>> +	int ret;
>>> +
>>> +	if (flag) {
>>> +		ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCFG1_REG,
>>> +			~AW88261_I2STXEN_MASK, AW88261_I2STXEN_ENABLE_VALUE);
>>> +	} else {
>>> +		ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCFG1_REG,
>>> +			~AW88261_I2STXEN_MASK, AW88261_I2STXEN_DISABLE_VALUE);
>>> +	}
> 
>> You should not need {} here and in multiple other places.
> 
> I will delete {} as suggested
> 
>>> +	if (ret)
>>> +		dev_dbg(aw_dev->dev, "%s failed", __func__);
> 
>> Why you are not handling the errors properly?
> 
> Do you need to use dev_err instead?

No, return err and handle it somehow (if it is reasonable).

..

>>> +	} else {
>>> +		if (aw_dev->prof_cur != aw_dev->prof_index) {
>>> +			ret = aw88261_dev_fw_update(aw_dev);
>>> +			if (ret < 0)
>>> +				return ret;
>>> +		}
>>> +	}
>>> +
>>> +	aw_dev->prof_cur = aw_dev->prof_index;
>>> +
>>> +	return ret;
>>> +}
>>> +EXPORT_SYMBOL_GPL(aw88261_dev_reg_update);
> 
>> Same question. And in all other places as well.
> 
> This function will be called in aw88261.c, can I keep it?

Not really. Being used in other unit does not mean you need export.

Best regards,
Krzysztof


  reply	other threads:[~2023-07-19  6:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 11:58 [PATCH V1 0/5] ASoC: codecs: Add Awinic AW88261 audio amplifier driver wangweidong.a
2023-07-17 11:58 ` [PATCH V1 1/5] ASoC: codecs: Add i2c and codec registration for aw88261 and their associated operation functions wangweidong.a
2023-07-17 20:33   ` Krzysztof Kozlowski
2023-07-19  3:06     ` wangweidong.a
2023-07-17 11:58 ` [PATCH V1 2/5] ASoC: codecs: aw88261 function for ALSA Audio Driver wangweidong.a
2023-07-17 20:39   ` Krzysztof Kozlowski
2023-07-19  3:09     ` wangweidong.a
2023-07-19  6:24       ` Krzysztof Kozlowski [this message]
2023-07-17 11:58 ` [PATCH V1 3/5] ASoC: codecs: ACF bin parsing and check library file for aw88261 wangweidong.a
2023-07-17 20:40   ` Krzysztof Kozlowski
2023-07-19  3:12     ` wangweidong.a
2023-07-19  6:23       ` Krzysztof Kozlowski
2023-07-17 11:58 ` [PATCH V1 4/5] ASoC: codecs: aw88261 chip register file, data type file and Kconfig Makefile wangweidong.a
2023-07-17 12:33   ` Randy Dunlap
2023-07-19  2:59     ` wangweidong.a
2023-07-17 11:58 ` [PATCH V1 5/5] ASoC: dt-bindings: Add schema for "awinic,aw88261" wangweidong.a
2023-07-17 20:23   ` Krzysztof Kozlowski
2023-07-19  3:02     ` wangweidong.a
2023-07-17 13:03 ` [PATCH V1 0/5] ASoC: codecs: Add Awinic AW88261 audio amplifier driver Herve Codina

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=4096c968-aa77-5638-7f67-2a478d41ded3@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=colin.i.king@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=doug@schmorgal.com \
    --cc=fido_max@inbox.ru \
    --cc=flatmax@flatmax.com \
    --cc=herve.codina@bootlin.com \
    --cc=kiseok.jo@irondevice.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liweilei@awinic.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rf@opensource.cirrus.com \
    --cc=robh+dt@kernel.org \
    --cc=shumingf@realtek.com \
    --cc=tiwai@suse.com \
    --cc=trix@redhat.com \
    --cc=wangweidong.a@awinic.com \
    --cc=yijiangtao@awinic.com \
    --cc=zhangjianming@awinic.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;
as well as URLs for NNTP newsgroup(s).