All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	alsa-devel@alsa-project.org,
	Ryan Lee <ryans.lee@maximintegrated.com>,
	tiwai@suse.de, gregkh@linuxfoundation.org, vkoul@kernel.org,
	Naveen Manohar <naveen.m@intel.com>,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>
Subject: Re: [PATCH] ASoC: codecs: Added MAX98373 Soundwire Driver
Date: Thu, 18 Jun 2020 07:42:25 -0500	[thread overview]
Message-ID: <d3bb399f-3af9-666d-054d-e4a1dda1dfb4@linux.intel.com> (raw)
In-Reply-To: <20200618110902.GE5789@sirena.org.uk>

Thanks for the review Mark,

>> +static void max98373_read_config(struct sdw_slave *slave)
>> +{
>> +	int value;
>> +	struct device *dev = &slave->dev;
>> +	struct max98373_priv *max98373 = dev_get_drvdata(dev);
>> +
>> +	if (!device_property_read_u32(dev, "maxim,vmon-slot-no", &value))
>> +		max98373->v_slot = value & 0xF;
>> +	else
>> +		max98373->v_slot = 0;
> 
> The DT bindings need updating to add SoundWire support.

Interesting. The properties are the same in I2C and SoundWire mode, so 
would we need a completely different file that just specifies the 
SoundWire DeviceID, e.g.

properties:
   compatible:
     const: sdw10217201000

What's the process for such dual-mode devices?

> 
>> +	/* L/R mix configuration */
>> +	regmap_write(max98373->regmap,
>> +		     MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1,
>> +		     0x80);
>> +	regmap_write(max98373->regmap,
>> +		     MAX98373_R202A_PCM_TO_SPK_MONO_MIX_2,
>> +		     0x1);
>> +	/* Set initial volume (0dB) */
>> +	regmap_write(max98373->regmap,
>> +		     MAX98373_R203D_AMP_DIG_VOL_CTRL,
>> +		     0x00);
>> +	regmap_write(max98373->regmap,
>> +		     MAX98373_R203E_AMP_PATH_GAIN,
>> +		     0x00);
> 
> I'd expect these to be chip defaults, especially the volumes.

The same sequence is already used in the I2C probe. if this needs to 
change, it's got to be applied for both cases.
> 
>> +	/* Speaker enable */
>> +	regmap_update_bits(max98373->regmap,
>> +			   MAX98373_R2043_AMP_EN,
>> +			   MAX98373_SPK_EN_MASK, 1);
> 
> I'd expect this to be managed via DAPM.

It's also copied as is from the existing I2C parts.

We should probably cut the common parts out, as done for rt5682. Ryan, 
can you look into this.

> 
>> +/* SPDX-License-Identifier: GPL-2.0-only
> 
> AIUI this needs the trailing */ on the same line for the license
> compliance people.

Indeed, that's a miss.

  reply	other threads:[~2020-06-18 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 16:30 [PATCH] ASoC: codecs: Added MAX98373 Soundwire Driver Pierre-Louis Bossart
2020-06-18 11:09 ` Mark Brown
2020-06-18 12:42   ` Pierre-Louis Bossart [this message]
2020-06-18 15:10     ` Mark Brown
2020-06-18 22:07       ` Ryan Lee

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=d3bb399f-3af9-666d-054d-e4a1dda1dfb4@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=naveen.m@intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ryans.lee@maximintegrated.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.