From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Lee, RyanS" <RyanS.Lee@analog.com>, Mark Brown <broonie@kernel.org>
Cc: “Ryan <ryan.lee.analog@gmail.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"tiwai@suse.com" <tiwai@suse.com>,
"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
"rf@opensource.cirrus.com" <rf@opensource.cirrus.com>,
"ckeepax@opensource.cirrus.com" <ckeepax@opensource.cirrus.com>,
"herve.codina@bootlin.com" <herve.codina@bootlin.com>,
"wangweidong.a@awinic.com" <wangweidong.a@awinic.com>,
"james.schulman@cirrus.com" <james.schulman@cirrus.com>,
"ajye_huang@compal.corp-partner.google.com"
<ajye_huang@compal.corp-partner.google.com>,
"shumingf@realtek.com" <shumingf@realtek.com>,
"povik+lin@cutebit.org" <povik+lin@cutebit.org>,
"flatmax@flatmax.com" <flatmax@flatmax.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 1/2] ASoC: max98363: add soundwire amplifier driver
Date: Mon, 27 Feb 2023 18:38:09 -0500 [thread overview]
Message-ID: <5d78bbc6-340e-dea8-40c6-d065c7e7a878@linux.intel.com> (raw)
In-Reply-To: <SJ0PR03MB66814E588528C771D7BEAB3D8AAF9@SJ0PR03MB6681.namprd03.prod.outlook.com>
>>> Put differently, SoundWire codec drivers should only deal with
>>> non-standard vendor-specific registers.
>>
>> OK, it'd be good to be clear about what the issue is when reviewing things.
>> The registers *are* in the device's register map but the driver shouldn't be
>> referencing them at all and should instead be going via the SoundWire core
>> for anything in there.
>
> Thanks for the comment.
> The only reason I added standard SoundWire registers to the amp driver is
> to check the values for the debugging purpose because these registers values are
> important to understand the device status, but it is not visible from the regmap
> debugfs if those registers are not included on the regmap table of the driver.
> The driver never controls the standard SoundWire registers by itself.
> Do you recommend removing the standard SoundWire registers from the driver
> or keeping it non-volatile?
> (The reg_default values in the table are all amp reset values and those registers
> are treated as volatile. I shall clear 'unique ID' field because it is determined by
> the hardware pin connection.)
We already have debugfs support for those registers, see
sdw_slave_reg_show() in drivers/soundwire/debugfs.c
It's not the same file as regmap debugfs but the information is already
there, see e.g. an example on the SOF CI devices:
cd /sys/kernel/debug/soundwire/master-0-1/sdw:1:025d:0700:00
more registers
Register Value
DP0
0 0
1 0
2 0
3 0
4 0
5 1
Bank0
20 0
22 0
23 0
24 0
25 0
26 0
27 XX
28 XX
Bank1
30 0
32 0
33 0
34 0
35 0
36 0
37 XX
38 XX
SCP
40 0
41 7
42 0
43 0
44 20
45 9
46 4
47 XX
48 XX
49 XX
4a XX
4b XX
50 10
51 2
52 5d
53 7
54 0
55 0
DP1
100 0
101 0
102 0
next prev parent reply other threads:[~2023-02-27 23:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 1:08 [PATCH 1/2] ASoC: max98363: add soundwire amplifier driver “Ryan
2023-02-24 1:08 ` [PATCH 2/2] ASoC: dt-bindings: " “Ryan
2023-02-24 9:59 ` Krzysztof Kozlowski
[not found] ` <167721259313.5904.2321260293669174372.robh@kernel.org>
2023-03-10 1:32 ` Lee, RyanS
2023-02-24 7:56 ` [PATCH 1/2] ASoC: " Nuno Sá
2023-03-10 1:34 ` Lee, RyanS
2023-02-27 15:17 ` Pierre-Louis Bossart
2023-02-27 17:47 ` Mark Brown
2023-02-27 18:19 ` Pierre-Louis Bossart
2023-02-27 18:44 ` Mark Brown
2023-02-27 22:37 ` Lee, RyanS
2023-02-27 23:38 ` Pierre-Louis Bossart [this message]
2023-03-10 1:37 ` Lee, RyanS
2023-03-10 1:36 ` Lee, RyanS
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=5d78bbc6-340e-dea8-40c6-d065c7e7a878@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=RyanS.Lee@analog.com \
--cc=ajye_huang@compal.corp-partner.google.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=devicetree@vger.kernel.org \
--cc=flatmax@flatmax.com \
--cc=herve.codina@bootlin.com \
--cc=james.schulman@cirrus.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=povik+lin@cutebit.org \
--cc=rf@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
--cc=ryan.lee.analog@gmail.com \
--cc=shumingf@realtek.com \
--cc=tiwai@suse.com \
--cc=wangweidong.a@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